Changeset 84777 in webkit
- Timestamp:
- Apr 25, 2011 8:51:35 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r84776 r84777 1 2011-04-25 Alexander Pavlov <apavlov@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: CSS is parsed improperly when saved in UTF-8 with a BOM 6 https://bugs.webkit.org/show_bug.cgi?id=59322 7 8 * inspector/styles/parse-utf8-bom-expected.txt: Added. 9 * inspector/styles/parse-utf8-bom.html: Added. 10 * inspector/styles/resources/parse-utf8-bom-main.css: Added. 11 (h1): 12 (h2): 13 * inspector/styles/resources/parse-utf8-bom-reset.css: Added. 14 1 15 2011-04-25 Jessie Berlin <jberlin@webkit.org> 2 16 -
trunk/Source/WebCore/ChangeLog
r84775 r84777 1 2011-04-25 Alexander Pavlov <apavlov@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: CSS is parsed improperly when saved in UTF-8 with a BOM 6 https://bugs.webkit.org/show_bug.cgi?id=59322 7 8 Use TextResourceDecoder to determine external stylesheet charsets correctly. 9 10 Test: inspector/styles/parse-utf8-bom.html 11 12 * inspector/InspectorStyleSheet.cpp: 13 (WebCore::InspectorStyleSheet::originalStyleSheetText): 14 1 15 2011-04-25 Pavel Feldman <pfeldman@google.com> 2 16 -
trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp
r84774 r84777 46 46 #include "Node.h" 47 47 #include "StyleSheetList.h" 48 #include "TextResourceDecoder.h" 48 49 #include "WebKitCSSKeyframesRule.h" 49 50 … … 1055 1056 bool InspectorStyleSheet::originalStyleSheetText(String* result) const 1056 1057 { 1057 String text;1058 bool success = inlineStyleSheetText(& text);1058 String rawText; 1059 bool success = inlineStyleSheetText(&rawText); 1059 1060 if (!success) 1060 success = resourceStyleSheetText(&text); 1061 if (success) 1062 *result = text; 1061 success = resourceStyleSheetText(&rawText); 1062 if (success) { 1063 CString cString = rawText.utf8(); 1064 RefPtr<TextResourceDecoder> decoder = TextResourceDecoder::create("text/css"); 1065 String sheetText = decoder->decode(cString.data(), cString.length()); 1066 sheetText += decoder->flush(); 1067 *result = sheetText; 1068 } 1063 1069 return success; 1064 1070 }
Note: See TracChangeset
for help on using the changeset viewer.