<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[197274] releases/WebKitGTK/webkit-2.4/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/197274">197274</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2016-02-28 03:42:51 -0800 (Sun, 28 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Element::attributeChanged shouldn't do any work when attribute value didn't change
https://bugs.webkit.org/show_bug.cgi?id=129467

Reviewed by Geoffrey Garen.

Exit early in childrenChanged when the attribute value didn't change.

* dom/Attr.cpp:
(WebCore::Attr::setValue):
(WebCore::Attr::childrenChanged):
* dom/Element.cpp:
(WebCore::Element::setAttributeInternal):
(WebCore::Element::attributeChanged):
(WebCore::Element::parserSetAttributes):
(WebCore::Element::removeAttributeInternal):
(WebCore::Element::didAddAttribute):
(WebCore::Element::didModifyAttribute):
(WebCore::Element::didRemoveAttribute):
(WebCore::Element::cloneAttributesFromElement):
* dom/Element.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::attributeChanged):
* dom/StyledElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::attributeChanged):
* mathml/MathMLElement.h:
* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::attributeChanged):
* mathml/MathMLSelectElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::attributeChanged):
* svg/SVGElement.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoredomAttrcpp">releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/Attr.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoredomElementcpp">releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoredomElementh">releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/Element.h</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoredomStyledElementcpp">releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/StyledElement.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoredomStyledElementh">releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/StyledElement.h</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCorehtmlHTMLInputElementcpp">releases/WebKitGTK/webkit-2.4/Source/WebCore/html/HTMLInputElement.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoremathmlMathMLElementcpp">releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLElement.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoremathmlMathMLElementh">releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLElement.h</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoremathmlMathMLSelectElementcpp">releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLSelectElement.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoremathmlMathMLSelectElementh">releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLSelectElement.h</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoresvgSVGElementcpp">releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/SVGElement.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoresvgSVGElementh">releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/SVGElement.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit24SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog (197273 => 197274)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog        2016-02-28 11:01:02 UTC (rev 197273)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog        2016-02-28 11:42:51 UTC (rev 197274)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2014-02-27  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        Element::attributeChanged shouldn't do any work when attribute value didn't change
+        https://bugs.webkit.org/show_bug.cgi?id=129467
+
+        Reviewed by Geoffrey Garen.
+
+        Exit early in childrenChanged when the attribute value didn't change.
+
+        * dom/Attr.cpp:
+        (WebCore::Attr::setValue):
+        (WebCore::Attr::childrenChanged):
+        * dom/Element.cpp:
+        (WebCore::Element::setAttributeInternal):
+        (WebCore::Element::attributeChanged):
+        (WebCore::Element::parserSetAttributes):
+        (WebCore::Element::removeAttributeInternal):
+        (WebCore::Element::didAddAttribute):
+        (WebCore::Element::didModifyAttribute):
+        (WebCore::Element::didRemoveAttribute):
+        (WebCore::Element::cloneAttributesFromElement):
+        * dom/Element.h:
+        * dom/StyledElement.cpp:
+        (WebCore::StyledElement::attributeChanged):
+        * dom/StyledElement.h:
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::updateType):
+        * mathml/MathMLElement.cpp:
+        (WebCore::MathMLElement::attributeChanged):
+        * mathml/MathMLElement.h:
+        * mathml/MathMLSelectElement.cpp:
+        (WebCore::MathMLSelectElement::attributeChanged):
+        * mathml/MathMLSelectElement.h:
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::attributeChanged):
+        * svg/SVGElement.h:
+
</ins><span class="cx"> 2015-04-30  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Build fix after r183646 for less enlightened platforms.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoredomAttrcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/Attr.cpp (197273 => 197274)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/Attr.cpp        2016-02-28 11:01:02 UTC (rev 197273)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/Attr.cpp        2016-02-28 11:42:51 UTC (rev 197274)
</span><span class="lines">@@ -122,13 +122,14 @@
</span><span class="cx"> 
</span><span class="cx"> void Attr::setValue(const AtomicString&amp; value, ExceptionCode&amp;)
</span><span class="cx"> {
</span><ins>+    AtomicString oldValue = this-&gt;value();
</ins><span class="cx">     if (m_element)
</span><del>-        m_element-&gt;willModifyAttribute(qualifiedName(), this-&gt;value(), value);
</del><ins>+        m_element-&gt;willModifyAttribute(qualifiedName(), oldValue, value);
</ins><span class="cx"> 
</span><span class="cx">     setValue(value);
</span><span class="cx"> 
</span><span class="cx">     if (m_element)
</span><del>-        m_element-&gt;didModifyAttribute(qualifiedName(), value);
</del><ins>+        m_element-&gt;didModifyAttribute(qualifiedName(), oldValue, value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Attr::setNodeValue(const String&amp; v, ExceptionCode&amp; ec)
</span><span class="lines">@@ -165,9 +166,10 @@
</span><span class="cx">     StringBuilder valueBuilder;
</span><span class="cx">     TextNodeTraversal::appendContents(this, valueBuilder);
</span><span class="cx"> 
</span><ins>+    AtomicString oldValue = value();
</ins><span class="cx">     AtomicString newValue = valueBuilder.toAtomicString();
</span><span class="cx">     if (m_element)
</span><del>-        m_element-&gt;willModifyAttribute(qualifiedName(), value(), newValue);
</del><ins>+        m_element-&gt;willModifyAttribute(qualifiedName(), oldValue, newValue);
</ins><span class="cx"> 
</span><span class="cx">     if (m_element)
</span><span class="cx">         elementAttribute().setValue(newValue);
</span><span class="lines">@@ -175,7 +177,7 @@
</span><span class="cx">         m_standaloneValue = newValue;
</span><span class="cx"> 
</span><span class="cx">     if (m_element)
</span><del>-        m_element-&gt;attributeChanged(qualifiedName(), newValue);
</del><ins>+        m_element-&gt;attributeChanged(qualifiedName(), oldValue, newValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool Attr::isId() const
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/Element.cpp (197273 => 197274)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/Element.cpp        2016-02-28 11:01:02 UTC (rev 197273)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/Element.cpp        2016-02-28 11:42:51 UTC (rev 197274)
</span><span class="lines">@@ -1052,11 +1052,13 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool valueChanged = newValue != attributeAt(index).value();
-    QualifiedName attributeName = (!inSynchronizationOfLazyAttribute || valueChanged) ? attributeAt(index).name() : name;
</del><ins>+    const Attribute&amp; attribute = attributeAt(index);
+    AtomicString oldValue = attribute.value();
+    bool valueChanged = newValue != oldValue;
+    const QualifiedName&amp; attributeName = (!inSynchronizationOfLazyAttribute || valueChanged) ? attribute.name() : name;
</ins><span class="cx"> 
</span><span class="cx">     if (!inSynchronizationOfLazyAttribute)
</span><del>-        willModifyAttribute(attributeName, attributeAt(index).value(), newValue);
</del><ins>+        willModifyAttribute(attributeName, oldValue, newValue);
</ins><span class="cx"> 
</span><span class="cx">     if (valueChanged) {
</span><span class="cx">         // If there is an Attr node hooked to this attribute, the Attr::setValue() call below
</span><span class="lines">@@ -1069,7 +1071,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!inSynchronizationOfLazyAttribute)
</span><del>-        didModifyAttribute(attributeName, newValue);
</del><ins>+        didModifyAttribute(attributeName, oldValue, newValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline AtomicString makeIdForStyleResolution(const AtomicString&amp; value, bool inQuirksMode)
</span><span class="lines">@@ -1089,12 +1091,15 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Element::attributeChanged(const QualifiedName&amp; name, const AtomicString&amp; newValue, AttributeModificationReason)
</del><ins>+void Element::attributeChanged(const QualifiedName&amp; name, const AtomicString&amp; oldValue, const AtomicString&amp; newValue, AttributeModificationReason)
</ins><span class="cx"> {
</span><span class="cx">     parseAttribute(name, newValue);
</span><span class="cx"> 
</span><span class="cx">     document().incDOMTreeVersion();
</span><span class="cx"> 
</span><ins>+    if (oldValue == newValue)
+        return;
+
</ins><span class="cx">     StyleResolver* styleResolver = document().styleResolverIfExists();
</span><span class="cx">     bool testShouldInvalidateStyle = inRenderedDocument() &amp;&amp; styleResolver &amp;&amp; styleChangeType() &lt; FullStyleChange;
</span><span class="cx">     bool shouldInvalidateStyle = false;
</span><span class="lines">@@ -1271,7 +1276,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Use attributeVector instead of m_elementData because attributeChanged might modify m_elementData.
</span><span class="cx">     for (unsigned i = 0; i &lt; attributeVector.size(); ++i)
</span><del>-        attributeChanged(attributeVector[i].name(), attributeVector[i].value(), ModifiedDirectly);
</del><ins>+        attributeChanged(attributeVector[i].name(), nullAtom, attributeVector[i].value(), ModifiedDirectly);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool Element::hasAttributes() const
</span><span class="lines">@@ -1854,7 +1859,7 @@
</span><span class="cx">     elementData.removeAttribute(index);
</span><span class="cx"> 
</span><span class="cx">     if (!inSynchronizationOfLazyAttribute)
</span><del>-        didRemoveAttribute(name);
</del><ins>+        didRemoveAttribute(name, valueBeingRemoved);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Element::addAttributeInternal(const QualifiedName&amp; name, const AtomicString&amp; value, SynchronizationOfLazyAttribute inSynchronizationOfLazyAttribute)
</span><span class="lines">@@ -2823,21 +2828,21 @@
</span><span class="cx"> 
</span><span class="cx"> void Element::didAddAttribute(const QualifiedName&amp; name, const AtomicString&amp; value)
</span><span class="cx"> {
</span><del>-    attributeChanged(name, value);
</del><ins>+    attributeChanged(name, nullAtom, value);
</ins><span class="cx">     InspectorInstrumentation::didModifyDOMAttr(&amp;document(), this, name.localName(), value);
</span><span class="cx">     dispatchSubtreeModifiedEvent();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Element::didModifyAttribute(const QualifiedName&amp; name, const AtomicString&amp; value)
</del><ins>+void Element::didModifyAttribute(const QualifiedName&amp; name, const AtomicString&amp; oldValue, const AtomicString&amp; newValue)
</ins><span class="cx"> {
</span><del>-    attributeChanged(name, value);
-    InspectorInstrumentation::didModifyDOMAttr(&amp;document(), this, name.localName(), value);
</del><ins>+    attributeChanged(name, oldValue, newValue);
+    InspectorInstrumentation::didModifyDOMAttr(&amp;document(), this, name.localName(), newValue);
</ins><span class="cx">     // Do not dispatch a DOMSubtreeModified event here; see bug 81141.
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Element::didRemoveAttribute(const QualifiedName&amp; name)
</del><ins>+void Element::didRemoveAttribute(const QualifiedName&amp; name, const AtomicString&amp; oldValue)
</ins><span class="cx"> {
</span><del>-    attributeChanged(name, nullAtom);
</del><ins>+    attributeChanged(name, oldValue, nullAtom);
</ins><span class="cx">     InspectorInstrumentation::didRemoveDOMAttr(&amp;document(), this, name.localName());
</span><span class="cx">     dispatchSubtreeModifiedEvent();
</span><span class="cx"> }
</span><span class="lines">@@ -3038,9 +3043,8 @@
</span><span class="cx">     else
</span><span class="cx">         m_elementData = other.m_elementData-&gt;makeUniqueCopy();
</span><span class="cx"> 
</span><del>-    for (const Attribute&amp; attribute : attributesIterator()) {
-        attributeChanged(attribute.name(), attribute.value(), ModifiedByCloning);
-    }
</del><ins>+    for (const Attribute&amp; attribute : attributesIterator())
+        attributeChanged(attribute.name(), nullAtom, attribute.value(), ModifiedByCloning);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Element::cloneDataFromElement(const Element&amp; other)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/Element.h (197273 => 197274)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/Element.h        2016-02-28 11:01:02 UTC (rev 197273)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/Element.h        2016-02-28 11:42:51 UTC (rev 197274)
</span><span class="lines">@@ -284,7 +284,7 @@
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     // This method is called whenever an attribute is added, changed or removed.
</span><del>-    virtual void attributeChanged(const QualifiedName&amp;, const AtomicString&amp;, AttributeModificationReason = ModifiedDirectly);
</del><ins>+    virtual void attributeChanged(const QualifiedName&amp;, const AtomicString&amp; oldValue, const AtomicString&amp; newValue, AttributeModificationReason = ModifiedDirectly);
</ins><span class="cx">     virtual void parseAttribute(const QualifiedName&amp;, const AtomicString&amp;) { }
</span><span class="cx"> 
</span><span class="cx">     // Only called by the parser immediately after element construction.
</span><span class="lines">@@ -612,8 +612,8 @@
</span><span class="cx"> 
</span><span class="cx">     void didAddAttribute(const QualifiedName&amp;, const AtomicString&amp;);
</span><span class="cx">     void willModifyAttribute(const QualifiedName&amp;, const AtomicString&amp; oldValue, const AtomicString&amp; newValue);
</span><del>-    void didModifyAttribute(const QualifiedName&amp;, const AtomicString&amp;);
-    void didRemoveAttribute(const QualifiedName&amp;);
</del><ins>+    void didModifyAttribute(const QualifiedName&amp;, const AtomicString&amp; oldValue, const AtomicString&amp; newValue);
+    void didRemoveAttribute(const QualifiedName&amp;, const AtomicString&amp; oldValue);
</ins><span class="cx"> 
</span><span class="cx">     void synchronizeAttribute(const QualifiedName&amp;) const;
</span><span class="cx">     void synchronizeAttribute(const AtomicString&amp; localName) const;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoredomStyledElementcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/StyledElement.cpp (197273 => 197274)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/StyledElement.cpp        2016-02-28 11:01:02 UTC (rev 197273)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/StyledElement.cpp        2016-02-28 11:42:51 UTC (rev 197274)
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx">     return static_cast&lt;MutableStyleProperties&amp;&gt;(*inlineStyle);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StyledElement::attributeChanged(const QualifiedName&amp; name, const AtomicString&amp; newValue, AttributeModificationReason reason)
</del><ins>+void StyledElement::attributeChanged(const QualifiedName&amp; name, const AtomicString&amp; oldValue, const AtomicString&amp; newValue, AttributeModificationReason reason)
</ins><span class="cx"> {
</span><span class="cx">     if (name == styleAttr)
</span><span class="cx">         styleAttributeChanged(newValue, reason);
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx">         setNeedsStyleRecalc(InlineStyleChange);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    Element::attributeChanged(name, newValue, reason);
</del><ins>+    Element::attributeChanged(name, oldValue, newValue, reason);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PropertySetCSSStyleDeclaration* StyledElement::inlineStyleCSSOMWrapper()
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoredomStyledElementh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/StyledElement.h (197273 => 197274)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/StyledElement.h        2016-02-28 11:01:02 UTC (rev 197273)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/dom/StyledElement.h        2016-02-28 11:42:51 UTC (rev 197274)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    virtual void attributeChanged(const QualifiedName&amp;, const AtomicString&amp;, AttributeModificationReason = ModifiedDirectly) override;
</del><ins>+    virtual void attributeChanged(const QualifiedName&amp;, const AtomicString&amp; oldValue, const AtomicString&amp; newValue, AttributeModificationReason = ModifiedDirectly) override;
</ins><span class="cx"> 
</span><span class="cx">     virtual bool isPresentationAttribute(const QualifiedName&amp;) const { return false; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCorehtmlHTMLInputElementcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/html/HTMLInputElement.cpp (197273 => 197274)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/html/HTMLInputElement.cpp        2016-02-28 11:01:02 UTC (rev 197273)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/html/HTMLInputElement.cpp        2016-02-28 11:42:51 UTC (rev 197274)
</span><span class="lines">@@ -511,12 +511,13 @@
</span><span class="cx"> 
</span><span class="cx">     if (didRespectHeightAndWidth != m_inputType-&gt;shouldRespectHeightAndWidthAttributes()) {
</span><span class="cx">         ASSERT(elementData());
</span><ins>+        // FIXME: We don't have the old attribute values so we pretend that we didn't have the old values.
</ins><span class="cx">         if (const Attribute* height = findAttributeByName(heightAttr))
</span><del>-            attributeChanged(heightAttr, height-&gt;value());
</del><ins>+            attributeChanged(heightAttr, nullAtom, height-&gt;value());
</ins><span class="cx">         if (const Attribute* width = findAttributeByName(widthAttr))
</span><del>-            attributeChanged(widthAttr, width-&gt;value());
</del><ins>+            attributeChanged(widthAttr, nullAtom, width-&gt;value());
</ins><span class="cx">         if (const Attribute* align = findAttributeByName(alignAttr))
</span><del>-            attributeChanged(alignAttr, align-&gt;value());
</del><ins>+            attributeChanged(alignAttr, nullAtom, align-&gt;value());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (renderer())
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoremathmlMathMLElementcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLElement.cpp (197273 => 197274)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLElement.cpp        2016-02-28 11:01:02 UTC (rev 197273)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLElement.cpp        2016-02-28 11:42:51 UTC (rev 197274)
</span><span class="lines">@@ -132,14 +132,14 @@
</span><span class="cx">     return child.isTextNode() || child.isMathMLElement();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MathMLElement::attributeChanged(const QualifiedName&amp; name, const AtomicString&amp; newValue, AttributeModificationReason reason)
</del><ins>+void MathMLElement::attributeChanged(const QualifiedName&amp; name, const AtomicString&amp; oldValue, const AtomicString&amp; newValue, AttributeModificationReason reason)
</ins><span class="cx"> {
</span><span class="cx">     if (isSemanticAnnotation() &amp;&amp; (name == MathMLNames::srcAttr || name == MathMLNames::encodingAttr)) {
</span><span class="cx">         Element* parent = parentElement();
</span><span class="cx">         if (parent &amp;&amp; parent-&gt;isMathMLElement() &amp;&amp; parent-&gt;hasTagName(semanticsTag))
</span><span class="cx">             toMathMLElement(parent)-&gt;updateSelectedChild();
</span><span class="cx">     }
</span><del>-    StyledElement::attributeChanged(name, newValue, reason);
</del><ins>+    StyledElement::attributeChanged(name, oldValue, newValue, reason);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoremathmlMathMLElementh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLElement.h (197273 => 197274)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLElement.h        2016-02-28 11:01:02 UTC (rev 197273)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLElement.h        2016-02-28 11:42:51 UTC (rev 197274)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void parseAttribute(const QualifiedName&amp;, const AtomicString&amp;) override;
</span><span class="cx">     virtual bool childShouldCreateRenderer(const Node&amp;) const override;
</span><del>-    virtual void attributeChanged(const QualifiedName&amp;, const AtomicString&amp; newValue, AttributeModificationReason) override;
</del><ins>+    virtual void attributeChanged(const QualifiedName&amp;, const AtomicString&amp; oldValue, const AtomicString&amp; newValue, AttributeModificationReason) override;
</ins><span class="cx"> 
</span><span class="cx">     virtual bool isPresentationAttribute(const QualifiedName&amp;) const override;
</span><span class="cx">     virtual void collectStyleForPresentationAttribute(const QualifiedName&amp;, const AtomicString&amp;, MutableStyleProperties&amp;) override;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoremathmlMathMLSelectElementcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLSelectElement.cpp (197273 => 197274)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLSelectElement.cpp        2016-02-28 11:01:02 UTC (rev 197273)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLSelectElement.cpp        2016-02-28 11:42:51 UTC (rev 197274)
</span><span class="lines">@@ -69,12 +69,12 @@
</span><span class="cx">     MathMLInlineContainerElement::childrenChanged(change);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MathMLSelectElement::attributeChanged(const QualifiedName&amp; name, const AtomicString&amp; newValue, AttributeModificationReason reason)
</del><ins>+void MathMLSelectElement::attributeChanged(const QualifiedName&amp; name, const AtomicString&amp; oldValue, const AtomicString&amp; newValue, AttributeModificationReason reason)
</ins><span class="cx"> {
</span><span class="cx">     if (hasLocalName(mactionTag) &amp;&amp; (name == MathMLNames::actiontypeAttr || name == MathMLNames::selectionAttr))
</span><span class="cx">         updateSelectedChild();
</span><span class="cx"> 
</span><del>-    MathMLInlineContainerElement::attributeChanged(name, newValue, reason);
</del><ins>+    MathMLInlineContainerElement::attributeChanged(name, oldValue, newValue, reason);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int MathMLSelectElement::getSelectedActionChildAndIndex(Element*&amp; selectedChild)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoremathmlMathMLSelectElementh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLSelectElement.h (197273 => 197274)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLSelectElement.h        2016-02-28 11:01:02 UTC (rev 197273)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/mathml/MathMLSelectElement.h        2016-02-28 11:42:51 UTC (rev 197274)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void finishParsingChildren() override;
</span><span class="cx">     virtual void childrenChanged(const ChildChange&amp;) override;
</span><del>-    virtual void attributeChanged(const QualifiedName&amp;, const AtomicString&amp;, AttributeModificationReason = ModifiedDirectly) override;
</del><ins>+    virtual void attributeChanged(const QualifiedName&amp;, const AtomicString&amp; oldValue, const AtomicString&amp; newValue, AttributeModificationReason = ModifiedDirectly) override;
</ins><span class="cx">     virtual void defaultEventHandler(Event*) override;
</span><span class="cx">     virtual bool willRespondToMouseClickEvents() override;
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoresvgSVGElementcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/SVGElement.cpp (197273 => 197274)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/SVGElement.cpp        2016-02-28 11:01:02 UTC (rev 197273)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/SVGElement.cpp        2016-02-28 11:42:51 UTC (rev 197274)
</span><span class="lines">@@ -718,9 +718,9 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SVGElement::attributeChanged(const QualifiedName&amp; name, const AtomicString&amp; newValue, AttributeModificationReason)
</del><ins>+void SVGElement::attributeChanged(const QualifiedName&amp; name, const AtomicString&amp; oldValue, const AtomicString&amp; newValue, AttributeModificationReason)
</ins><span class="cx"> {
</span><del>-    StyledElement::attributeChanged(name, newValue);
</del><ins>+    StyledElement::attributeChanged(name, oldValue, newValue);
</ins><span class="cx"> 
</span><span class="cx">     if (isIdAttributeName(name))
</span><span class="cx">         document().accessSVGExtensions()-&gt;rebuildAllElementReferencesForTarget(this);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoresvgSVGElementh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/SVGElement.h (197273 => 197274)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/SVGElement.h        2016-02-28 11:01:02 UTC (rev 197273)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/SVGElement.h        2016-02-28 11:42:51 UTC (rev 197274)
</span><span class="lines">@@ -147,7 +147,7 @@
</span><span class="cx">     virtual void parseAttribute(const QualifiedName&amp;, const AtomicString&amp;) override;
</span><span class="cx"> 
</span><span class="cx">     virtual void finishParsingChildren() override;
</span><del>-    virtual void attributeChanged(const QualifiedName&amp;, const AtomicString&amp;, AttributeModificationReason = ModifiedDirectly) override;
</del><ins>+    virtual void attributeChanged(const QualifiedName&amp;, const AtomicString&amp; oldValue, const AtomicString&amp; newValue, AttributeModificationReason = ModifiedDirectly) override;
</ins><span class="cx">     virtual bool childShouldCreateRenderer(const Node&amp;) const override;
</span><span class="cx"> 
</span><span class="cx">     SVGElementRareData&amp; ensureSVGRareData();
</span></span></pre>
</div>
</div>

</body>
</html>