Summary: | Web Inspector: CSS is parsed improperly when saved in UTF-8 with a BOM | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alexander Pavlov (apavlov) <apavlov> | ||||
Component: | Web Inspector (Deprecated) | Assignee: | Alexander Pavlov (apavlov) <apavlov> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Alexander Pavlov (apavlov)
2011-04-25 07:59:26 PDT
Created attachment 90917 [details]
[PATCH] Suggested fix
Comment on attachment 90917 [details] [PATCH] Suggested fix View in context: https://bugs.webkit.org/attachment.cgi?id=90917&action=review > LayoutTests/inspector/styles/parse-utf8-bom.html:15 > + InspectorTest.dumpSelectedElementStyles(true, false, true); Can we be sure that the styles content is already loaded at this point? (In reply to comment #2) > (From update of attachment 90917 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=90917&action=review > > > LayoutTests/inspector/styles/parse-utf8-bom.html:15 > > + InspectorTest.dumpSelectedElementStyles(true, false, true); > > Can we be sure that the styles content is already loaded at this point? Yes, all external stylesheets will have been loaded by the time window.onload fires. Committed r84777: <http://trac.webkit.org/changeset/84777> Comment on attachment 90917 [details] [PATCH] Suggested fix View in context: https://bugs.webkit.org/attachment.cgi?id=90917&action=review > Source/WebCore/inspector/InspectorStyleSheet.cpp:1061 > + success = resourceStyleSheetText(&rawText); You should instead fetch CachedResource, cast it to the Stylesheet and get decoded data. |