Revert r210882, removing support for background-repeat-x/y
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2017 17:42:44 +0000 (17:42 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2017 17:42:44 +0000 (17:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=167223

Reviewed by Myles Maxfield.
Source/WebCore:

CSSPropertyBackgroundRepeatX and CSSPropertyBackgroundRepeatY only exist to make it easier
to parse CSSPropertyBackgroundRepeat as if it were a shorthand; they were never intended to
be web-exposed. r210882 mistakenly expose them to the web, so undo that patch, and annotate
the properties in CSSProperties.json with a flag which indicates their special status.

In addition, remove background-repeat-x/y from the list of properties allowed in video cues,
since these are not valid properties.

* css/CSSProperties.json:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::isValidCueStyleProperty):
* css/makeprop.pl:
(addProperty):
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

LayoutTests:

Modify the test to check that background-repeat-x and background-repeat-y are not parsed.

* fast/backgrounds/background-repeat-x-y-parse-expected.txt:
* fast/backgrounds/background-repeat-x-y-parse.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211149 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/css/CSSProperties.json
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/makeprop.pl

index 2d36d69..9e29a18 100644 (file)
@@ -1,3 +1,15 @@
+2017-01-25  Simon Fraser  <simon.fraser@apple.com>
+
+        Revert r210882, removing support for background-repeat-x/y
+        https://bugs.webkit.org/show_bug.cgi?id=167223
+
+        Reviewed by Myles Maxfield.
+        
+        Modify the test to check that background-repeat-x and background-repeat-y are not parsed.
+
+        * fast/backgrounds/background-repeat-x-y-parse-expected.txt:
+        * fast/backgrounds/background-repeat-x-y-parse.html:
+
 2017-01-25  Youenn Fablet  <youenn@apple.com>
 
         Flaky Test: imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html
index 4dea886..b2cd344 100644 (file)
@@ -1,3 +1,26 @@
+2017-01-25  Simon Fraser  <simon.fraser@apple.com>
+
+        Revert r210882, removing support for background-repeat-x/y
+        https://bugs.webkit.org/show_bug.cgi?id=167223
+
+        Reviewed by Myles Maxfield.
+
+        CSSPropertyBackgroundRepeatX and CSSPropertyBackgroundRepeatY only exist to make it easier
+        to parse CSSPropertyBackgroundRepeat as if it were a shorthand; they were never intended to
+        be web-exposed. r210882 mistakenly expose them to the web, so undo that patch, and annotate
+        the properties in CSSProperties.json with a flag which indicates their special status.
+
+        In addition, remove background-repeat-x/y from the list of properties allowed in video cues,
+        since these are not valid properties.
+
+        * css/CSSProperties.json:
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::isValidCueStyleProperty):
+        * css/makeprop.pl:
+        (addProperty):
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
+
 2017-01-25  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] UIProcess from WebKitGtk+ 2.15.x SIGSEGVs because of X Error BadDamage in WebKit::AcceleratedBackingStoreX11::update(WebKit::LayerTreeContext const&) () at Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreX11.cpp:145
index 1d9dd84..3ce5848 100644 (file)
         "background-repeat-x": {
             "codegen-properties": {
                 "name-for-methods": "RepeatX",
-                "fill-layer-property": true
+                "fill-layer-property": true,
+                "internal-only": true
             }
         },
         "background-repeat-y": {
             "codegen-properties": {
                 "name-for-methods": "RepeatY",
-                "fill-layer-property": true
+                "fill-layer-property": true,
+                "internal-only": true
             }
         },
         "background-size": {
         "-webkit-mask-repeat-x": {
             "codegen-properties": {
                 "name-for-methods": "RepeatX",
-                "fill-layer-property": true
+                "fill-layer-property": true,
+                "internal-only": true
             }
         },
         "-webkit-mask-repeat-y": {
             "codegen-properties": {
                 "name-for-methods": "RepeatY",
-                "fill-layer-property": true
+                "fill-layer-property": true,
+                "internal-only": true
             }
         },
         "-webkit-mask-size": {
index bfb9f90..c380fb1 100644 (file)
@@ -1483,8 +1483,6 @@ inline bool StyleResolver::isValidCueStyleProperty(CSSPropertyID id)
     case CSSPropertyBackgroundPositionX:
     case CSSPropertyBackgroundPositionY:
     case CSSPropertyBackgroundRepeat:
-    case CSSPropertyBackgroundRepeatX:
-    case CSSPropertyBackgroundRepeatY:
     case CSSPropertyBackgroundSize:
     case CSSPropertyColor:
     case CSSPropertyFont:
index e617c38..b4b0968 100755 (executable)
@@ -139,6 +139,8 @@ sub addProperty($$)
                     $nameToAliases{$name} = $codegenProperties->{"aliases"};
                 } elsif ($styleBuilderOptions{$codegenOptionName}) {
                     $propertiesWithStyleBuilderOptions{$name}{$codegenOptionName} = $codegenProperties->{$codegenOptionName};
+                } elsif ($codegenOptionName eq "internal-only") {
+                    # internal-only properties exist to make it easier to parse compound properties (e.g. background-repeat) as if they were shorthands. This doesn't currently affect codegen.
                 } else {
                     die "Unrecognized codegen property \"$optionName\" for $name property.";
                 }