Title: [149157] trunk/Source/WebCore
Revision
149157
Author
[email protected]
Date
2013-04-25 17:33:59 -0700 (Thu, 25 Apr 2013)

Log Message

StylePropertySet::getPropertyShorthand() should return a String.
<http://webkit.org/b/115213>

Reviewed by Anders Carlsson.

Return a String directly from getPropertyShorthand() instead of forcing clients
to call getPropertyNameString().

* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyShorthand):
* css/StylePropertySet.h:
(StylePropertySet):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (149156 => 149157)


--- trunk/Source/WebCore/ChangeLog	2013-04-26 00:27:56 UTC (rev 149156)
+++ trunk/Source/WebCore/ChangeLog	2013-04-26 00:33:59 UTC (rev 149157)
@@ -1,3 +1,20 @@
+2013-04-25  Andreas Kling  <[email protected]>
+
+        StylePropertySet::getPropertyShorthand() should return a String.
+        <http://webkit.org/b/115213>
+
+        Reviewed by Anders Carlsson.
+
+        Return a String directly from getPropertyShorthand() instead of forcing clients
+        to call getPropertyNameString().
+
+        * css/PropertySetCSSStyleDeclaration.cpp:
+        (WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand):
+        * css/StylePropertySet.cpp:
+        (WebCore::StylePropertySet::getPropertyShorthand):
+        * css/StylePropertySet.h:
+        (StylePropertySet):
+
 2013-04-25  Chris Fleizach  <[email protected]>
 
         WEB SPEECH: language support does not work as expected

Modified: trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp (149156 => 149157)


--- trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp	2013-04-26 00:27:56 UTC (rev 149156)
+++ trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp	2013-04-26 00:33:59 UTC (rev 149157)
@@ -190,10 +190,7 @@
     CSSPropertyID propertyID = cssPropertyID(propertyName);
     if (!propertyID)
         return String();
-    CSSPropertyID shorthandID = m_propertySet->getPropertyShorthand(propertyID);
-    if (!shorthandID)
-        return String();
-    return getPropertyNameString(shorthandID);
+    return m_propertySet->getPropertyShorthand(propertyID);
 }
 
 bool PropertySetCSSStyleDeclaration::isPropertyImplicit(const String& propertyName)

Modified: trunk/Source/WebCore/css/StylePropertySet.cpp (149156 => 149157)


--- trunk/Source/WebCore/css/StylePropertySet.cpp	2013-04-26 00:27:56 UTC (rev 149156)
+++ trunk/Source/WebCore/css/StylePropertySet.cpp	2013-04-26 00:33:59 UTC (rev 149157)
@@ -657,12 +657,12 @@
     return true;
 }
 
-CSSPropertyID StylePropertySet::getPropertyShorthand(CSSPropertyID propertyID) const
+String StylePropertySet::getPropertyShorthand(CSSPropertyID propertyID) const
 {
     int foundPropertyIndex = findPropertyIndex(propertyID);
     if (foundPropertyIndex == -1)
-        return CSSPropertyInvalid;
-    return propertyAt(foundPropertyIndex).shorthandID();
+        return String();
+    return getPropertyNameString(propertyAt(foundPropertyIndex).shorthandID());
 }
 
 bool StylePropertySet::isPropertyImplicit(CSSPropertyID propertyID) const

Modified: trunk/Source/WebCore/css/StylePropertySet.h (149156 => 149157)


--- trunk/Source/WebCore/css/StylePropertySet.h	2013-04-26 00:27:56 UTC (rev 149156)
+++ trunk/Source/WebCore/css/StylePropertySet.h	2013-04-26 00:33:59 UTC (rev 149157)
@@ -88,7 +88,7 @@
     PassRefPtr<CSSValue> getPropertyCSSValue(CSSPropertyID) const;
     String getPropertyValue(CSSPropertyID) const;
     bool propertyIsImportant(CSSPropertyID) const;
-    CSSPropertyID getPropertyShorthand(CSSPropertyID) const;
+    String getPropertyShorthand(CSSPropertyID) const;
     bool isPropertyImplicit(CSSPropertyID) const;
 
     PassRefPtr<MutableStylePropertySet> copyBlockProperties() const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to