Changeset 207767 in webkit
- Timestamp:
- Oct 24, 2016 11:18:09 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 5 deleted
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r207764 r207767 1 2016-10-24 Dave Hyatt <hyatt@apple.com> 2 3 Remove CSSCharsetRule from the CSS OM 4 https://bugs.webkit.org/show_bug.cgi?id=163891 5 6 Reviewed by Darin Adler. 7 8 * fast/dom/Window/resources/window-properties.js: 9 * fast/dom/dom-constructors-expected.txt: 10 * fast/dom/dom-constructors.html: 11 * fast/encoding/css-charset-default.xhtml: 12 * fast/encoding/css-charset-dom-expected.txt: Removed. 13 * fast/encoding/css-charset-dom.html: Removed. 14 * platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt: 15 1 16 2016-10-24 Eric Carlson <eric.carlson@apple.com> 2 17 -
trunk/LayoutTests/fast/dom/Window/resources/window-properties.js
r204935 r207767 34 34 ["Attr", "object"], 35 35 ["CDATASection", "object"], 36 ["CSSCharsetRule", "object"],37 36 ["CSSFontFaceRule", "object"], 38 37 ["CSSImportRule", "object"], -
trunk/LayoutTests/fast/dom/dom-constructors-expected.txt
r191423 r207767 70 70 PASS TryAllocate('CanvasRenderingContext2D') is 'exception' 71 71 PASS TryAllocate('Counter') is 'exception' 72 PASS TryAllocate('CSSCharsetRule') is 'exception'73 72 PASS TryAllocate('CSSFontFaceRule') is 'exception' 74 73 PASS TryAllocate('CSSImportRule') is 'exception' -
trunk/LayoutTests/fast/dom/dom-constructors.html
r191423 r207767 80 80 'CanvasRenderingContext2D', 81 81 'Counter', 82 'CSSCharsetRule',83 82 'CSSFontFaceRule', 84 83 'CSSImportRule', -
trunk/LayoutTests/fast/encoding/css-charset-default.xhtml
r195497 r207767 31 31 document.getElementById("res2").innerHTML += document.styleSheets[1].cssRules[0].style.content; 32 32 33 document.getElementById("res3").innerHTML += document.styleSheets[2].cssRules[ 1].styleSheet.cssRules[0].style.content;33 document.getElementById("res3").innerHTML += document.styleSheets[2].cssRules[0].styleSheet.cssRules[0].style.content; 34 34 35 35 document.getElementById("res4").innerHTML += document.styleSheets[3].cssRules[0].styleSheet.cssRules[0].style.content; -
trunk/LayoutTests/http/tests/css/resources/shared-stylesheet-mutation.js
r191158 r207767 79 79 80 80 mutationTest(1, 'sheet.insertRule("#testdiv { background-color: green; }", 3)', 'green'); 81 mutationTest(2, 'sheet.deleteRule( 2)');82 mutationTest(3, 'sheet.cssRules[ 2].insertRule("#testdiv { background-color: green; }", 1)', 'green');83 mutationTest(4, 'sheet.cssRules[ 2].deleteRule(0)', 'green');84 mutationTest(5, 'sheet.cssRules[ 2].cssRules[0].style.setProperty("background-color", "green", "")', 'green');85 mutationTest(6, 'sheet.cssRules[ 2].cssRules[0].style.removeProperty("background-color")', 'green');86 mutationTest(7, 'sheet.cssRules[ 2].cssRules[0].style.cssText = "background-color: green"', 'green');87 mutationTest(8, 'sheet.cssRules[ 2].cssRules[0].selectorText = "#dontmatch"', 'green');88 mutationTest(9, 'sheet.cssRules[ 2].media.mediaText = "print"', 'green');81 mutationTest(2, 'sheet.deleteRule(1)'); 82 mutationTest(3, 'sheet.cssRules[1].insertRule("#testdiv { background-color: green; }", 1)', 'green'); 83 mutationTest(4, 'sheet.cssRules[1].deleteRule(0)', 'green'); 84 mutationTest(5, 'sheet.cssRules[1].cssRules[0].style.setProperty("background-color", "green", "")', 'green'); 85 mutationTest(6, 'sheet.cssRules[1].cssRules[0].style.removeProperty("background-color")', 'green'); 86 mutationTest(7, 'sheet.cssRules[1].cssRules[0].style.cssText = "background-color: green"', 'green'); 87 mutationTest(8, 'sheet.cssRules[1].cssRules[0].selectorText = "#dontmatch"', 'green'); 88 mutationTest(9, 'sheet.cssRules[1].media.mediaText = "print"', 'green'); 89 89 90 90 var testString = '\ 91 sheet.cssRules[ 2].media.appendMedium("print");\92 sheet.cssRules[ 2].media.deleteMedium("all");\91 sheet.cssRules[1].media.appendMedium("print");\ 92 sheet.cssRules[1].media.deleteMedium("all");\ 93 93 '; 94 94 mutationTest(10, testString, 'green'); 95 95 96 96 var testString = '\ 97 sheet.deleteRule(3);\98 sheet.insertRule("#testdiv { background-color: green; }", 1);\99 97 sheet.deleteRule(2);\ 100 sheet.deleteRule(0);\ 98 sheet.insertRule("#testdiv { background-color: green; }", 0);\ 99 sheet.deleteRule(1);\ 101 100 sheet.deleteRule(3);\ 102 101 sheet.deleteRule(1);\ … … 106 105 107 106 var importRule = '@import "data:text/css;charset=utf-8,%23testdiv%7Bbackground-color%3Agreen%20!important%7D";'; 108 mutationTest(12, "sheet.insertRule('"+importRule+"', 1)", 'green');107 mutationTest(12, "sheet.insertRule('"+importRule+"', 0)", 'green'); 109 108 110 mutationTest(13, 'sheet.cssRules[ 3].selectorText = "foo"', 'red');111 mutationTest(14, 'sheet.cssRules[ 4].insertRule("40% { left: 40px; }")', 'red');112 mutationTest(15, 'sheet.cssRules[ 4].deleteRule("100%")', 'red');113 mutationTest(16, 'sheet.cssRules[ 5].style.setProperty("font-family", "Bar", "")', 'red');109 mutationTest(13, 'sheet.cssRules[2].selectorText = "foo"', 'red'); 110 mutationTest(14, 'sheet.cssRules[3].insertRule("40% { left: 40px; }")', 'red'); 111 mutationTest(15, 'sheet.cssRules[3].deleteRule("100%")', 'red'); 112 mutationTest(16, 'sheet.cssRules[4].style.setProperty("font-family", "Bar", "")', 'red'); 114 113 115 114 setTimeout(finishedTests, 80); -
trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-expected.txt
r191158 r207767 9 9 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)' 10 10 11 @charset "utf-8";12 11 #testdiv { background-color: green; } 13 12 @media all { … … 25 24 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 26 25 27 @charset "utf-8"; 28 #testdiv { background-color: green; } 29 @media all { 30 #testdiv { background-color: red; } 31 } 32 #testdiv { background-color: green; } 33 @page :right { margin-left: 3cm; } 26 #testdiv { background-color: green; } 27 @media all { 28 #testdiv { background-color: red; } 29 } 30 @page :right { margin-left: 3cm; } 31 #testdiv { background-color: green; } 34 32 @-webkit-keyframes bounce { 35 33 0% { left: 0px; } … … 42 40 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 43 41 44 @charset "utf-8";45 42 #testdiv { background-color: green; } 46 43 @page :right { margin-left: 3cm; } … … 55 52 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 56 53 57 @charset "utf-8";58 54 #testdiv { background-color: green; } 59 55 @media all { … … 72 68 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 73 69 74 @charset "utf-8";75 70 #testdiv { background-color: green; } 76 71 @media all { … … 87 82 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 88 83 89 @charset "utf-8";90 84 #testdiv { background-color: green; } 91 85 @media all { … … 103 97 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 104 98 105 @charset "utf-8";106 99 #testdiv { background-color: green; } 107 100 @media all { … … 119 112 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 120 113 121 @charset "utf-8";122 114 #testdiv { background-color: green; } 123 115 @media all { … … 135 127 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 136 128 137 @charset "utf-8";138 129 #testdiv { background-color: green; } 139 130 @media all { … … 151 142 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 152 143 153 @charset "utf-8";154 144 #testdiv { background-color: green; } 155 145 @media print { … … 167 157 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 168 158 169 @charset "utf-8";170 159 #testdiv { background-color: green; } 171 160 @media print { … … 189 178 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 190 179 191 @charset "utf-8";192 180 @import url("data:text/css;charset=utf-8,%23testdiv%7Bbackground-color%3Agreen%20!important%7D"); 193 181 #testdiv { background-color: green; } … … 206 194 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)' 207 195 208 @charset "utf-8";209 196 #testdiv { background-color: green; } 210 197 @media all { … … 222 209 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)' 223 210 224 @charset "utf-8";225 211 #testdiv { background-color: green; } 226 212 @media all { … … 239 225 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)' 240 226 241 @charset "utf-8";242 227 #testdiv { background-color: green; } 243 228 @media all { … … 254 239 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)' 255 240 256 @charset "utf-8";257 241 #testdiv { background-color: green; } 258 242 @media all { -
trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-preconstruct-expected.txt
r191158 r207767 9 9 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)' 10 10 11 @charset "utf-8";12 11 #testdiv { background-color: green; } 13 12 @media all { … … 25 24 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 26 25 27 @charset "utf-8"; 28 #testdiv { background-color: green; } 29 @media all { 30 #testdiv { background-color: red; } 31 } 32 #testdiv { background-color: green; } 33 @page :right { margin-left: 3cm; } 26 #testdiv { background-color: green; } 27 @media all { 28 #testdiv { background-color: red; } 29 } 30 @page :right { margin-left: 3cm; } 31 #testdiv { background-color: green; } 34 32 @-webkit-keyframes bounce { 35 33 0% { left: 0px; } … … 42 40 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 43 41 44 @charset "utf-8";45 42 #testdiv { background-color: green; } 46 43 @page :right { margin-left: 3cm; } … … 55 52 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 56 53 57 @charset "utf-8";58 54 #testdiv { background-color: green; } 59 55 @media all { … … 72 68 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 73 69 74 @charset "utf-8";75 70 #testdiv { background-color: green; } 76 71 @media all { … … 87 82 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 88 83 89 @charset "utf-8";90 84 #testdiv { background-color: green; } 91 85 @media all { … … 103 97 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 104 98 105 @charset "utf-8";106 99 #testdiv { background-color: green; } 107 100 @media all { … … 119 112 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 120 113 121 @charset "utf-8";122 114 #testdiv { background-color: green; } 123 115 @media all { … … 135 127 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 136 128 137 @charset "utf-8";138 129 #testdiv { background-color: green; } 139 130 @media all { … … 151 142 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 152 143 153 @charset "utf-8";154 144 #testdiv { background-color: green; } 155 145 @media print { … … 167 157 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 168 158 169 @charset "utf-8";170 159 #testdiv { background-color: green; } 171 160 @media print { … … 189 178 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)' 190 179 191 @charset "utf-8";192 180 @import url("data:text/css;charset=utf-8,%23testdiv%7Bbackground-color%3Agreen%20!important%7D"); 193 181 #testdiv { background-color: green; } … … 206 194 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)' 207 195 208 @charset "utf-8";209 196 #testdiv { background-color: green; } 210 197 @media all { … … 222 209 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)' 223 210 224 @charset "utf-8";225 211 #testdiv { background-color: green; } 226 212 @media all { … … 239 225 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)' 240 226 241 @charset "utf-8";242 227 #testdiv { background-color: green; } 243 228 @media all { … … 254 239 PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)' 255 240 256 @charset "utf-8";257 241 #testdiv { background-color: green; } 258 242 @media all { -
trunk/LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt
r204935 r207767 69 69 PASS 'function CDATASection() { [native code]}' is 'function CDATASection() { [native code]}' 70 70 PASS 'function CDATASection() { [native code]}' is 'function CDATASection() { [native code]}' 71 PASS 'function CSSCharsetRule() { [native code]}' is 'function CSSCharsetRule() { [native code]}'72 PASS 'function CSSCharsetRule() { [native code]}' is 'function CSSCharsetRule() { [native code]}'73 71 PASS 'function CSSFontFaceRule() { [native code]}' is 'function CSSFontFaceRule() { [native code]}' 74 72 PASS 'function CSSFontFaceRule() { [native code]}' is 'function CSSFontFaceRule() { [native code]}' -
trunk/Source/WebCore/CMakeLists.txt
r207670 r207767 333 333 crypto/WebKitSubtleCrypto.idl 334 334 335 css/CSSCharsetRule.idl336 335 css/CSSFontFaceLoadEvent.idl 337 336 css/CSSFontFaceRule.idl … … 1260 1259 css/CSSCalculationValue.cpp 1261 1260 css/CSSCanvasValue.cpp 1262 css/CSSCharsetRule.cpp1263 1261 css/CSSComputedStyleDeclaration.cpp 1264 1262 css/CSSContentDistributionValue.cpp -
trunk/Source/WebCore/ChangeLog
r207766 r207767 1 2016-10-24 Dave Hyatt <hyatt@apple.com> 2 3 Remove CSSCharsetRule from the CSS OM 4 https://bugs.webkit.org/show_bug.cgi?id=163891 5 6 Reviewed by Darin Adler. 7 8 Remove CSSCharsetRule from the CSS OM. All other browser engines have made this 9 change. This eliminates the weird overloading of isCharsetRule to match both 10 CSSCharsetRule and StyleRuleCharset (only used by the new parser). 11 12 Fix the destroy() method in StyleRuleBase to clean up StyleRuleCharsets created 13 by the new parser properly. 14 15 * CMakeLists.txt: 16 * DerivedSources.make: 17 * WebCore.xcodeproj/project.pbxproj: 18 * bindings/js/JSCSSRuleCustom.cpp: 19 (WebCore::toJSNewlyCreated): 20 * css/CSSCharsetRule.cpp: Removed. 21 * css/CSSCharsetRule.h: Removed. 22 * css/CSSCharsetRule.idl: Removed. 23 * css/CSSPropertySourceData.h: 24 * css/CSSStyleSheet.cpp: 25 (WebCore::CSSStyleSheet::item): 26 (WebCore::CSSStyleSheet::rules): 27 * css/CSSStyleSheet.h: 28 * css/StyleRule.cpp: 29 (WebCore::StyleRuleBase::destroy): 30 * inspector/InspectorStyleSheet.cpp: 31 (WebCore::asCSSRuleList): 32 1 33 2016-10-24 Zan Dobersek <zdobersek@igalia.com> 2 34 -
trunk/Source/WebCore/DerivedSources.make
r207762 r207767 242 242 $(WebCore)/crypto/SubtleCrypto.idl \ 243 243 $(WebCore)/crypto/WebKitSubtleCrypto.idl \ 244 $(WebCore)/css/CSSCharsetRule.idl \245 244 $(WebCore)/css/CSSFontFaceLoadEvent.idl \ 246 245 $(WebCore)/css/CSSFontFaceRule.idl \ -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r207762 r207767 3995 3995 A80E6CF60A1989CA007FB8C5 /* CSSImportRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CCC0A1989CA007FB8C5 /* CSSImportRule.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3996 3996 A80E6CF70A1989CA007FB8C5 /* CSSProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CCD0A1989CA007FB8C5 /* CSSProperty.cpp */; }; 3997 A80E6CF90A1989CA007FB8C5 /* CSSCharsetRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CCF0A1989CA007FB8C5 /* CSSCharsetRule.h */; settings = {ATTRIBUTES = (Private, ); }; };3998 3997 A80E6CFA0A1989CA007FB8C5 /* CSSImageValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CD00A1989CA007FB8C5 /* CSSImageValue.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3999 3998 A80E6CFB0A1989CA007FB8C5 /* Pair.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CD10A1989CA007FB8C5 /* Pair.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 5135 5134 BC4368E80C226E32005EFB5F /* Rect.h in Headers */ = {isa = PBXBuildFile; fileRef = BC4368E70C226E32005EFB5F /* Rect.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5136 5135 BC46C1EE0C0DDBDF0020CFC3 /* JSCSSRuleCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC46C1ED0C0DDBDF0020CFC3 /* JSCSSRuleCustom.cpp */; }; 5137 BC46C1FA0C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC46C1F00C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp */; };5138 BC46C1FB0C0DDC8F0020CFC3 /* JSCSSCharsetRule.h in Headers */ = {isa = PBXBuildFile; fileRef = BC46C1F10C0DDC8F0020CFC3 /* JSCSSCharsetRule.h */; };5139 5136 BC46C1FC0C0DDC8F0020CFC3 /* JSCSSFontFaceRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC46C1F20C0DDC8F0020CFC3 /* JSCSSFontFaceRule.cpp */; }; 5140 5137 BC46C1FD0C0DDC8F0020CFC3 /* JSCSSFontFaceRule.h in Headers */ = {isa = PBXBuildFile; fileRef = BC46C1F30C0DDC8F0020CFC3 /* JSCSSFontFaceRule.h */; }; … … 6144 6141 E1E6EEA40B628DA8005F2F70 /* JSHTMLSelectElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1E6EEA30B628DA8005F2F70 /* JSHTMLSelectElement.cpp */; }; 6145 6142 E1E6EEA80B628DB3005F2F70 /* JSHTMLSelectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = E1E6EEA70B628DB3005F2F70 /* JSHTMLSelectElement.h */; }; 6146 E1EBBBD40AAC9B87001FE8E2 /* CSSCharsetRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1EBBBD30AAC9B87001FE8E2 /* CSSCharsetRule.cpp */; };6147 6143 E1EC299F0BB04C6B00EA187B /* XPathNodeSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1EC299D0BB04C6B00EA187B /* XPathNodeSet.cpp */; }; 6148 6144 E1EC29A00BB04C6B00EA187B /* XPathNodeSet.h in Headers */ = {isa = PBXBuildFile; fileRef = E1EC299E0BB04C6B00EA187B /* XPathNodeSet.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 10427 10423 85C56CA60AA89D5F00D95755 /* CSSPageRule.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSPageRule.idl; sourceTree = "<group>"; }; 10428 10424 85C56CA90AA89E6600D95755 /* CSSImportRule.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSImportRule.idl; sourceTree = "<group>"; }; 10429 85C56CAC0AA89F8E00D95755 /* CSSCharsetRule.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSCharsetRule.idl; sourceTree = "<group>"; };10430 10425 85C56CAD0AA89FE000D95755 /* CSSUnknownRule.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSUnknownRule.idl; sourceTree = "<group>"; }; 10431 10426 85DF2F690AA3C74300AD64C5 /* HTMLCollection.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = HTMLCollection.idl; sourceTree = "<group>"; }; … … 11462 11457 A80E6CCD0A1989CA007FB8C5 /* CSSProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSProperty.cpp; sourceTree = "<group>"; }; 11463 11458 A80E6CCE0A1989CA007FB8C5 /* CSSUnknownRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSUnknownRule.h; sourceTree = "<group>"; }; 11464 A80E6CCF0A1989CA007FB8C5 /* CSSCharsetRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSCharsetRule.h; sourceTree = "<group>"; };11465 11459 A80E6CD00A1989CA007FB8C5 /* CSSImageValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSImageValue.h; sourceTree = "<group>"; }; 11466 11460 A80E6CD10A1989CA007FB8C5 /* Pair.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Pair.h; sourceTree = "<group>"; }; … … 12789 12783 BC4368E70C226E32005EFB5F /* Rect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Rect.h; sourceTree = "<group>"; }; 12790 12784 BC46C1ED0C0DDBDF0020CFC3 /* JSCSSRuleCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = JSCSSRuleCustom.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 12791 BC46C1F00C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSCharsetRule.cpp; sourceTree = "<group>"; };12792 BC46C1F10C0DDC8F0020CFC3 /* JSCSSCharsetRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSCSSCharsetRule.h; sourceTree = "<group>"; };12793 12785 BC46C1F20C0DDC8F0020CFC3 /* JSCSSFontFaceRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSFontFaceRule.cpp; sourceTree = "<group>"; }; 12794 12786 BC46C1F30C0DDC8F0020CFC3 /* JSCSSFontFaceRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSCSSFontFaceRule.h; sourceTree = "<group>"; }; … … 13927 13919 E1E6EEA30B628DA8005F2F70 /* JSHTMLSelectElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLSelectElement.cpp; sourceTree = "<group>"; }; 13928 13920 E1E6EEA70B628DB3005F2F70 /* JSHTMLSelectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = JSHTMLSelectElement.h; sourceTree = "<group>"; }; 13929 E1EBBBD30AAC9B87001FE8E2 /* CSSCharsetRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSCharsetRule.cpp; sourceTree = "<group>"; };13930 13921 E1EC299D0BB04C6B00EA187B /* XPathNodeSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XPathNodeSet.cpp; sourceTree = "<group>"; }; 13931 13922 E1EC299E0BB04C6B00EA187B /* XPathNodeSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPathNodeSet.h; sourceTree = "<group>"; }; … … 19923 19914 930705D709E0C9B700B17FE4 /* JSCounter.cpp */, 19924 19915 930705D909E0C9BF00B17FE4 /* JSCounter.h */, 19925 BC46C1F00C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp */,19926 BC46C1F10C0DDC8F0020CFC3 /* JSCSSCharsetRule.h */,19927 19916 BC46C1F20C0DDC8F0020CFC3 /* JSCSSFontFaceRule.cpp */, 19928 19917 BC46C1F30C0DDC8F0020CFC3 /* JSCSSFontFaceRule.h */, … … 22791 22780 BC604A420DB5634E00204739 /* CSSCanvasValue.cpp */, 22792 22781 BC6049CB0DB560C200204739 /* CSSCanvasValue.h */, 22793 E1EBBBD30AAC9B87001FE8E2 /* CSSCharsetRule.cpp */,22794 A80E6CCF0A1989CA007FB8C5 /* CSSCharsetRule.h */,22795 85C56CAC0AA89F8E00D95755 /* CSSCharsetRule.idl */,22796 22782 BCEA477C097CAAC80094C9E4 /* CSSComputedStyleDeclaration.cpp */, 22797 22783 BCEA477D097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h */, … … 24640 24626 49AE2D8F134EE50C0072920A /* CSSCalculationValue.h in Headers */, 24641 24627 BC6049CC0DB560C200204739 /* CSSCanvasValue.h in Headers */, 24642 A80E6CF90A1989CA007FB8C5 /* CSSCharsetRule.h in Headers */,24643 24628 BCEA4790097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h in Headers */, 24644 24629 9DAC7C551AF2CAA200437C44 /* CSSContentDistributionValue.h in Headers */, … … 25482 25467 E125F85218283A5600D84CD9 /* JSCryptoKeySerializationJWK.h in Headers */, 25483 25468 E125F83E182411E700D84CD9 /* JSCryptoOperationData.h in Headers */, 25484 BC46C1FB0C0DDC8F0020CFC3 /* JSCSSCharsetRule.h in Headers */,25485 25469 409EBDC316B7F3A600CBA3FC /* JSCSSFontFaceLoadEvent.h in Headers */, 25486 25470 BC46C1FD0C0DDC8F0020CFC3 /* JSCSSFontFaceRule.h in Headers */, … … 28402 28386 49AE2D8E134EE50C0072920A /* CSSCalculationValue.cpp in Sources */, 28403 28387 BC604A430DB5634E00204739 /* CSSCanvasValue.cpp in Sources */, 28404 E1EBBBD40AAC9B87001FE8E2 /* CSSCharsetRule.cpp in Sources */,28405 28388 BCEA478F097CAAC80094C9E4 /* CSSComputedStyleDeclaration.cpp in Sources */, 28406 28389 9DAC7C541AF2CAA100437C44 /* CSSContentDistributionValue.cpp in Sources */, … … 29159 29142 E125F85118283A5600D84CD9 /* JSCryptoKeySerializationJWK.cpp in Sources */, 29160 29143 E125F83D182411E700D84CD9 /* JSCryptoOperationData.cpp in Sources */, 29161 BC46C1FA0C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp in Sources */,29162 29144 409EBDC516B7F3CA00CBA3FC /* JSCSSFontFaceLoadEvent.cpp in Sources */, 29163 29145 BC46C1FC0C0DDC8F0020CFC3 /* JSCSSFontFaceRule.cpp in Sources */, -
trunk/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp
r205422 r207767 27 27 #include "JSCSSRule.h" 28 28 29 #include "CSSCharsetRule.h"30 29 #include "CSSFontFaceRule.h" 31 30 #include "CSSImportRule.h" … … 36 35 #include "CSSStyleRule.h" 37 36 #include "CSSSupportsRule.h" 38 #include "JSCSSCharsetRule.h"39 37 #include "JSCSSFontFaceRule.h" 40 38 #include "JSCSSImportRule.h" … … 74 72 case CSSRule::IMPORT_RULE: 75 73 return createWrapper<CSSImportRule>(globalObject, WTFMove(rule)); 76 case CSSRule::CHARSET_RULE:77 return createWrapper<CSSCharsetRule>(globalObject, WTFMove(rule));78 74 case CSSRule::KEYFRAME_RULE: 79 75 return createWrapper<CSSKeyframeRule>(globalObject, WTFMove(rule)); -
trunk/Source/WebCore/css/CSSPropertySourceData.h
r201290 r207767 84 84 UNKNOWN_RULE, 85 85 STYLE_RULE, 86 CHARSET_RULE,87 86 IMPORT_RULE, 88 87 MEDIA_RULE, -
trunk/Source/WebCore/css/CSSStyleSheet.cpp
r207669 r207767 22 22 #include "CSSStyleSheet.h" 23 23 24 #include "CSSCharsetRule.h"25 24 #include "CSSFontFaceRule.h" 26 25 #include "CSSImportRule.h" … … 246 245 247 246 RefPtr<CSSRule>& cssRule = m_childRuleCSSOMWrappers[index]; 248 if (!cssRule) { 249 if (index == 0 && m_contents->hasCharsetRule()) { 250 ASSERT(!m_contents->ruleAt(0)); 251 cssRule = CSSCharsetRule::create(this, m_contents->encodingFromCharsetRule()); 252 } else 253 cssRule = m_contents->ruleAt(index)->createCSSOMWrapper(this); 254 } 247 if (!cssRule) 248 cssRule = m_contents->ruleAt(index)->createCSSOMWrapper(this); 255 249 return cssRule.get(); 256 250 } … … 275 269 return nullptr; 276 270 // IE behavior. 277 RefPtr<StaticCSSRuleList> nonCharsetRules= StaticCSSRuleList::create();271 RefPtr<StaticCSSRuleList> ruleList = StaticCSSRuleList::create(); 278 272 unsigned ruleCount = length(); 279 for (unsigned i = 0; i < ruleCount; ++i) { 280 CSSRule* rule = item(i); 281 if (rule->type() == CSSRule::CHARSET_RULE) 282 continue; 283 nonCharsetRules->rules().append(rule); 284 } 285 return nonCharsetRules; 273 for (unsigned i = 0; i < ruleCount; ++i) 274 ruleList->rules().append(item(i)); 275 return ruleList; 286 276 } 287 277 -
trunk/Source/WebCore/css/CSSStyleSheet.h
r207396 r207767 33 33 namespace WebCore { 34 34 35 class CSSCharsetRule;36 35 class CSSImportRule; 37 36 class CSSParser; -
trunk/Source/WebCore/css/StyleRule.cpp
r207677 r207767 23 23 #include "StyleRule.h" 24 24 25 #include "CSSCharsetRule.h"26 25 #include "CSSFontFaceRule.h" 27 26 #include "CSSImportRule.h" … … 97 96 delete downcast<StyleKeyframe>(this); 98 97 return; 98 case Charset: 99 delete downcast<StyleRuleCharset>(this); 100 return; 99 101 case Unknown: 100 case Charset:101 102 #if !ENABLE(CSS_REGIONS) 102 103 case Region: -
trunk/Source/WebCore/css/StyleRule.h
r207677 r207767 351 351 SPECIALIZE_TYPE_TRAITS_END() 352 352 353 SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::StyleRuleCharset) 354 static bool isType(const WebCore::StyleRuleBase& rule) { return rule.isCharsetRule(); } 355 SPECIALIZE_TYPE_TRAITS_END() 356 -
trunk/Source/WebCore/css/StyleSheetContents.cpp
r206641 r207767 161 161 162 162 unsigned childVectorIndex = index; 163 if (hasCharsetRule()) {164 if (index == 0)165 return 0;166 --childVectorIndex;167 }168 163 if (childVectorIndex < m_importRules.size()) 169 164 return m_importRules[childVectorIndex].get(); … … 176 171 { 177 172 unsigned result = 0; 178 result += hasCharsetRule() ? 1 : 0;179 173 result += m_importRules.size(); 180 174 result += m_childRules.size(); … … 213 207 214 208 unsigned childVectorIndex = index; 215 // m_childRules does not contain @charset which is always in index 0 if it exists.216 if (hasCharsetRule()) {217 if (childVectorIndex == 0) {218 // Nothing can be inserted before @charset.219 return false;220 }221 --childVectorIndex;222 }223 224 209 if (childVectorIndex < m_importRules.size() || (childVectorIndex == m_importRules.size() && rule->isImportRule())) { 225 210 // Inserting non-import rule before @import is not allowed. … … 251 236 252 237 unsigned childVectorIndex = index; 253 if (hasCharsetRule()) {254 if (childVectorIndex == 0) {255 clearCharsetRule();256 return;257 }258 --childVectorIndex;259 }260 238 if (childVectorIndex < m_importRules.size()) { 261 239 m_importRules[childVectorIndex]->clearParentStyleSheet(); -
trunk/Source/WebCore/css/StyleSheetContents.h
r206641 r207767 101 101 void clearRules(); 102 102 103 bool hasCharsetRule() const { return !m_encodingFromCharsetRule.isNull(); }104 103 String encodingFromCharsetRule() const { return m_encodingFromCharsetRule; } 105 104 // Rules other than @charset and @import. -
trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp
r207396 r207767 196 196 RefPtr<StaticCSSRuleList> list = StaticCSSRuleList::create(); 197 197 Vector<RefPtr<CSSRule>>& listRules = list->rules(); 198 for (unsigned i = 0, size = styleSheet->length(); i < size; ++i) { 199 CSSRule* item = styleSheet->item(i); 200 if (item->type() == CSSRule::CHARSET_RULE) 201 continue; 202 listRules.append(item); 203 } 198 for (unsigned i = 0, size = styleSheet->length(); i < size; ++i) 199 listRules.append(styleSheet->item(i)); 204 200 return WTFMove(list); 205 201 } -
trunk/Source/WebKit/mac/ChangeLog
r207762 r207767 1 2016-10-24 Dave Hyatt <hyatt@apple.com> 2 3 Remove CSSCharsetRule from the CSS OM 4 https://bugs.webkit.org/show_bug.cgi?id=163891 5 6 Reviewed by Darin Adler. 7 8 * DOM/DOMCSSCharsetRule.mm: 9 (-[DOMCSSCharsetRule encoding]): 10 1 11 2016-10-24 Youenn Fablet <youenn@apple.com> 2 12 -
trunk/Source/WebKit/mac/DOM/DOMCSSCharsetRule.mm
r204717 r207767 26 26 #import "DOMCSSCharsetRule.h" 27 27 28 #import <WebCore/CSSCharsetRule.h>29 28 #import "DOMCSSRuleInternal.h" 30 29 #import "DOMNodeInternal.h" … … 36 35 #import <wtf/GetPtr.h> 37 36 38 #define IMPL static_cast<WebCore::CSSCharsetRule*>(reinterpret_cast<WebCore::CSSRule*>(_internal))39 40 37 @implementation DOMCSSCharsetRule 41 38 … … 43 40 { 44 41 WebCore::JSMainThreadNullState state; 45 return IMPL->encoding(); 42 43 // This has been removed from the CSS OM, so we're just keeping this around to not crash. 44 return nil; 46 45 } 47 46
Note: See TracChangeset
for help on using the changeset viewer.