Closed
Bug 154902
Opened 22 years ago
Closed 22 years ago
Page appears differently when opened from saved file
Categories
(Camino Graveyard :: Page Layout, defect)
Tracking
(Not tracked)
VERIFIED
DUPLICATE
of bug 115328
People
(Reporter: winnie, Assigned: saari)
References
()
Details
Attachments
(4 files)
06-28 build
OS 10.1.5
1. Go to cnn.com
2. File->Save As->cnn.html on desktop.
3. Open cnn.html from desktop.
Expected result: page opened from locally saved file should look the same as
live page.
Actual result: page opened from locally saved file appears with two repeated
rows at the top.
This problem doesn't occur on all pages. Another page that exhibits this
problem is www.netscape.com
Attaching screenshots from live web pages and saved pages for comparison purposes.
Reporter | ||
Comment 1•22 years ago
|
||
Reporter | ||
Comment 2•22 years ago
|
||
Reporter | ||
Comment 3•22 years ago
|
||
Reporter | ||
Comment 4•22 years ago
|
||
Notice that the some of the left menu items have been shifted vertically as
well.
Comment 5•22 years ago
|
||
This is the problem. A document.write() adds content to the model. When the
'save page as...' code dumps out the tree, it serializes both the original
document.write in a <script> block, and the generated content.
The following page...
<html>
<body>
<script>
tophat="<p>one instance</p>";
</script>
<script>
document.write(tophat);
</script>
</body>
</html>
... looks like this when save to disk:
<html><head></head>
<body>
<script>
tophat="<p>one instance</p>";
</script>
<script>
document.write(tophat);
</script><p>one instance</p>
</body></html>
(By the way, I did this in the current machv trunk, so there is nothing
specific to chimera about this. Who owns the code that saves the file?).
Comment 6•22 years ago
|
||
Actually, you don't need two script elements. That's just leftover from
the way the "tophat" code on cnn.com and netscape.com is constructed.
The following is the minimum testcase:
<html>
<body>
<script>
document.write("<p>one instance</p>");
</script>
</body>
</html>
Dupe of bug 115328
*** This bug has been marked as a duplicate of 115328 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
vrfy dupe
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•