Title: [149059] trunk/Source/WebCore
- Revision
- 149059
- Author
- [email protected]
- Date
- 2013-04-24 12:59:18 -0700 (Wed, 24 Apr 2013)
Log Message
Setting an inline style property to "" shouldn't cause style recalc unless the property was present.
<http://webkit.org/b/115122>
Reviewed by Antti Koivisto.
StylePropertySet::setProperty() handles empty strings by removing the property entirely.
If there was no property to remove, it shouldn't claim that it changed something, as that
will cause the CSSOM wrapper to mark the element for style recalc.
A common idiom that triggers this is excessive use of { element.style.display = ''; }
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::setProperty):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (149058 => 149059)
--- trunk/Source/WebCore/ChangeLog 2013-04-24 19:50:50 UTC (rev 149058)
+++ trunk/Source/WebCore/ChangeLog 2013-04-24 19:59:18 UTC (rev 149059)
@@ -1,3 +1,19 @@
+2013-04-24 Andreas Kling <[email protected]>
+
+ Setting an inline style property to "" shouldn't cause style recalc unless the property was present.
+ <http://webkit.org/b/115122>
+
+ Reviewed by Antti Koivisto.
+
+ StylePropertySet::setProperty() handles empty strings by removing the property entirely.
+ If there was no property to remove, it shouldn't claim that it changed something, as that
+ will cause the CSSOM wrapper to mark the element for style recalc.
+
+ A common idiom that triggers this is excessive use of { element.style.display = ''; }
+
+ * css/StylePropertySet.cpp:
+ (WebCore::MutableStylePropertySet::setProperty):
+
2013-04-23 Ryosuke Niwa <[email protected]>
Moving word boundaries backwards fails when there is a text node starting with an apostrophe
Modified: trunk/Source/WebCore/css/StylePropertySet.cpp (149058 => 149059)
--- trunk/Source/WebCore/css/StylePropertySet.cpp 2013-04-24 19:50:50 UTC (rev 149058)
+++ trunk/Source/WebCore/css/StylePropertySet.cpp 2013-04-24 19:59:18 UTC (rev 149059)
@@ -677,10 +677,8 @@
{
// 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()) {
- removeProperty(propertyID);
- return true;
- }
+ if (value.isEmpty())
+ return removeProperty(propertyID);
// 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.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes