Title: [212602] trunk/Source/WebCore
Revision
212602
Author
simon.fra...@apple.com
Date
2017-02-17 22:41:48 -0800 (Fri, 17 Feb 2017)

Log Message

Allow properties in CSSProperties.json that don't trigger code generation
https://bugs.webkit.org/show_bug.cgi?id=168535

Reviewed by Sam Weinig.

In order to track the development of CSS properties that we have not yet implemented,
support '"skip-codegen" : true' in "codegen-properties".

Test by adding a few fill-related properties with this attribute.

* css/CSSProperties.json:
* css/makeprop.pl:
(isPropertyEnabled):
(addProperty):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (212601 => 212602)


--- trunk/Source/WebCore/ChangeLog	2017-02-18 01:13:01 UTC (rev 212601)
+++ trunk/Source/WebCore/ChangeLog	2017-02-18 06:41:48 UTC (rev 212602)
@@ -1,3 +1,20 @@
+2017-02-17  Simon Fraser  <simon.fra...@apple.com>
+
+        Allow properties in CSSProperties.json that don't trigger code generation
+        https://bugs.webkit.org/show_bug.cgi?id=168535
+
+        Reviewed by Sam Weinig.
+        
+        In order to track the development of CSS properties that we have not yet implemented,
+        support '"skip-codegen" : true' in "codegen-properties".
+
+        Test by adding a few fill-related properties with this attribute.
+
+        * css/CSSProperties.json:
+        * css/makeprop.pl:
+        (isPropertyEnabled):
+        (addProperty):
+
 2017-02-17  Brian Burg  <bb...@apple.com>
 
         Web Inspector: RTL: Inspector window should dock to the left when using RTL layout direction

Modified: trunk/Source/WebCore/css/CSSProperties.json (212601 => 212602)


--- trunk/Source/WebCore/css/CSSProperties.json	2017-02-18 01:13:01 UTC (rev 212601)
+++ trunk/Source/WebCore/css/CSSProperties.json	2017-02-18 06:41:48 UTC (rev 212602)
@@ -4200,6 +4200,26 @@
             "codegen-properties": {
                 "enable-if": "ENABLE_APPLE_PAY"
             }
+        },
+        "fill-color" : {
+            "codegen-properties": {
+                "skip-codegen": true
+            }
+        },
+        "fill-image" : {
+            "codegen-properties": {
+                "skip-codegen": true
+            }
+        },
+        "fill-origin" : {
+            "codegen-properties": {
+                "skip-codegen": true
+            }
+        },
+        "fill-position" : {
+            "codegen-properties": {
+                "skip-codegen": true
+            }
         }
     }
 }

Modified: trunk/Source/WebCore/css/makeprop.pl (212601 => 212602)


--- trunk/Source/WebCore/css/makeprop.pl	2017-02-18 01:13:01 UTC (rev 212601)
+++ trunk/Source/WebCore/css/makeprop.pl	2017-02-18 06:41:48 UTC (rev 212602)
@@ -106,9 +106,16 @@
 sub isPropertyEnabled($)
 {
     my ($optionsHashRef) = @_;
-    if (!$optionsHashRef->{"codegen-properties"} || !$optionsHashRef->{"codegen-properties"}{"enable-if"}) {
+
+    if (!exists($optionsHashRef->{"codegen-properties"})) {
         return 1;
     }
+    if ($optionsHashRef->{"codegen-properties"}{"skip-codegen"}) {
+        return 0;
+    }
+    if (!exists($optionsHashRef->{"codegen-properties"}{"enable-if"})) {
+        return 1;
+    }
     if (exists($defines{$optionsHashRef->{"codegen-properties"}{"enable-if"}})) {
         return 1;
     }
@@ -134,6 +141,8 @@
             for my $codegenOptionName (keys %$codegenProperties) {
                 if ($codegenOptionName eq "enable-if") {
                     next;
+                } elsif ($codegenOptionName eq "skip-codegen") {
+                    next;
                 } elsif ($codegenOptionName eq "high-priority") {
                     $nameIsHighPriority{$name} = 1;
                 } elsif ($codegenOptionName eq "aliases") {
@@ -144,7 +153,7 @@
                     # internal-only properties exist to make it easier to parse compound properties (e.g. background-repeat) as if they were shorthands.
                     push @internalProprerties, $name
                 } else {
-                    die "Unrecognized codegen property \"$optionName\" for $name property.";
+                    die "Unrecognized codegen property \"$codegenOptionName\" for $name property.";
                 }
             }
         } elsif ($optionName eq "animatable") {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to