Title: [193527] branches/safari-601-branch

Diff

Modified: branches/safari-601-branch/LayoutTests/ChangeLog (193526 => 193527)


--- branches/safari-601-branch/LayoutTests/ChangeLog	2015-12-05 19:54:25 UTC (rev 193526)
+++ branches/safari-601-branch/LayoutTests/ChangeLog	2015-12-05 19:54:32 UTC (rev 193527)
@@ -1,5 +1,29 @@
 2015-12-05  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r191178. rdar://problem/23772788
+
+    2015-10-16  David Hyatt  <hy...@apple.com>
+
+            Implement the "all" CSS property.
+            https://bugs.webkit.org/show_bug.cgi?id=116966
+
+            Reviewed by Zalan Bujtas.
+
+            Added tests for the "all property, including a variables test!
+
+            * fast/css/all-keyword-direction-expected.html: Added.
+            * fast/css/all-keyword-direction.html: Added.
+            * fast/css/all-keyword-inherit-expected.html: Added.
+            * fast/css/all-keyword-inherit.html: Added.
+            * fast/css/all-keyword-initial-expected.html: Added.
+            * fast/css/all-keyword-initial.html: Added.
+            * fast/css/all-keyword-unset-expected.html: Added.
+            * fast/css/all-keyword-unset.html: Added.
+            * fast/css/variables/all-keyword-unset-expected.html: Added.
+            * fast/css/variables/all-keyword-unset.html: Added.
+
+2015-12-05  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r191151. rdar://problem/23772904
 
     2015-10-15  David Hyatt  <hy...@apple.com>

Added: branches/safari-601-branch/LayoutTests/fast/css/all-keyword-direction-expected.html (0 => 193527)


--- branches/safari-601-branch/LayoutTests/fast/css/all-keyword-direction-expected.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/all-keyword-direction-expected.html	2015-12-05 19:54:32 UTC (rev 193527)
@@ -0,0 +1,13 @@
+<head>
+<style>
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+}
+
+span { direction:rtl; }
+</style>
+</head>
+<body>
+<span id="quote">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</span> Phasellus eget velit sagittis.
\ No newline at end of file

Added: branches/safari-601-branch/LayoutTests/fast/css/all-keyword-direction.html (0 => 193527)


--- branches/safari-601-branch/LayoutTests/fast/css/all-keyword-direction.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/all-keyword-direction.html	2015-12-05 19:54:32 UTC (rev 193527)
@@ -0,0 +1,18 @@
+<head>
+<style>
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+}
+
+blockquote {
+  background-color: skyblue;
+  color: red;
+  direction:rtl;
+  all: unset;
+}
+</style>
+</head>
+<body>
+<blockquote id="quote">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</blockquote> Phasellus eget velit sagittis.
\ No newline at end of file

Added: branches/safari-601-branch/LayoutTests/fast/css/all-keyword-inherit-expected.html (0 => 193527)


--- branches/safari-601-branch/LayoutTests/fast/css/all-keyword-inherit-expected.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/all-keyword-inherit-expected.html	2015-12-05 19:54:32 UTC (rev 193527)
@@ -0,0 +1,11 @@
+<head>
+<style>
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+}
+</style>
+</head>
+<body>
+<div id="quote">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div> Phasellus eget velit sagittis.
\ No newline at end of file

Added: branches/safari-601-branch/LayoutTests/fast/css/all-keyword-inherit.html (0 => 193527)


--- branches/safari-601-branch/LayoutTests/fast/css/all-keyword-inherit.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/all-keyword-inherit.html	2015-12-05 19:54:32 UTC (rev 193527)
@@ -0,0 +1,18 @@
+<head>
+<style>
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+}
+
+blockquote {
+  background-color: skyblue;
+  color: red;
+  all:inherit;
+}
+</style>
+</head>
+<body>
+<div>
+<blockquote id="quote">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</blockquote> Phasellus eget velit sagittis.
\ No newline at end of file

Added: branches/safari-601-branch/LayoutTests/fast/css/all-keyword-initial-expected.html (0 => 193527)


--- branches/safari-601-branch/LayoutTests/fast/css/all-keyword-initial-expected.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/all-keyword-initial-expected.html	2015-12-05 19:54:32 UTC (rev 193527)
@@ -0,0 +1,13 @@
+<head>
+<style>
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+}
+
+span { font: initial; color:initial }
+</style>
+</head>
+<body>
+<span>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</span> Phasellus eget velit sagittis.
\ No newline at end of file

Added: branches/safari-601-branch/LayoutTests/fast/css/all-keyword-initial.html (0 => 193527)


--- branches/safari-601-branch/LayoutTests/fast/css/all-keyword-initial.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/all-keyword-initial.html	2015-12-05 19:54:32 UTC (rev 193527)
@@ -0,0 +1,17 @@
+<head>
+<style>
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+}
+
+blockquote {
+  background-color: skyblue;
+  color: red;
+  all: initial;
+}
+</style>
+</head>
+<body>
+<blockquote id="quote">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</blockquote> Phasellus eget velit sagittis.
\ No newline at end of file

Added: branches/safari-601-branch/LayoutTests/fast/css/all-keyword-unset-expected.html (0 => 193527)


--- branches/safari-601-branch/LayoutTests/fast/css/all-keyword-unset-expected.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/all-keyword-unset-expected.html	2015-12-05 19:54:32 UTC (rev 193527)
@@ -0,0 +1,11 @@
+<head>
+<style>
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+}
+</style>
+</head>
+<body>
+<span id="quote">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</span> Phasellus eget velit sagittis.
\ No newline at end of file

Added: branches/safari-601-branch/LayoutTests/fast/css/all-keyword-unset.html (0 => 193527)


--- branches/safari-601-branch/LayoutTests/fast/css/all-keyword-unset.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/all-keyword-unset.html	2015-12-05 19:54:32 UTC (rev 193527)
@@ -0,0 +1,17 @@
+<head>
+<style>
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+}
+
+blockquote {
+  background-color: skyblue;
+  color: red;
+  all: unset;
+}
+</style>
+</head>
+<body>
+<blockquote id="quote">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</blockquote> Phasellus eget velit sagittis.
\ No newline at end of file

Added: branches/safari-601-branch/LayoutTests/fast/css/variables/all-keyword-unset-expected.html (0 => 193527)


--- branches/safari-601-branch/LayoutTests/fast/css/variables/all-keyword-unset-expected.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/variables/all-keyword-unset-expected.html	2015-12-05 19:54:32 UTC (rev 193527)
@@ -0,0 +1,11 @@
+<head>
+<style>
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+}
+</style>
+</head>
+<body>
+<span id="quote">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</span> Phasellus eget velit sagittis.
\ No newline at end of file

Added: branches/safari-601-branch/LayoutTests/fast/css/variables/all-keyword-unset.html (0 => 193527)


--- branches/safari-601-branch/LayoutTests/fast/css/variables/all-keyword-unset.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/variables/all-keyword-unset.html	2015-12-05 19:54:32 UTC (rev 193527)
@@ -0,0 +1,18 @@
+<head>
+<style>
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+  --a: unset;
+}
+
+blockquote {
+  background-color: skyblue;
+  color: red;
+  all: var(--a);
+}
+</style>
+</head>
+<body>
+<blockquote id="quote">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</blockquote> Phasellus eget velit sagittis.
\ No newline at end of file

Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (193526 => 193527)


--- branches/safari-601-branch/Source/WebCore/ChangeLog	2015-12-05 19:54:25 UTC (rev 193526)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog	2015-12-05 19:54:32 UTC (rev 193527)
@@ -1,5 +1,45 @@
 2015-12-05  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r191178. rdar://problem/23772788
+
+    2015-10-16  David Hyatt  <hy...@apple.com>
+
+            Implement the "all" CSS property.
+            https://bugs.webkit.org/show_bug.cgi?id=116966
+
+            Reviewed by Zalan Bujtas.
+
+            Added new tests in fast/css.
+
+            * css/CSSComputedStyleDeclaration.cpp:
+            (WebCore::ComputedStyleExtractor::propertyValue):
+            Don't support "all" from computed style for now.
+
+            * css/CSSParser.cpp:
+            (WebCore::CSSParser::parseValue):
+            Make sure to bail after checking inherit/unset/initial for all, since you can't actually
+            accept longhand values in the shorthand declarations.
+
+            (WebCore::CSSParser::parseAnimationProperty):
+            "all" for animations is a special value and should not be confused with the property. It
+            animates everything and does not omit unicode-bidi/direction the way the "all" property does.
+
+            * css/CSSPropertyNames.in:
+            Add the "all" property to the list and use a special keyword in the Longhands value, "all",
+            that makeprop.pl will look for. This way we don't have to dump every single CSS property
+            into the Longhands _expression_, since that would be nuts.
+
+            * css/StyleProperties.cpp:
+            (WebCore::StyleProperties::getPropertyValue):
+            Look for a common value across all properties supported by "all". That way you can get
+            back inherit/initial/unset from it.
+
+            * css/makeprop.pl:
+            Make the perl script look for "all" in the longhand list, and if it sees it, put every
+            single CSS property into the list for the all shorthand.
+
+2015-12-05  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r191155. rdar://problem/23772908
 
     2015-10-15  David Hyatt  <hy...@apple.com>

Modified: branches/safari-601-branch/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (193526 => 193527)


--- branches/safari-601-branch/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2015-12-05 19:54:25 UTC (rev 193526)
+++ branches/safari-601-branch/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2015-12-05 19:54:32 UTC (rev 193527)
@@ -3239,6 +3239,7 @@
             return zoomAdjustedPixelValueForLength(style->svgStyle().y(), *style);
 
         /* Unimplemented CSS 3 properties (including CSS3 shorthand properties) */
+        case CSSPropertyAll:
         case CSSPropertyAnimation:
         case CSSPropertyWebkitTextEmphasis:
         case CSSPropertyTextLineThrough:

Modified: branches/safari-601-branch/Source/WebCore/css/CSSParser.cpp (193526 => 193527)


--- branches/safari-601-branch/Source/WebCore/css/CSSParser.cpp	2015-12-05 19:54:25 UTC (rev 193526)
+++ branches/safari-601-branch/Source/WebCore/css/CSSParser.cpp	2015-12-05 19:54:32 UTC (rev 193527)
@@ -1954,6 +1954,9 @@
         addExpandedPropertyForValue(propId, cssValuePool.createUnsetValue(), important);
         return true;
     }
+    
+    if (propId == CSSPropertyAll)
+        return false; // "all" doesn't allow you to specify anything other than inherit/initial/unset.
 
     if (isKeywordPropertyID(propId)) {
         if (!isValidKeywordPropertyAndValue(propId, id, m_context, m_styleSheet))
@@ -5053,7 +5056,7 @@
     if (value.unit != CSSPrimitiveValue::CSS_IDENT)
         return nullptr;
     CSSPropertyID result = cssPropertyID(value.string);
-    if (result)
+    if (result && result != CSSPropertyAll) // "all" value in animation is not equivalent to the all property.
         return cssValuePool().createIdentifierValue(result);
     if (equalIgnoringCase(value, "all")) {
         context.sawAnimationPropertyKeyword();

Modified: branches/safari-601-branch/Source/WebCore/css/CSSPropertyNames.in (193526 => 193527)


--- branches/safari-601-branch/Source/WebCore/css/CSSPropertyNames.in	2015-12-05 19:54:25 UTC (rev 193526)
+++ branches/safari-601-branch/Source/WebCore/css/CSSPropertyNames.in	2015-12-05 19:54:32 UTC (rev 193527)
@@ -125,6 +125,7 @@
 
 // The remaining properties are listed in alphabetical order
 alignment-baseline [SVG]
+all [Longhands=all]
 animation [Longhands=animation-name|animation-duration|animation-timing-function|animation-delay|animation-iteration-count|animation-direction|animation-fill-mode]
 animation-delay [AnimationProperty, NameForMethods=Delay]
 animation-direction [AnimationProperty, NameForMethods=Direction]

Modified: branches/safari-601-branch/Source/WebCore/css/StyleProperties.cpp (193526 => 193527)


--- branches/safari-601-branch/Source/WebCore/css/StyleProperties.cpp	2015-12-05 19:54:25 UTC (rev 193526)
+++ branches/safari-601-branch/Source/WebCore/css/StyleProperties.cpp	2015-12-05 19:54:32 UTC (rev 193527)
@@ -127,6 +127,8 @@
 
     // Shorthand and 4-values properties
     switch (propertyID) {
+    case CSSPropertyAll:
+        return getCommonValue(allShorthand());
     case CSSPropertyAnimation:
         return getLayeredShorthandValue(animationShorthand());
     case CSSPropertyBorderSpacing:

Modified: branches/safari-601-branch/Source/WebCore/css/makeprop.pl (193526 => 193527)


--- branches/safari-601-branch/Source/WebCore/css/makeprop.pl	2015-12-05 19:54:25 UTC (rev 193526)
+++ branches/safari-601-branch/Source/WebCore/css/makeprop.pl	2015-12-05 19:54:32 UTC (rev 193527)
@@ -960,9 +960,19 @@
   print SHORTHANDS_CPP "{\n";
   print SHORTHANDS_CPP "    static const CSSPropertyID " . $lowercaseId . "Properties[] = {\n";
   foreach (@longhands) {
-    die "Unknown CSS property used in Longhands: " . $nameToId{$_} if !exists($nameToId{$_});
-    push(@{$longhandToShorthands{$_}}, $name);
-    print SHORTHANDS_CPP "        CSSProperty" . $nameToId{$_} . ",\n";
+    if ($_ eq "all") {
+        foreach my $propname (@names) {
+            next if (exists $propertiesWithStyleBuilderOptions{$propname}{"Longhands"});
+            next if ($propname eq "direction" || $propname eq "unicode-bidi");
+            die "Unknown CSS property used in all shorthand: " . $nameToId{$propname} if !exists($nameToId{$propname});
+            push(@{$longhandToShorthands{$propname}}, $name);
+            print SHORTHANDS_CPP "        CSSProperty" . $nameToId{$propname} . ",\n";
+        }
+    } else {
+        die "Unknown CSS property used in Longhands: " . $nameToId{$_} if !exists($nameToId{$_});
+        push(@{$longhandToShorthands{$_}}, $name);
+        print SHORTHANDS_CPP "        CSSProperty" . $nameToId{$_} . ",\n";
+    }
   }
   print SHORTHANDS_CPP "    };\n";
   print SHORTHANDS_CPP "    return StylePropertyShorthand(CSSProperty" . $nameToId{$name} . ", " . $lowercaseId . "Properties);\n";
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to