Diff
Modified: trunk/LayoutTests/ChangeLog (207766 => 207767)
--- trunk/LayoutTests/ChangeLog 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/LayoutTests/ChangeLog 2016-10-24 18:18:09 UTC (rev 207767)
@@ -1,3 +1,18 @@
+2016-10-24 Dave Hyatt <hy...@apple.com>
+
+ Remove CSSCharsetRule from the CSS OM
+ https://bugs.webkit.org/show_bug.cgi?id=163891
+
+ Reviewed by Darin Adler.
+
+ * fast/dom/Window/resources/window-properties.js:
+ * fast/dom/dom-constructors-expected.txt:
+ * fast/dom/dom-constructors.html:
+ * fast/encoding/css-charset-default.xhtml:
+ * fast/encoding/css-charset-dom-expected.txt: Removed.
+ * fast/encoding/css-charset-dom.html: Removed.
+ * platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:
+
2016-10-24 Eric Carlson <eric.carl...@apple.com>
[MediaStream] Separate media capture and audio playback muting
Modified: trunk/LayoutTests/fast/dom/Window/resources/window-properties.js (207766 => 207767)
--- trunk/LayoutTests/fast/dom/Window/resources/window-properties.js 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/LayoutTests/fast/dom/Window/resources/window-properties.js 2016-10-24 18:18:09 UTC (rev 207767)
@@ -33,7 +33,6 @@
["Attr", "object"],
["CDATASection", "object"],
- ["CSSCharsetRule", "object"],
["CSSFontFaceRule", "object"],
["CSSImportRule", "object"],
["CSSMediaRule", "object"],
Modified: trunk/LayoutTests/fast/dom/dom-constructors-expected.txt (207766 => 207767)
--- trunk/LayoutTests/fast/dom/dom-constructors-expected.txt 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/LayoutTests/fast/dom/dom-constructors-expected.txt 2016-10-24 18:18:09 UTC (rev 207767)
@@ -69,7 +69,6 @@
PASS TryAllocate('HTMLElement') is 'exception'
PASS TryAllocate('CanvasRenderingContext2D') is 'exception'
PASS TryAllocate('Counter') is 'exception'
-PASS TryAllocate('CSSCharsetRule') is 'exception'
PASS TryAllocate('CSSFontFaceRule') is 'exception'
PASS TryAllocate('CSSImportRule') is 'exception'
PASS TryAllocate('CSSMediaRule') is 'exception'
Modified: trunk/LayoutTests/fast/dom/dom-constructors.html (207766 => 207767)
--- trunk/LayoutTests/fast/dom/dom-constructors.html 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/LayoutTests/fast/dom/dom-constructors.html 2016-10-24 18:18:09 UTC (rev 207767)
@@ -79,7 +79,6 @@
'HTMLElement',
'CanvasRenderingContext2D',
'Counter',
- 'CSSCharsetRule',
'CSSFontFaceRule',
'CSSImportRule',
'CSSMediaRule',
Modified: trunk/LayoutTests/fast/encoding/css-charset-default.xhtml (207766 => 207767)
--- trunk/LayoutTests/fast/encoding/css-charset-default.xhtml 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/LayoutTests/fast/encoding/css-charset-default.xhtml 2016-10-24 18:18:09 UTC (rev 207767)
@@ -30,7 +30,7 @@
document.getElementById("res2").innerHTML += document.styleSheets[1].cssRules[0].style.content;
- document.getElementById("res3").innerHTML += document.styleSheets[2].cssRules[1].styleSheet.cssRules[0].style.content;
+ document.getElementById("res3").innerHTML += document.styleSheets[2].cssRules[0].styleSheet.cssRules[0].style.content;
document.getElementById("res4").innerHTML += document.styleSheets[3].cssRules[0].styleSheet.cssRules[0].style.content;
} catch (ex) {
Deleted: trunk/LayoutTests/fast/encoding/css-charset-dom-expected.txt (207766 => 207767)
--- trunk/LayoutTests/fast/encoding/css-charset-dom-expected.txt 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/LayoutTests/fast/encoding/css-charset-dom-expected.txt 2016-10-24 18:18:09 UTC (rev 207767)
@@ -1,7 +0,0 @@
-Test for bug 10676: @charset rules not accessible via DOM
-
-cssText: @charset "utf-8";
-encoding: utf-8
-Resetting encoding...
-cssText: @charset "koi8-r";
-encoding: koi8-r
Deleted: trunk/LayoutTests/fast/encoding/css-charset-dom.html (207766 => 207767)
--- trunk/LayoutTests/fast/encoding/css-charset-dom.html 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/LayoutTests/fast/encoding/css-charset-dom.html 2016-10-24 18:18:09 UTC (rev 207767)
@@ -1,32 +0,0 @@
-<html>
-<head>
- <meta content="text/html; charset=windows-1251" http-equiv="Content-Type"/>
- <link rel="stylesheet" type="text/css" href="" charset="windows-1251">
- <!-- The document charset and link charset have lower priority than @charset, so they
- shouldn't affect anything. -->
-</head>
-<body _onload_="test()">
-<p>Test for <a href="" 10676</a>:
-@charset rules not accessible via DOM</p>
-
-<p id="result"></p>
-
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-
-function test() {
- try {
- charsetRule = document.styleSheets[0].cssRules[0];
- document.getElementById("result").innerHTML = "cssText: " + charsetRule.cssText + "<br>encoding: " + charsetRule.encoding;
- document.getElementById("result").innerHTML += "<br>Resetting encoding...";
- charsetRule.encoding = "koi8-r";
- document.getElementById("result").innerHTML += "<br>cssText: " + charsetRule.cssText + "<br>encoding: " + charsetRule.encoding;
- } catch (ex) {
- document.getElementById("result").textContent = ex.toString();
- }
-}
-</script>
-
-</body>
-</html>
Modified: trunk/LayoutTests/http/tests/css/resources/shared-stylesheet-mutation.js (207766 => 207767)
--- trunk/LayoutTests/http/tests/css/resources/shared-stylesheet-mutation.js 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/LayoutTests/http/tests/css/resources/shared-stylesheet-mutation.js 2016-10-24 18:18:09 UTC (rev 207767)
@@ -78,26 +78,25 @@
mutationTest(0, '', 'red');
mutationTest(1, 'sheet.insertRule("#testdiv { background-color: green; }", 3)', 'green');
- mutationTest(2, 'sheet.deleteRule(2)');
- mutationTest(3, 'sheet.cssRules[2].insertRule("#testdiv { background-color: green; }", 1)', 'green');
- mutationTest(4, 'sheet.cssRules[2].deleteRule(0)', 'green');
- mutationTest(5, 'sheet.cssRules[2].cssRules[0].style.setProperty("background-color", "green", "")', 'green');
- mutationTest(6, 'sheet.cssRules[2].cssRules[0].style.removeProperty("background-color")', 'green');
- mutationTest(7, 'sheet.cssRules[2].cssRules[0].style.cssText = "background-color: green"', 'green');
- mutationTest(8, 'sheet.cssRules[2].cssRules[0].selectorText = "#dontmatch"', 'green');
- mutationTest(9, 'sheet.cssRules[2].media.mediaText = "print"', 'green');
+ mutationTest(2, 'sheet.deleteRule(1)');
+ mutationTest(3, 'sheet.cssRules[1].insertRule("#testdiv { background-color: green; }", 1)', 'green');
+ mutationTest(4, 'sheet.cssRules[1].deleteRule(0)', 'green');
+ mutationTest(5, 'sheet.cssRules[1].cssRules[0].style.setProperty("background-color", "green", "")', 'green');
+ mutationTest(6, 'sheet.cssRules[1].cssRules[0].style.removeProperty("background-color")', 'green');
+ mutationTest(7, 'sheet.cssRules[1].cssRules[0].style.cssText = "background-color: green"', 'green');
+ mutationTest(8, 'sheet.cssRules[1].cssRules[0].selectorText = "#dontmatch"', 'green');
+ mutationTest(9, 'sheet.cssRules[1].media.mediaText = "print"', 'green');
var testString = '\
- sheet.cssRules[2].media.appendMedium("print");\
- sheet.cssRules[2].media.deleteMedium("all");\
+ sheet.cssRules[1].media.appendMedium("print");\
+ sheet.cssRules[1].media.deleteMedium("all");\
';
mutationTest(10, testString, 'green');
var testString = '\
- sheet.deleteRule(3);\
- sheet.insertRule("#testdiv { background-color: green; }", 1);\
sheet.deleteRule(2);\
- sheet.deleteRule(0);\
+ sheet.insertRule("#testdiv { background-color: green; }", 0);\
+ sheet.deleteRule(1);\
sheet.deleteRule(3);\
sheet.deleteRule(1);\
sheet.deleteRule(1);\
@@ -105,12 +104,12 @@
mutationTest(11, testString, 'green');
var importRule = '@import "data:text/css;charset=utf-8,%23testdiv%7Bbackground-color%3Agreen%20!important%7D";';
- mutationTest(12, "sheet.insertRule('"+importRule+"', 1)", 'green');
+ mutationTest(12, "sheet.insertRule('"+importRule+"', 0)", 'green');
- mutationTest(13, 'sheet.cssRules[3].selectorText = "foo"', 'red');
- mutationTest(14, 'sheet.cssRules[4].insertRule("40% { left: 40px; }")', 'red');
- mutationTest(15, 'sheet.cssRules[4].deleteRule("100%")', 'red');
- mutationTest(16, 'sheet.cssRules[5].style.setProperty("font-family", "Bar", "")', 'red');
+ mutationTest(13, 'sheet.cssRules[2].selectorText = "foo"', 'red');
+ mutationTest(14, 'sheet.cssRules[3].insertRule("40% { left: 40px; }")', 'red');
+ mutationTest(15, 'sheet.cssRules[3].deleteRule("100%")', 'red');
+ mutationTest(16, 'sheet.cssRules[4].style.setProperty("font-family", "Bar", "")', 'red');
setTimeout(finishedTests, 80);
}
Modified: trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-expected.txt (207766 => 207767)
--- trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-expected.txt 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-expected.txt 2016-10-24 18:18:09 UTC (rev 207767)
@@ -8,7 +8,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: red; }
@@ -24,13 +23,12 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: red; }
}
+@page :right { margin-left: 3cm; }
#testdiv { background-color: green; }
-@page :right { margin-left: 3cm; }
@-webkit-keyframes bounce {
0% { left: 0px; }
100% { left: 200px; }
@@ -41,7 +39,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@page :right { margin-left: 3cm; }
@-webkit-keyframes bounce {
@@ -54,7 +51,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: red; }
@@ -71,7 +67,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
}
@@ -86,7 +81,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: green; }
@@ -102,7 +96,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { }
@@ -118,7 +111,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: green; }
@@ -134,7 +126,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#dontmatch { background-color: red; }
@@ -150,7 +141,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media print {
#testdiv { background-color: red; }
@@ -166,7 +156,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media print {
#testdiv { background-color: red; }
@@ -188,7 +177,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
@import url("data:text/css;charset=utf-8,%23testdiv%7Bbackground-color%3Agreen%20!important%7D");
#testdiv { background-color: green; }
@media all {
@@ -205,7 +193,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: red; }
@@ -221,7 +208,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: red; }
@@ -238,7 +224,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: red; }
@@ -253,7 +238,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: red; }
Modified: trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-preconstruct-expected.txt (207766 => 207767)
--- trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-preconstruct-expected.txt 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-preconstruct-expected.txt 2016-10-24 18:18:09 UTC (rev 207767)
@@ -8,7 +8,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: red; }
@@ -24,13 +23,12 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: red; }
}
+@page :right { margin-left: 3cm; }
#testdiv { background-color: green; }
-@page :right { margin-left: 3cm; }
@-webkit-keyframes bounce {
0% { left: 0px; }
100% { left: 200px; }
@@ -41,7 +39,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@page :right { margin-left: 3cm; }
@-webkit-keyframes bounce {
@@ -54,7 +51,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: red; }
@@ -71,7 +67,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
}
@@ -86,7 +81,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: green; }
@@ -102,7 +96,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { }
@@ -118,7 +111,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: green; }
@@ -134,7 +126,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#dontmatch { background-color: red; }
@@ -150,7 +141,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media print {
#testdiv { background-color: red; }
@@ -166,7 +156,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media print {
#testdiv { background-color: red; }
@@ -188,7 +177,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
-@charset "utf-8";
@import url("data:text/css;charset=utf-8,%23testdiv%7Bbackground-color%3Agreen%20!important%7D");
#testdiv { background-color: green; }
@media all {
@@ -205,7 +193,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: red; }
@@ -221,7 +208,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: red; }
@@ -238,7 +224,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: red; }
@@ -253,7 +238,6 @@
--------------------------------------
PASS getComputedStyle(testElement, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)'
-@charset "utf-8";
#testdiv { background-color: green; }
@media all {
#testdiv { background-color: red; }
Modified: trunk/LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt (207766 => 207767)
--- trunk/LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt 2016-10-24 18:18:09 UTC (rev 207767)
@@ -68,8 +68,6 @@
PASS 'function Attr() { [native code]}' is 'function Attr() { [native code]}'
PASS 'function CDATASection() { [native code]}' is 'function CDATASection() { [native code]}'
PASS 'function CDATASection() { [native code]}' is 'function CDATASection() { [native code]}'
-PASS 'function CSSCharsetRule() { [native code]}' is 'function CSSCharsetRule() { [native code]}'
-PASS 'function CSSCharsetRule() { [native code]}' is 'function CSSCharsetRule() { [native code]}'
PASS 'function CSSFontFaceRule() { [native code]}' is 'function CSSFontFaceRule() { [native code]}'
PASS 'function CSSFontFaceRule() { [native code]}' is 'function CSSFontFaceRule() { [native code]}'
PASS 'function CSSImportRule() { [native code]}' is 'function CSSImportRule() { [native code]}'
Modified: trunk/Source/WebCore/CMakeLists.txt (207766 => 207767)
--- trunk/Source/WebCore/CMakeLists.txt 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/CMakeLists.txt 2016-10-24 18:18:09 UTC (rev 207767)
@@ -332,7 +332,6 @@
crypto/SubtleCrypto.idl
crypto/WebKitSubtleCrypto.idl
- css/CSSCharsetRule.idl
css/CSSFontFaceLoadEvent.idl
css/CSSFontFaceRule.idl
css/CSSImportRule.idl
@@ -1259,7 +1258,6 @@
css/CSSBorderImageSliceValue.cpp
css/CSSCalculationValue.cpp
css/CSSCanvasValue.cpp
- css/CSSCharsetRule.cpp
css/CSSComputedStyleDeclaration.cpp
css/CSSContentDistributionValue.cpp
css/CSSCrossfadeValue.cpp
Modified: trunk/Source/WebCore/ChangeLog (207766 => 207767)
--- trunk/Source/WebCore/ChangeLog 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/ChangeLog 2016-10-24 18:18:09 UTC (rev 207767)
@@ -1,3 +1,35 @@
+2016-10-24 Dave Hyatt <hy...@apple.com>
+
+ Remove CSSCharsetRule from the CSS OM
+ https://bugs.webkit.org/show_bug.cgi?id=163891
+
+ Reviewed by Darin Adler.
+
+ Remove CSSCharsetRule from the CSS OM. All other browser engines have made this
+ change. This eliminates the weird overloading of isCharsetRule to match both
+ CSSCharsetRule and StyleRuleCharset (only used by the new parser).
+
+ Fix the destroy() method in StyleRuleBase to clean up StyleRuleCharsets created
+ by the new parser properly.
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSCSSRuleCustom.cpp:
+ (WebCore::toJSNewlyCreated):
+ * css/CSSCharsetRule.cpp: Removed.
+ * css/CSSCharsetRule.h: Removed.
+ * css/CSSCharsetRule.idl: Removed.
+ * css/CSSPropertySourceData.h:
+ * css/CSSStyleSheet.cpp:
+ (WebCore::CSSStyleSheet::item):
+ (WebCore::CSSStyleSheet::rules):
+ * css/CSSStyleSheet.h:
+ * css/StyleRule.cpp:
+ (WebCore::StyleRuleBase::destroy):
+ * inspector/InspectorStyleSheet.cpp:
+ (WebCore::asCSSRuleList):
+
2016-10-24 Zan Dobersek <zdober...@igalia.com>
[CodeGeneratorJS] Standalone dictionaries have misplaced build guards
Modified: trunk/Source/WebCore/DerivedSources.make (207766 => 207767)
--- trunk/Source/WebCore/DerivedSources.make 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/DerivedSources.make 2016-10-24 18:18:09 UTC (rev 207767)
@@ -241,7 +241,6 @@
$(WebCore)/crypto/CryptoKeyPair.idl \
$(WebCore)/crypto/SubtleCrypto.idl \
$(WebCore)/crypto/WebKitSubtleCrypto.idl \
- $(WebCore)/css/CSSCharsetRule.idl \
$(WebCore)/css/CSSFontFaceLoadEvent.idl \
$(WebCore)/css/CSSFontFaceRule.idl \
$(WebCore)/css/CSSImportRule.idl \
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (207766 => 207767)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-10-24 18:18:09 UTC (rev 207767)
@@ -3994,7 +3994,6 @@
A80E6CF50A1989CA007FB8C5 /* CSSPageRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CCB0A1989CA007FB8C5 /* CSSPageRule.cpp */; };
A80E6CF60A1989CA007FB8C5 /* CSSImportRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CCC0A1989CA007FB8C5 /* CSSImportRule.h */; settings = {ATTRIBUTES = (Private, ); }; };
A80E6CF70A1989CA007FB8C5 /* CSSProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CCD0A1989CA007FB8C5 /* CSSProperty.cpp */; };
- A80E6CF90A1989CA007FB8C5 /* CSSCharsetRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CCF0A1989CA007FB8C5 /* CSSCharsetRule.h */; settings = {ATTRIBUTES = (Private, ); }; };
A80E6CFA0A1989CA007FB8C5 /* CSSImageValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CD00A1989CA007FB8C5 /* CSSImageValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
A80E6CFB0A1989CA007FB8C5 /* Pair.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CD10A1989CA007FB8C5 /* Pair.h */; settings = {ATTRIBUTES = (Private, ); }; };
A80E6CFC0A1989CA007FB8C5 /* CSSMediaRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CD20A1989CA007FB8C5 /* CSSMediaRule.cpp */; };
@@ -5134,8 +5133,6 @@
BC3D85BC1C0E2E7A00D3B610 /* JSHTMLPictureElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BC808B131C0E2B350066FD6B /* JSHTMLPictureElement.h */; };
BC4368E80C226E32005EFB5F /* Rect.h in Headers */ = {isa = PBXBuildFile; fileRef = BC4368E70C226E32005EFB5F /* Rect.h */; settings = {ATTRIBUTES = (Private, ); }; };
BC46C1EE0C0DDBDF0020CFC3 /* JSCSSRuleCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC46C1ED0C0DDBDF0020CFC3 /* JSCSSRuleCustom.cpp */; };
- BC46C1FA0C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC46C1F00C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp */; };
- BC46C1FB0C0DDC8F0020CFC3 /* JSCSSCharsetRule.h in Headers */ = {isa = PBXBuildFile; fileRef = BC46C1F10C0DDC8F0020CFC3 /* JSCSSCharsetRule.h */; };
BC46C1FC0C0DDC8F0020CFC3 /* JSCSSFontFaceRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC46C1F20C0DDC8F0020CFC3 /* JSCSSFontFaceRule.cpp */; };
BC46C1FD0C0DDC8F0020CFC3 /* JSCSSFontFaceRule.h in Headers */ = {isa = PBXBuildFile; fileRef = BC46C1F30C0DDC8F0020CFC3 /* JSCSSFontFaceRule.h */; };
BC46C1FE0C0DDC8F0020CFC3 /* JSCSSImportRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC46C1F40C0DDC8F0020CFC3 /* JSCSSImportRule.cpp */; };
@@ -6143,7 +6140,6 @@
E1E1BF00115FF6FB006F52CA /* WindowsKeyboardCodes.h in Headers */ = {isa = PBXBuildFile; fileRef = E1E1BEFF115FF6FB006F52CA /* WindowsKeyboardCodes.h */; settings = {ATTRIBUTES = (Private, ); }; };
E1E6EEA40B628DA8005F2F70 /* JSHTMLSelectElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1E6EEA30B628DA8005F2F70 /* JSHTMLSelectElement.cpp */; };
E1E6EEA80B628DB3005F2F70 /* JSHTMLSelectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = E1E6EEA70B628DB3005F2F70 /* JSHTMLSelectElement.h */; };
- E1EBBBD40AAC9B87001FE8E2 /* CSSCharsetRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1EBBBD30AAC9B87001FE8E2 /* CSSCharsetRule.cpp */; };
E1EC299F0BB04C6B00EA187B /* XPathNodeSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1EC299D0BB04C6B00EA187B /* XPathNodeSet.cpp */; };
E1EC29A00BB04C6B00EA187B /* XPathNodeSet.h in Headers */ = {isa = PBXBuildFile; fileRef = E1EC299E0BB04C6B00EA187B /* XPathNodeSet.h */; settings = {ATTRIBUTES = (Private, ); }; };
E1ED8AC30CC49BE000BFC557 /* CSSPrimitiveValueMappings.h in Headers */ = {isa = PBXBuildFile; fileRef = E1ED8AC20CC49BE000BFC557 /* CSSPrimitiveValueMappings.h */; };
@@ -10426,7 +10422,6 @@
85C56CA30AA89CA400D95755 /* CSSFontFaceRule.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSFontFaceRule.idl; sourceTree = "<group>"; };
85C56CA60AA89D5F00D95755 /* CSSPageRule.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSPageRule.idl; sourceTree = "<group>"; };
85C56CA90AA89E6600D95755 /* CSSImportRule.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSImportRule.idl; sourceTree = "<group>"; };
- 85C56CAC0AA89F8E00D95755 /* CSSCharsetRule.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSCharsetRule.idl; sourceTree = "<group>"; };
85C56CAD0AA89FE000D95755 /* CSSUnknownRule.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSUnknownRule.idl; sourceTree = "<group>"; };
85DF2F690AA3C74300AD64C5 /* HTMLCollection.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = HTMLCollection.idl; sourceTree = "<group>"; };
85DF2F920AA3C9B600AD64C5 /* HTMLOptionsCollection.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = HTMLOptionsCollection.idl; sourceTree = "<group>"; };
@@ -11461,7 +11456,6 @@
A80E6CCC0A1989CA007FB8C5 /* CSSImportRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSImportRule.h; sourceTree = "<group>"; };
A80E6CCD0A1989CA007FB8C5 /* CSSProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSProperty.cpp; sourceTree = "<group>"; };
A80E6CCE0A1989CA007FB8C5 /* CSSUnknownRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSUnknownRule.h; sourceTree = "<group>"; };
- A80E6CCF0A1989CA007FB8C5 /* CSSCharsetRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSCharsetRule.h; sourceTree = "<group>"; };
A80E6CD00A1989CA007FB8C5 /* CSSImageValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSImageValue.h; sourceTree = "<group>"; };
A80E6CD10A1989CA007FB8C5 /* Pair.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Pair.h; sourceTree = "<group>"; };
A80E6CD20A1989CA007FB8C5 /* CSSMediaRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSMediaRule.cpp; sourceTree = "<group>"; };
@@ -12788,8 +12782,6 @@
BC3C39B50C0D3D8D005F4D7A /* JSMediaList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSMediaList.h; sourceTree = "<group>"; };
BC4368E70C226E32005EFB5F /* Rect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Rect.h; sourceTree = "<group>"; };
BC46C1ED0C0DDBDF0020CFC3 /* JSCSSRuleCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = JSCSSRuleCustom.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
- BC46C1F00C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSCharsetRule.cpp; sourceTree = "<group>"; };
- BC46C1F10C0DDC8F0020CFC3 /* JSCSSCharsetRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSCSSCharsetRule.h; sourceTree = "<group>"; };
BC46C1F20C0DDC8F0020CFC3 /* JSCSSFontFaceRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSFontFaceRule.cpp; sourceTree = "<group>"; };
BC46C1F30C0DDC8F0020CFC3 /* JSCSSFontFaceRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSCSSFontFaceRule.h; sourceTree = "<group>"; };
BC46C1F40C0DDC8F0020CFC3 /* JSCSSImportRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSImportRule.cpp; sourceTree = "<group>"; };
@@ -13926,7 +13918,6 @@
E1E1BEFF115FF6FB006F52CA /* WindowsKeyboardCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowsKeyboardCodes.h; sourceTree = "<group>"; };
E1E6EEA30B628DA8005F2F70 /* JSHTMLSelectElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLSelectElement.cpp; sourceTree = "<group>"; };
E1E6EEA70B628DB3005F2F70 /* JSHTMLSelectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = JSHTMLSelectElement.h; sourceTree = "<group>"; };
- E1EBBBD30AAC9B87001FE8E2 /* CSSCharsetRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSCharsetRule.cpp; sourceTree = "<group>"; };
E1EC299D0BB04C6B00EA187B /* XPathNodeSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XPathNodeSet.cpp; sourceTree = "<group>"; };
E1EC299E0BB04C6B00EA187B /* XPathNodeSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPathNodeSet.h; sourceTree = "<group>"; };
E1ED8AC20CC49BE000BFC557 /* CSSPrimitiveValueMappings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSPrimitiveValueMappings.h; sourceTree = "<group>"; };
@@ -19922,8 +19913,6 @@
BCC065860F3CE2A700CD2D87 /* JSClientRectList.h */,
930705D709E0C9B700B17FE4 /* JSCounter.cpp */,
930705D909E0C9BF00B17FE4 /* JSCounter.h */,
- BC46C1F00C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp */,
- BC46C1F10C0DDC8F0020CFC3 /* JSCSSCharsetRule.h */,
BC46C1F20C0DDC8F0020CFC3 /* JSCSSFontFaceRule.cpp */,
BC46C1F30C0DDC8F0020CFC3 /* JSCSSFontFaceRule.h */,
BC46C1F40C0DDC8F0020CFC3 /* JSCSSImportRule.cpp */,
@@ -22790,9 +22779,6 @@
49AE2D8D134EE50C0072920A /* CSSCalculationValue.h */,
BC604A420DB5634E00204739 /* CSSCanvasValue.cpp */,
BC6049CB0DB560C200204739 /* CSSCanvasValue.h */,
- E1EBBBD30AAC9B87001FE8E2 /* CSSCharsetRule.cpp */,
- A80E6CCF0A1989CA007FB8C5 /* CSSCharsetRule.h */,
- 85C56CAC0AA89F8E00D95755 /* CSSCharsetRule.idl */,
BCEA477C097CAAC80094C9E4 /* CSSComputedStyleDeclaration.cpp */,
BCEA477D097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h */,
9DAC7C521AF2CAA100437C44 /* CSSContentDistributionValue.cpp */,
@@ -24639,7 +24625,6 @@
BC274B2F140EBEB200EADFA6 /* CSSBorderImageSliceValue.h in Headers */,
49AE2D8F134EE50C0072920A /* CSSCalculationValue.h in Headers */,
BC6049CC0DB560C200204739 /* CSSCanvasValue.h in Headers */,
- A80E6CF90A1989CA007FB8C5 /* CSSCharsetRule.h in Headers */,
BCEA4790097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h in Headers */,
9DAC7C551AF2CAA200437C44 /* CSSContentDistributionValue.h in Headers */,
2D8FEBDD143E3EF70072502B /* CSSCrossfadeValue.h in Headers */,
@@ -25481,7 +25466,6 @@
E1F80B8E183172B5007885C3 /* JSCryptoKeyPair.h in Headers */,
E125F85218283A5600D84CD9 /* JSCryptoKeySerializationJWK.h in Headers */,
E125F83E182411E700D84CD9 /* JSCryptoOperationData.h in Headers */,
- BC46C1FB0C0DDC8F0020CFC3 /* JSCSSCharsetRule.h in Headers */,
409EBDC316B7F3A600CBA3FC /* JSCSSFontFaceLoadEvent.h in Headers */,
BC46C1FD0C0DDC8F0020CFC3 /* JSCSSFontFaceRule.h in Headers */,
BC46C1FF0C0DDC8F0020CFC3 /* JSCSSImportRule.h in Headers */,
@@ -28401,7 +28385,6 @@
BC274B31140EBED800EADFA6 /* CSSBorderImageSliceValue.cpp in Sources */,
49AE2D8E134EE50C0072920A /* CSSCalculationValue.cpp in Sources */,
BC604A430DB5634E00204739 /* CSSCanvasValue.cpp in Sources */,
- E1EBBBD40AAC9B87001FE8E2 /* CSSCharsetRule.cpp in Sources */,
BCEA478F097CAAC80094C9E4 /* CSSComputedStyleDeclaration.cpp in Sources */,
9DAC7C541AF2CAA100437C44 /* CSSContentDistributionValue.cpp in Sources */,
2D8FEBDC143E3EF70072502B /* CSSCrossfadeValue.cpp in Sources */,
@@ -29158,7 +29141,6 @@
E1F80B8A183172A2007885C3 /* JSCryptoKeyPairCustom.cpp in Sources */,
E125F85118283A5600D84CD9 /* JSCryptoKeySerializationJWK.cpp in Sources */,
E125F83D182411E700D84CD9 /* JSCryptoOperationData.cpp in Sources */,
- BC46C1FA0C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp in Sources */,
409EBDC516B7F3CA00CBA3FC /* JSCSSFontFaceLoadEvent.cpp in Sources */,
BC46C1FC0C0DDC8F0020CFC3 /* JSCSSFontFaceRule.cpp in Sources */,
BC46C1FE0C0DDC8F0020CFC3 /* JSCSSImportRule.cpp in Sources */,
Modified: trunk/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp (207766 => 207767)
--- trunk/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp 2016-10-24 18:18:09 UTC (rev 207767)
@@ -26,7 +26,6 @@
#include "config.h"
#include "JSCSSRule.h"
-#include "CSSCharsetRule.h"
#include "CSSFontFaceRule.h"
#include "CSSImportRule.h"
#include "CSSKeyframeRule.h"
@@ -35,7 +34,6 @@
#include "CSSPageRule.h"
#include "CSSStyleRule.h"
#include "CSSSupportsRule.h"
-#include "JSCSSCharsetRule.h"
#include "JSCSSFontFaceRule.h"
#include "JSCSSImportRule.h"
#include "JSCSSKeyframeRule.h"
@@ -73,8 +71,6 @@
return createWrapper<CSSPageRule>(globalObject, WTFMove(rule));
case CSSRule::IMPORT_RULE:
return createWrapper<CSSImportRule>(globalObject, WTFMove(rule));
- case CSSRule::CHARSET_RULE:
- return createWrapper<CSSCharsetRule>(globalObject, WTFMove(rule));
case CSSRule::KEYFRAME_RULE:
return createWrapper<CSSKeyframeRule>(globalObject, WTFMove(rule));
case CSSRule::KEYFRAMES_RULE:
Deleted: trunk/Source/WebCore/css/CSSCharsetRule.cpp (207766 => 207767)
--- trunk/Source/WebCore/css/CSSCharsetRule.cpp 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/css/CSSCharsetRule.cpp 2016-10-24 18:18:09 UTC (rev 207767)
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2006, 2008, 2012 Apple Inc. All rights reserved.
- * Copyright (C) 2006 Alexey Proskuryakov (a...@macrules.ru)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "CSSCharsetRule.h"
-
-namespace WebCore {
-
-CSSCharsetRule::CSSCharsetRule(CSSStyleSheet* parent, const String& encoding)
- : CSSRule(parent)
- , m_encoding(encoding)
-{
-}
-
-String CSSCharsetRule::cssText() const
-{
- return "@charset \"" + m_encoding + "\";";
-}
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/css/CSSCharsetRule.h (207766 => 207767)
--- trunk/Source/WebCore/css/CSSCharsetRule.h 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/css/CSSCharsetRule.h 2016-10-24 18:18:09 UTC (rev 207767)
@@ -1,48 +0,0 @@
-/*
- * (C) 1999-2003 Lars Knoll (kn...@kde.org)
- * (C) 2002-2003 Dirk Mueller (muel...@kde.org)
- * Copyright (C) 2002, 2006, 2008, 2012 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#pragma once
-
-#include "CSSRule.h"
-
-namespace WebCore {
-
-class CSSCharsetRule final : public CSSRule {
-public:
- static Ref<CSSCharsetRule> create(CSSStyleSheet* parent, const String& encoding)
- {
- return adoptRef(*new CSSCharsetRule(parent, encoding));
- }
-
- const String& encoding() const { return m_encoding; }
- ExceptionOr<void> setEncoding(const String& encoding) { m_encoding = encoding; return { }; }
-
-private:
- CSSCharsetRule(CSSStyleSheet* parent, const String& encoding);
-
- CSSRule::Type type() const final { return CHARSET_RULE; }
- String cssText() const final;
- void reattach(StyleRuleBase&) final { }
-
- String m_encoding;
-};
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/css/CSSCharsetRule.idl (207766 => 207767)
--- trunk/Source/WebCore/css/CSSCharsetRule.idl 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/css/CSSCharsetRule.idl 2016-10-24 18:18:09 UTC (rev 207767)
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
- * Copyright (C) 2006 Samuel Weinig <sam.wei...@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-interface CSSCharsetRule : CSSRule {
- [SetterMayThrowException] attribute DOMString? encoding;
-};
Modified: trunk/Source/WebCore/css/CSSPropertySourceData.h (207766 => 207767)
--- trunk/Source/WebCore/css/CSSPropertySourceData.h 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/css/CSSPropertySourceData.h 2016-10-24 18:18:09 UTC (rev 207767)
@@ -83,7 +83,6 @@
enum Type {
UNKNOWN_RULE,
STYLE_RULE,
- CHARSET_RULE,
IMPORT_RULE,
MEDIA_RULE,
FONT_FACE_RULE,
Modified: trunk/Source/WebCore/css/CSSStyleSheet.cpp (207766 => 207767)
--- trunk/Source/WebCore/css/CSSStyleSheet.cpp 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/css/CSSStyleSheet.cpp 2016-10-24 18:18:09 UTC (rev 207767)
@@ -21,7 +21,6 @@
#include "config.h"
#include "CSSStyleSheet.h"
-#include "CSSCharsetRule.h"
#include "CSSFontFaceRule.h"
#include "CSSImportRule.h"
#include "CSSKeyframesRule.h"
@@ -245,13 +244,8 @@
ASSERT(m_childRuleCSSOMWrappers.size() == ruleCount);
RefPtr<CSSRule>& cssRule = m_childRuleCSSOMWrappers[index];
- if (!cssRule) {
- if (index == 0 && m_contents->hasCharsetRule()) {
- ASSERT(!m_contents->ruleAt(0));
- cssRule = CSSCharsetRule::create(this, m_contents->encodingFromCharsetRule());
- } else
- cssRule = m_contents->ruleAt(index)->createCSSOMWrapper(this);
- }
+ if (!cssRule)
+ cssRule = m_contents->ruleAt(index)->createCSSOMWrapper(this);
return cssRule.get();
}
@@ -274,15 +268,11 @@
if (!canAccessRules())
return nullptr;
// IE behavior.
- RefPtr<StaticCSSRuleList> nonCharsetRules = StaticCSSRuleList::create();
+ RefPtr<StaticCSSRuleList> ruleList = StaticCSSRuleList::create();
unsigned ruleCount = length();
- for (unsigned i = 0; i < ruleCount; ++i) {
- CSSRule* rule = item(i);
- if (rule->type() == CSSRule::CHARSET_RULE)
- continue;
- nonCharsetRules->rules().append(rule);
- }
- return nonCharsetRules;
+ for (unsigned i = 0; i < ruleCount; ++i)
+ ruleList->rules().append(item(i));
+ return ruleList;
}
ExceptionOr<unsigned> CSSStyleSheet::deprecatedInsertRule(const String& ruleString)
Modified: trunk/Source/WebCore/css/CSSStyleSheet.h (207766 => 207767)
--- trunk/Source/WebCore/css/CSSStyleSheet.h 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/css/CSSStyleSheet.h 2016-10-24 18:18:09 UTC (rev 207767)
@@ -32,7 +32,6 @@
namespace WebCore {
-class CSSCharsetRule;
class CSSImportRule;
class CSSParser;
class CSSRule;
Modified: trunk/Source/WebCore/css/StyleRule.cpp (207766 => 207767)
--- trunk/Source/WebCore/css/StyleRule.cpp 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/css/StyleRule.cpp 2016-10-24 18:18:09 UTC (rev 207767)
@@ -22,7 +22,6 @@
#include "config.h"
#include "StyleRule.h"
-#include "CSSCharsetRule.h"
#include "CSSFontFaceRule.h"
#include "CSSImportRule.h"
#include "CSSKeyframeRule.h"
@@ -96,8 +95,10 @@
case Keyframe:
delete downcast<StyleKeyframe>(this);
return;
+ case Charset:
+ delete downcast<StyleRuleCharset>(this);
+ return;
case Unknown:
- case Charset:
#if !ENABLE(CSS_REGIONS)
case Region:
#endif
Modified: trunk/Source/WebCore/css/StyleRule.h (207766 => 207767)
--- trunk/Source/WebCore/css/StyleRule.h 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/css/StyleRule.h 2016-10-24 18:18:09 UTC (rev 207767)
@@ -350,3 +350,7 @@
static bool isType(const WebCore::StyleRuleBase& rule) { return rule.isKeyframeRule(); }
SPECIALIZE_TYPE_TRAITS_END()
+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::StyleRuleCharset)
+static bool isType(const WebCore::StyleRuleBase& rule) { return rule.isCharsetRule(); }
+SPECIALIZE_TYPE_TRAITS_END()
+
Modified: trunk/Source/WebCore/css/StyleSheetContents.cpp (207766 => 207767)
--- trunk/Source/WebCore/css/StyleSheetContents.cpp 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/css/StyleSheetContents.cpp 2016-10-24 18:18:09 UTC (rev 207767)
@@ -160,11 +160,6 @@
ASSERT_WITH_SECURITY_IMPLICATION(index < ruleCount());
unsigned childVectorIndex = index;
- if (hasCharsetRule()) {
- if (index == 0)
- return 0;
- --childVectorIndex;
- }
if (childVectorIndex < m_importRules.size())
return m_importRules[childVectorIndex].get();
@@ -175,7 +170,6 @@
unsigned StyleSheetContents::ruleCount() const
{
unsigned result = 0;
- result += hasCharsetRule() ? 1 : 0;
result += m_importRules.size();
result += m_childRules.size();
return result;
@@ -212,15 +206,6 @@
ASSERT(!rule->isCharsetRule());
unsigned childVectorIndex = index;
- // m_childRules does not contain @charset which is always in index 0 if it exists.
- if (hasCharsetRule()) {
- if (childVectorIndex == 0) {
- // Nothing can be inserted before @charset.
- return false;
- }
- --childVectorIndex;
- }
-
if (childVectorIndex < m_importRules.size() || (childVectorIndex == m_importRules.size() && rule->isImportRule())) {
// Inserting non-import rule before @import is not allowed.
if (!is<StyleRuleImport>(rule))
@@ -250,13 +235,6 @@
ASSERT_WITH_SECURITY_IMPLICATION(index < ruleCount());
unsigned childVectorIndex = index;
- if (hasCharsetRule()) {
- if (childVectorIndex == 0) {
- clearCharsetRule();
- return;
- }
- --childVectorIndex;
- }
if (childVectorIndex < m_importRules.size()) {
m_importRules[childVectorIndex]->clearParentStyleSheet();
m_importRules.remove(childVectorIndex);
Modified: trunk/Source/WebCore/css/StyleSheetContents.h (207766 => 207767)
--- trunk/Source/WebCore/css/StyleSheetContents.h 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/css/StyleSheetContents.h 2016-10-24 18:18:09 UTC (rev 207767)
@@ -100,7 +100,6 @@
void clearRules();
- bool hasCharsetRule() const { return !m_encodingFromCharsetRule.isNull(); }
String encodingFromCharsetRule() const { return m_encodingFromCharsetRule; }
// Rules other than @charset and @import.
const Vector<RefPtr<StyleRuleBase>>& childRules() const { return m_childRules; }
Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp (207766 => 207767)
--- trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp 2016-10-24 18:18:09 UTC (rev 207767)
@@ -195,12 +195,8 @@
RefPtr<StaticCSSRuleList> list = StaticCSSRuleList::create();
Vector<RefPtr<CSSRule>>& listRules = list->rules();
- for (unsigned i = 0, size = styleSheet->length(); i < size; ++i) {
- CSSRule* item = styleSheet->item(i);
- if (item->type() == CSSRule::CHARSET_RULE)
- continue;
- listRules.append(item);
- }
+ for (unsigned i = 0, size = styleSheet->length(); i < size; ++i)
+ listRules.append(styleSheet->item(i));
return WTFMove(list);
}
Modified: trunk/Source/WebKit/mac/ChangeLog (207766 => 207767)
--- trunk/Source/WebKit/mac/ChangeLog 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebKit/mac/ChangeLog 2016-10-24 18:18:09 UTC (rev 207767)
@@ -1,3 +1,13 @@
+2016-10-24 Dave Hyatt <hy...@apple.com>
+
+ Remove CSSCharsetRule from the CSS OM
+ https://bugs.webkit.org/show_bug.cgi?id=163891
+
+ Reviewed by Darin Adler.
+
+ * DOM/DOMCSSCharsetRule.mm:
+ (-[DOMCSSCharsetRule encoding]):
+
2016-10-24 Youenn Fablet <you...@apple.com>
Activate WEB_RTC compilation flags for Mac bots
Modified: trunk/Source/WebKit/mac/DOM/DOMCSSCharsetRule.mm (207766 => 207767)
--- trunk/Source/WebKit/mac/DOM/DOMCSSCharsetRule.mm 2016-10-24 18:12:01 UTC (rev 207766)
+++ trunk/Source/WebKit/mac/DOM/DOMCSSCharsetRule.mm 2016-10-24 18:18:09 UTC (rev 207767)
@@ -25,7 +25,6 @@
#import "DOMCSSCharsetRule.h"
-#import <WebCore/CSSCharsetRule.h>
#import "DOMCSSRuleInternal.h"
#import "DOMNodeInternal.h"
#import "ExceptionHandlers.h"
@@ -35,14 +34,14 @@
#import <WebCore/WebScriptObjectPrivate.h>
#import <wtf/GetPtr.h>
-#define IMPL static_cast<WebCore::CSSCharsetRule*>(reinterpret_cast<WebCore::CSSRule*>(_internal))
-
@implementation DOMCSSCharsetRule
- (NSString *)encoding
{
WebCore::JSMainThreadNullState state;
- return IMPL->encoding();
+
+ // This has been removed from the CSS OM, so we're just keeping this around to not crash.
+ return nil;
}
@end