Title: [209239] trunk
Revision
209239
Author
[email protected]
Date
2016-12-02 08:44:23 -0800 (Fri, 02 Dec 2016)

Log Message

[CSS Parser] Make sure margin and font set the implicit flag properly
https://bugs.webkit.org/show_bug.cgi?id=165306

Reviewed by Zalan Bujtas.

Source/WebCore:

* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::consumeFont):
(WebCore::CSSPropertyParser::consume4Values):

LayoutTests:

* TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (209238 => 209239)


--- trunk/LayoutTests/ChangeLog	2016-12-02 16:32:10 UTC (rev 209238)
+++ trunk/LayoutTests/ChangeLog	2016-12-02 16:44:23 UTC (rev 209239)
@@ -1,3 +1,12 @@
+2016-12-02  Dave Hyatt  <[email protected]>
+
+        [CSS Parser] Make sure margin and font set the implicit flag properly
+        https://bugs.webkit.org/show_bug.cgi?id=165306
+
+        Reviewed by Zalan Bujtas.
+
+        * TestExpectations:
+
 2016-12-01  Antoine Quint  <[email protected]>
 
         [Modern Media Controls] Fade controls in when entering and exiting fullscreen

Modified: trunk/LayoutTests/TestExpectations (209238 => 209239)


--- trunk/LayoutTests/TestExpectations	2016-12-02 16:32:10 UTC (rev 209238)
+++ trunk/LayoutTests/TestExpectations	2016-12-02 16:44:23 UTC (rev 209239)
@@ -1009,6 +1009,7 @@
 webkit.org/b/165195 fast/events/mouse-cursor.html [ Pass Failure ]
 webkit.org/b/165195 fast/forms/basic-selects.html [ Pass Failure ]
 webkit.org/b/165195 fast/shadow-dom/slotted-pseudo-element-css-text.html [ Pass Failure ]
+webkit.org/b/165195 fast/inspector-support/style.html [ Pass Failure ]
 
 # The following layout tests need to be changed when the new CSS Parser is turned on, since they
 # incorrectly indicate failures on valid syntax.

Modified: trunk/Source/WebCore/ChangeLog (209238 => 209239)


--- trunk/Source/WebCore/ChangeLog	2016-12-02 16:32:10 UTC (rev 209238)
+++ trunk/Source/WebCore/ChangeLog	2016-12-02 16:44:23 UTC (rev 209239)
@@ -1,5 +1,16 @@
 2016-12-02  Dave Hyatt  <[email protected]>
 
+        [CSS Parser] Make sure margin and font set the implicit flag properly
+        https://bugs.webkit.org/show_bug.cgi?id=165306
+
+        Reviewed by Zalan Bujtas.
+
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::CSSPropertyParser::consumeFont):
+        (WebCore::CSSPropertyParser::consume4Values):
+
+2016-12-02  Dave Hyatt  <[email protected]>
+
         [CSS Parser] Make sure the templatized consumeIdent uses CSSValuePool
         https://bugs.webkit.org/show_bug.cgi?id=165302
 

Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (209238 => 209239)


--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2016-12-02 16:32:10 UTC (rev 209238)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2016-12-02 16:44:23 UTC (rev 209239)
@@ -4233,17 +4233,17 @@
     if (m_range.atEnd())
         return false;
 
-    addProperty(CSSPropertyFontStyle, CSSPropertyFont, fontStyle ? fontStyle.releaseNonNull() : CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
-    addProperty(CSSPropertyFontVariantCaps, CSSPropertyFont, fontVariantCaps ? fontVariantCaps.releaseNonNull() : CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
+    addProperty(CSSPropertyFontStyle, CSSPropertyFont, fontStyle ? fontStyle.releaseNonNull() : CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, !fontStyle);
+    addProperty(CSSPropertyFontVariantCaps, CSSPropertyFont, fontVariantCaps ? fontVariantCaps.releaseNonNull() : CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, !fontVariantCaps);
 /*  
     // FIXME-NEWPARSER: What do we do with these? They aren't part of our fontShorthand().
-    addProperty(CSSPropertyFontVariantLigatures, CSSPropertyFont, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
-    addProperty(CSSPropertyFontVariantNumeric, CSSPropertyFont, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
+    addProperty(CSSPropertyFontVariantLigatures, CSSPropertyFont, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, true);
+    addProperty(CSSPropertyFontVariantNumeric, CSSPropertyFont, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, true);
 */
     
-    addProperty(CSSPropertyFontWeight, CSSPropertyFont, fontWeight ? fontWeight.releaseNonNull() : CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
+    addProperty(CSSPropertyFontWeight, CSSPropertyFont, fontWeight ? fontWeight.releaseNonNull() : CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, !fontWeight);
     /* FIXME-NEWPARSER: Implement.
-    addProperty(CSSPropertyFontStretch, CSSPropertyFont, fontStretch ? fontStretch.releaseNonNull() : CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
+    addProperty(CSSPropertyFontStretch, CSSPropertyFont, fontStretch ? fontStretch.releaseNonNull() : CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, !fontStretch);
     */
 
     // Now a font size _must_ come.
@@ -4259,7 +4259,7 @@
             return false;
         addProperty(CSSPropertyLineHeight, CSSPropertyFont, lineHeight.releaseNonNull(), important);
     } else {
-        addProperty(CSSPropertyLineHeight, CSSPropertyFont, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
+        addProperty(CSSPropertyLineHeight, CSSPropertyFont, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important, true);
     }
 
     // Font family must come now.
@@ -4633,6 +4633,10 @@
             left = parseSingleValue(longhands[3], shorthand.id());
     }
 
+    bool rightImplicit = !right;
+    bool bottomImplicit = !bottom;
+    bool leftImplicit = !left;
+
     if (!right)
         right = top;
     if (!bottom)
@@ -4641,9 +4645,9 @@
         left = right;
 
     addProperty(longhands[0], shorthand.id(), top.releaseNonNull(), important);
-    addProperty(longhands[1], shorthand.id(), right.releaseNonNull(), important);
-    addProperty(longhands[2], shorthand.id(), bottom.releaseNonNull(), important);
-    addProperty(longhands[3], shorthand.id(), left.releaseNonNull(), important);
+    addProperty(longhands[1], shorthand.id(), right.releaseNonNull(), important, rightImplicit);
+    addProperty(longhands[2], shorthand.id(), bottom.releaseNonNull(), important, bottomImplicit);
+    addProperty(longhands[3], shorthand.id(), left.releaseNonNull(), important, leftImplicit);
 
     return m_range.atEnd();
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to