Title: [148675] trunk/Source/WebCore
- Revision
- 148675
- Author
- akl...@apple.com
- Date
- 2013-04-18 07:24:21 -0700 (Thu, 18 Apr 2013)
Log Message
EditingStyle: Avoid some unnecessary CSSStyleDeclaration wrappers.
<http://webkit.org/b/114763>
Reviewed by Antti Koivisto.
removeEquivalentProperties(CSSStyleDeclaration) and removeEquivalentProperties(StylePropertySet)
only have different behavior if the CSSStyleDeclaration is computed style (they differ in handling
of the 'font-size' property.)
Avoid creating a CSSStyleDeclaration for StylePropertySets where we can just pass them in directly.
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::removeStyleAddedByNode):
(WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (148674 => 148675)
--- trunk/Source/WebCore/ChangeLog 2013-04-18 14:08:07 UTC (rev 148674)
+++ trunk/Source/WebCore/ChangeLog 2013-04-18 14:24:21 UTC (rev 148675)
@@ -1,3 +1,20 @@
+2013-04-18 Andreas Kling <akl...@apple.com>
+
+ EditingStyle: Avoid some unnecessary CSSStyleDeclaration wrappers.
+ <http://webkit.org/b/114763>
+
+ Reviewed by Antti Koivisto.
+
+ removeEquivalentProperties(CSSStyleDeclaration) and removeEquivalentProperties(StylePropertySet)
+ only have different behavior if the CSSStyleDeclaration is computed style (they differ in handling
+ of the 'font-size' property.)
+
+ Avoid creating a CSSStyleDeclaration for StylePropertySets where we can just pass them in directly.
+
+ * editing/EditingStyle.cpp:
+ (WebCore::EditingStyle::removeStyleAddedByNode):
+ (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
+
2013-04-18 Allan Sandfeld Jensen <allan.jen...@digia.com>
Unset :hover in inner documents
Modified: trunk/Source/WebCore/editing/EditingStyle.cpp (148674 => 148675)
--- trunk/Source/WebCore/editing/EditingStyle.cpp 2013-04-18 14:08:07 UTC (rev 148674)
+++ trunk/Source/WebCore/editing/EditingStyle.cpp 2013-04-18 14:24:21 UTC (rev 148675)
@@ -595,8 +595,8 @@
return;
RefPtr<MutableStylePropertySet> parentStyle = editingStyleFromComputedStyle(CSSComputedStyleDeclaration::create(node->parentNode()), AllEditingProperties);
RefPtr<MutableStylePropertySet> nodeStyle = editingStyleFromComputedStyle(CSSComputedStyleDeclaration::create(node), AllEditingProperties);
- nodeStyle->removeEquivalentProperties(parentStyle->ensureCSSStyleDeclaration());
- m_mutableStyle->removeEquivalentProperties(nodeStyle->ensureCSSStyleDeclaration());
+ nodeStyle->removeEquivalentProperties(parentStyle.get());
+ m_mutableStyle->removeEquivalentProperties(nodeStyle.get());
}
void EditingStyle::removeStyleConflictingWithStyleOfNode(Node* node)
@@ -606,7 +606,7 @@
RefPtr<MutableStylePropertySet> parentStyle = editingStyleFromComputedStyle(CSSComputedStyleDeclaration::create(node->parentNode()), AllEditingProperties);
RefPtr<MutableStylePropertySet> nodeStyle = editingStyleFromComputedStyle(CSSComputedStyleDeclaration::create(node), AllEditingProperties);
- nodeStyle->removeEquivalentProperties(parentStyle->ensureCSSStyleDeclaration());
+ nodeStyle->removeEquivalentProperties(parentStyle.get());
unsigned propertyCount = nodeStyle->propertyCount();
for (unsigned i = 0; i < propertyCount; ++i)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes