Title: [268962] trunk
Revision
268962
Author
wei...@apple.com
Date
2020-10-25 18:57:09 -0700 (Sun, 25 Oct 2020)

Log Message

Remove non-standard 'css'/'Css' prefixed properties on CSSStyleDeclaration
https://bugs.webkit.org/show_bug.cgi?id=218158

Reviewed by Simon Fraser.

Source/WebCore:

Remove support for 'css'/'Css' prefixed properties of CSSStyleDeclaration which
are no longer supported by any other browser.

* css/CSSStyleDeclaration.cpp:
* css/makeprop.pl:

LayoutTests:

* fast/dom/CSSStyleDeclaration/css-properties-case-sensitive-expected.txt:
* fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html:
Update test to reflect removal of css prefixes.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (268961 => 268962)


--- trunk/LayoutTests/ChangeLog	2020-10-25 21:43:54 UTC (rev 268961)
+++ trunk/LayoutTests/ChangeLog	2020-10-26 01:57:09 UTC (rev 268962)
@@ -1,3 +1,14 @@
+2020-10-25  Sam Weinig  <wei...@apple.com>
+
+        Remove non-standard 'css'/'Css' prefixed properties on CSSStyleDeclaration
+        https://bugs.webkit.org/show_bug.cgi?id=218158
+
+        Reviewed by Simon Fraser.
+
+        * fast/dom/CSSStyleDeclaration/css-properties-case-sensitive-expected.txt:
+        * fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html:
+        Update test to reflect removal of css prefixes.
+
 2020-10-25  Emilio Cobos Álvarez  <emi...@crisal.io>
 
         Update CSSOM WPT tests.

Modified: trunk/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive-expected.txt (268961 => 268962)


--- trunk/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive-expected.txt	2020-10-25 21:43:54 UTC (rev 268961)
+++ trunk/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive-expected.txt	2020-10-26 01:57:09 UTC (rev 268962)
@@ -3,17 +3,8 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-normal cases
-
 PASS element.style.zIndex is '1'
 PASS element.style.ZIndex is undefined.
-
-"css" prefix
-
-PASS element.style.cssZIndex is '1'
-PASS element.style.CssZIndex is '1'
-PASS element.style.CsszIndex is undefined.
-PASS element.style.csszIndex is undefined.
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html (268961 => 268962)


--- trunk/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html	2020-10-25 21:43:54 UTC (rev 268961)
+++ trunk/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html	2020-10-26 01:57:09 UTC (rev 268962)
@@ -12,21 +12,9 @@
 var element = document.createElement('a');
 element.style.zIndex = 1;
 
-debug('normal cases');
-debug('');
-
 shouldBe("element.style.zIndex", "'1'");
 shouldBeUndefined("element.style.ZIndex");
 
-debug('');
-debug('"css" prefix');
-debug('');
-
-shouldBe("element.style.cssZIndex", "'1'");
-shouldBe("element.style.CssZIndex", "'1'");
-shouldBeUndefined("element.style.CsszIndex");
-shouldBeUndefined("element.style.csszIndex");
-
 </script>
 <script src=""
 </body>

Modified: trunk/Source/WebCore/ChangeLog (268961 => 268962)


--- trunk/Source/WebCore/ChangeLog	2020-10-25 21:43:54 UTC (rev 268961)
+++ trunk/Source/WebCore/ChangeLog	2020-10-26 01:57:09 UTC (rev 268962)
@@ -1,3 +1,16 @@
+2020-10-25  Sam Weinig  <wei...@apple.com>
+
+        Remove non-standard 'css'/'Css' prefixed properties on CSSStyleDeclaration
+        https://bugs.webkit.org/show_bug.cgi?id=218158
+
+        Reviewed by Simon Fraser.
+
+        Remove support for 'css'/'Css' prefixed properties of CSSStyleDeclaration which
+        are no longer supported by any other browser.
+
+        * css/CSSStyleDeclaration.cpp:
+        * css/makeprop.pl:
+
 2020-10-25  Simon Fraser  <simon.fra...@apple.com>
 
         [LFC Display] Move code for painting a single Display::Box into its own class

Modified: trunk/Source/WebCore/css/CSSStyleDeclaration.cpp (268961 => 268962)


--- trunk/Source/WebCore/css/CSSStyleDeclaration.cpp	2020-10-25 21:43:54 UTC (rev 268961)
+++ trunk/Source/WebCore/css/CSSStyleDeclaration.cpp	2020-10-26 01:57:09 UTC (rev 268962)
@@ -44,7 +44,6 @@
 enum class PropertyNamePrefix {
     None,
     Epub,
-    CSS,
     WebKit
 };
 
@@ -85,10 +84,6 @@
     // First character of the prefix within the property name may be upper or lowercase.
     UChar firstChar = toASCIILower(propertyName[0]);
     switch (firstChar) {
-    case 'c':
-        if (matchesCSSPropertyNamePrefix(propertyName, "css"))
-            return PropertyNamePrefix::CSS;
-        break;
     case 'e':
         if (matchesCSSPropertyNamePrefix(propertyName, "epub"))
             return PropertyNamePrefix::Epub;
@@ -149,7 +144,6 @@
     const char* name = bufferPtr;
 
     unsigned i = 0;
-    // Prefix CSS is ignored.
     // Prefix Webkit becomes "-webkit-".
     // Prefix Epub becomes "-epub-".
     switch (propertyNamePrefix(*propertyNameString)) {
@@ -157,9 +151,6 @@
         if (isASCIIUpper((*propertyNameString)[0]))
             return propertyID;
         break;
-    case PropertyNamePrefix::CSS:
-        i += 3;
-        break;
     case PropertyNamePrefix::Epub:
         writeEpubPrefix(bufferPtr);
         i += 4;

Modified: trunk/Source/WebCore/css/makeprop.pl (268961 => 268962)


--- trunk/Source/WebCore/css/makeprop.pl	2020-10-25 21:43:54 UTC (rev 268961)
+++ trunk/Source/WebCore/css/makeprop.pl	2020-10-26 01:57:09 UTC (rev 268962)
@@ -1501,27 +1501,6 @@
 }
 
 print CSS_STYLE_DECLARATION_PROPERTY_NAMES_IDL << "EOF";
-
-    // Non-standard. Adds an additional variant of all properties not starting with -webkit- or -epub-
-    // that is the property name prefixed by css and Css.
-    // Example top -> element.style.cssTop
-    // Example top -> element.style.CssTop
-EOF
-foreach my $nameOrAlias (grep { $_ !~ /^\-webkit\-|^\-epub\-/ } @namesAndAliases) {
-    my $camelCasedAttributeName = cssPropertyToIDLAttribute($nameOrAlias, 0, 1);
-    my $name = $namesAndAliasesToName{$nameOrAlias};
-    my $propertyId = $nameToId{$namesAndAliasesToName{$name}};
-    
-    my @extendedAttributeValues = ("CSSProperty=${propertyId}");
-    push(@extendedAttributeValues, "EnabledBySetting=${settingsFlags{$name}}") if $settingsFlags{$name};
-    push(@extendedAttributeValues, "EnabledAtRuntime=${runtimeFlags{$name}}") if $runtimeFlags{$name};
-    my $extendedAttributes = join(", ", @extendedAttributeValues);
-
-    print CSS_STYLE_DECLARATION_PROPERTY_NAMES_IDL "    [CEReactions, ${extendedAttributes}] attribute [LegacyNullToEmptyString] CSSOMString css${camelCasedAttributeName};\n" unless $camelCasedAttributeName eq "Float";
-    print CSS_STYLE_DECLARATION_PROPERTY_NAMES_IDL "    [CEReactions, ${extendedAttributes}] attribute [LegacyNullToEmptyString] CSSOMString Css${camelCasedAttributeName};\n" unless $camelCasedAttributeName eq "Float";
-}
-
-print CSS_STYLE_DECLARATION_PROPERTY_NAMES_IDL << "EOF";
 };
 EOF
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to