Drop width / height shorthands code from StylePropertyShorthand.*
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jan 2015 20:54:19 +0000 (20:54 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jan 2015 20:54:19 +0000 (20:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140686

Reviewed by Andreas Kling.

Drop width / height shorthands code from StylePropertyShorthand.*.
width / height are not shorthands for min-width/max-width and
min-height/max-height. Also, only matchingCustomShorthandsForLonghand()
treats these as shorthands. For e.g, the reverse method
(indexOfShorthandForLonghand()) does not.

* css/StylePropertyShorthand.cpp:
(WebCore::widthShorthand): Deleted.
(WebCore::heightShorthand): Deleted.
* css/StylePropertyShorthand.h:
(WebCore::matchingCustomShorthandsForLonghand):

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

Source/WebCore/ChangeLog
Source/WebCore/css/StylePropertyShorthand.cpp
Source/WebCore/css/StylePropertyShorthand.h

index 48d3ee2..f73e71a 100644 (file)
@@ -1,3 +1,22 @@
+2015-01-20  Chris Dumez  <cdumez@apple.com>
+
+        Drop width / height shorthands code from StylePropertyShorthand.*
+        https://bugs.webkit.org/show_bug.cgi?id=140686
+
+        Reviewed by Andreas Kling.
+
+        Drop width / height shorthands code from StylePropertyShorthand.*.
+        width / height are not shorthands for min-width/max-width and
+        min-height/max-height. Also, only matchingCustomShorthandsForLonghand()
+        treats these as shorthands. For e.g, the reverse method
+        (indexOfShorthandForLonghand()) does not.
+
+        * css/StylePropertyShorthand.cpp:
+        (WebCore::widthShorthand): Deleted.
+        (WebCore::heightShorthand): Deleted.
+        * css/StylePropertyShorthand.h:
+        (WebCore::matchingCustomShorthandsForLonghand):
+
 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
 
         Add a mechanism to ignore previous content extension rules
index 247caad..090da35 100644 (file)
@@ -82,24 +82,6 @@ StylePropertyShorthand animationShorthandForParsing(CSSPropertyID propId)
     return StylePropertyShorthand(CSSPropertyWebkitAnimation, prefixedAnimationPropertiesForParsing);
 }
 
-StylePropertyShorthand widthShorthand()
-{
-    static const CSSPropertyID widthProperties[] = {
-        CSSPropertyMinWidth,
-        CSSPropertyMaxWidth
-    };
-    return StylePropertyShorthand(CSSPropertyWidth, widthProperties);
-}
-
-StylePropertyShorthand heightShorthand()
-{
-    static const CSSPropertyID heightProperties[] = {
-        CSSPropertyMinHeight,
-        CSSPropertyMaxHeight
-    };
-    return StylePropertyShorthand(CSSPropertyHeight, heightProperties);
-}
-
 bool isExpandedShorthand(CSSPropertyID id)
 {
     // The system fonts bypass the normal style resolution by using RenderTheme,
index 956f573..d513661 100644 (file)
@@ -63,8 +63,6 @@ private:
 StylePropertyShorthand animationShorthandForParsing(CSSPropertyID);
 StylePropertyShorthand borderAbridgedShorthand();
 StylePropertyShorthand fontShorthand();
-StylePropertyShorthand heightShorthand();
-StylePropertyShorthand widthShorthand();
 
 // Returns empty value if the property is not a shorthand.
 // The implementation is generated in StylePropertyShorthandFunctions.cpp.
@@ -89,12 +87,6 @@ inline Vector<StylePropertyShorthand> matchingCustomShorthandsForLonghand(CSSPro
     case CSSPropertyFontWeight:
     case CSSPropertyLineHeight:
         return Vector<StylePropertyShorthand>{fontShorthand()};
-    case CSSPropertyMinWidth:
-    case CSSPropertyMaxWidth:
-        return Vector<StylePropertyShorthand>{widthShorthand()};
-    case CSSPropertyMinHeight:
-    case CSSPropertyMaxHeight:
-        return Vector<StylePropertyShorthand>{heightShorthand()};
     default:
         break;
     }