Title: [149029] trunk/Source/WebCore
Revision
149029
Author
[email protected]
Date
2013-04-24 05:33:33 -0700 (Wed, 24 Apr 2013)

Log Message

Remove unnecessary MutableStylePropertySet casts.
<http://webkit.org/b/115075>

Reviewed by Geoffrey Garen.

Get rid of some now-unneeded static_casts that were left from the StylePropertySet
refactoring last weekend.

* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::setProperty):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::triStateOfStyle):
(WebCore::EditingStyle::removeStyleFromRulesAndContext):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (149028 => 149029)


--- trunk/Source/WebCore/ChangeLog	2013-04-24 12:17:32 UTC (rev 149028)
+++ trunk/Source/WebCore/ChangeLog	2013-04-24 12:33:33 UTC (rev 149029)
@@ -1,3 +1,19 @@
+2013-04-24  Andreas Kling  <[email protected]>
+
+        Remove unnecessary MutableStylePropertySet casts.
+        <http://webkit.org/b/115075>
+
+        Reviewed by Geoffrey Garen.
+
+        Get rid of some now-unneeded static_casts that were left from the StylePropertySet
+        refactoring last weekend.
+
+        * css/StylePropertySet.cpp:
+        (WebCore::MutableStylePropertySet::setProperty):
+        * editing/EditingStyle.cpp:
+        (WebCore::EditingStyle::triStateOfStyle):
+        (WebCore::EditingStyle::removeStyleFromRulesAndContext):
+
 2013-04-24  Kangil Han  <[email protected]>
 
         [Minor code cleanup] Remove duplicated condition check

Modified: trunk/Source/WebCore/css/StylePropertySet.cpp (149028 => 149029)


--- trunk/Source/WebCore/css/StylePropertySet.cpp	2013-04-24 12:17:32 UTC (rev 149028)
+++ trunk/Source/WebCore/css/StylePropertySet.cpp	2013-04-24 12:33:33 UTC (rev 149029)
@@ -678,13 +678,13 @@
     // Setting the value to an empty string just removes the property in both IE and Gecko.
     // Setting it to null seems to produce less consistent results, but we treat it just the same.
     if (value.isEmpty()) {
-        static_cast<MutableStylePropertySet*>(this)->removeProperty(propertyID);
+        removeProperty(propertyID);
         return true;
     }
 
     // When replacing an existing property value, this moves the property to the end of the list.
     // Firefox preserves the position, and MSIE moves the property to the beginning.
-    return CSSParser::parseValue(static_cast<MutableStylePropertySet*>(this), propertyID, value, important, cssParserMode(), contextStyleSheet);
+    return CSSParser::parseValue(this, propertyID, value, important, cssParserMode(), contextStyleSheet);
 }
 
 void MutableStylePropertySet::setProperty(CSSPropertyID propertyID, PassRefPtr<CSSValue> prpValue, bool important)

Modified: trunk/Source/WebCore/editing/EditingStyle.cpp (149028 => 149029)


--- trunk/Source/WebCore/editing/EditingStyle.cpp	2013-04-24 12:17:32 UTC (rev 149028)
+++ trunk/Source/WebCore/editing/EditingStyle.cpp	2013-04-24 12:33:33 UTC (rev 149029)
@@ -648,7 +648,7 @@
 {
     if (!style || !style->m_mutableStyle)
         return FalseTriState;
-    return triStateOfStyle(static_pointer_cast<MutableStylePropertySet>(style->m_mutableStyle)->ensureCSSStyleDeclaration(), DoNotIgnoreTextOnlyProperties);
+    return triStateOfStyle(style->m_mutableStyle->ensureCSSStyleDeclaration(), DoNotIgnoreTextOnlyProperties);
 }
 
 TriState EditingStyle::triStateOfStyle(CSSStyleDeclaration* styleToCompare, ShouldIgnoreTextOnlyProperties shouldIgnoreTextOnlyProperties) const
@@ -1153,7 +1153,7 @@
             computedStyle->m_mutableStyle->setProperty(CSSPropertyBackgroundColor, CSSValueTransparent);
 
         removePropertiesInStyle(computedStyle->m_mutableStyle.get(), styleFromMatchedRules.get());
-        m_mutableStyle = getPropertiesNotIn(m_mutableStyle.get(), static_pointer_cast<MutableStylePropertySet>(computedStyle->m_mutableStyle)->ensureCSSStyleDeclaration());
+        m_mutableStyle = getPropertiesNotIn(m_mutableStyle.get(), computedStyle->m_mutableStyle->ensureCSSStyleDeclaration());
     }
 
     // 3. If this element is a span and has display: inline or float: none, remove them unless they are overriden by rules.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to