Title: [208485] trunk/Source/WebCore
- Revision
- 208485
- Author
- [email protected]
- Date
- 2016-11-09 14:15:05 -0800 (Wed, 09 Nov 2016)
Log Message
StyledElement::attributeChanged shouldn't do any work when the attribute value didn't change
https://bugs.webkit.org/show_bug.cgi?id=129476
Reviewed by Andreas Kling.
Avoid calling styleAttributeChanged and setPresentationAttributeStyleIsDirty
when the attribute value didn't change as in r164856.
* dom/StyledElement.cpp:
(WebCore::StyledElement::attributeChanged):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (208484 => 208485)
--- trunk/Source/WebCore/ChangeLog 2016-11-09 22:06:37 UTC (rev 208484)
+++ trunk/Source/WebCore/ChangeLog 2016-11-09 22:15:05 UTC (rev 208485)
@@ -1,3 +1,16 @@
+2016-11-09 Ryosuke Niwa <[email protected]>
+
+ StyledElement::attributeChanged shouldn't do any work when the attribute value didn't change
+ https://bugs.webkit.org/show_bug.cgi?id=129476
+
+ Reviewed by Andreas Kling.
+
+ Avoid calling styleAttributeChanged and setPresentationAttributeStyleIsDirty
+ when the attribute value didn't change as in r164856.
+
+ * dom/StyledElement.cpp:
+ (WebCore::StyledElement::attributeChanged):
+
2016-11-09 Yusuke Suzuki <[email protected]>
[DOMJIT] Implement Node::ownerDocument
Modified: trunk/Source/WebCore/dom/StyledElement.cpp (208484 => 208485)
--- trunk/Source/WebCore/dom/StyledElement.cpp 2016-11-09 22:06:37 UTC (rev 208484)
+++ trunk/Source/WebCore/dom/StyledElement.cpp 2016-11-09 22:15:05 UTC (rev 208485)
@@ -155,11 +155,13 @@
void StyledElement::attributeChanged(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& newValue, AttributeModificationReason reason)
{
- if (name == styleAttr)
- styleAttributeChanged(newValue, reason);
- else if (isPresentationAttribute(name)) {
- elementData()->setPresentationAttributeStyleIsDirty(true);
- invalidateStyle();
+ if (oldValue != newValue) {
+ if (name == styleAttr)
+ styleAttributeChanged(newValue, reason);
+ else if (isPresentationAttribute(name)) {
+ elementData()->setPresentationAttributeStyleIsDirty(true);
+ invalidateStyle();
+ }
}
Element::attributeChanged(name, oldValue, newValue, reason);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes