Changeset 91239 in webkit
- Timestamp:
- Jul 18, 2011 10:33:10 PM (13 years ago)
- Location:
- trunk/Source/WebKit/mac
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r91232 r91239 1 2011-07-18 Andy Estes <aestes@apple.com> 2 3 Solar Walk app-specific hack accidentally strips stylesheets from the document. 4 https://bugs.webkit.org/show_bug.cgi?id=64777 5 6 Reviewed by Adam Barth. 7 8 Solar Walk uses a self-closed title tag in its documents ("<title />"). 9 The HTML5 parser does not recognize this as a valid self-closing tag, 10 so it treats the remainder of the document as title text. 11 12 We work around this in WebKit by injecting a script that calls 13 document.write() on the contents of document.title, thereby restoring 14 the contents of the document. Unfortunately this overwrote several 15 <style> tags that existed before the <title>, thereby causing the 16 document to not have the intended styling. 17 18 Fix this by having the injected script concatenate document.title to 19 the document instead of overwriting it during document.write(). We can 20 also take the opportunity to remove document.title since it does not 21 contain useful information. 22 23 * Misc/SolarWalkQuirksUserScript.js: 24 1 25 2011-07-18 Dean Jackson <dino@apple.com> 2 26 -
trunk/Source/WebKit/mac/Misc/SolarWalkQuirksUserScript.js
r86407 r91239 29 29 // Solar Walk uses a self closing title tag, so to match the behavior of the old parser, 30 30 // we write the contents of the title element to the end of the document so it can be re-parsed. 31 document.write(document.title); 31 document.write(document.documentElement.outerHTML + document.title); 32 33 // Remove <title> since SolarWalk intended it to be empty. 34 document.head.removeChild(document.title); 32 35 } 33 36
Note: See TracChangeset
for help on using the changeset viewer.