<!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>[244269] trunk</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/244269">244269</a></dd>
<dt>Author</dt> <dd>drousso@apple.com</dd>
<dt>Date</dt> <dd>2019-04-15 10:27:40 -0700 (Mon, 15 Apr 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: DOMDebugger: "Attribute Modified" breakpoints pause after the modification occurs for the style attribute
https://bugs.webkit.org/show_bug.cgi?id=196556
<rdar://problem/49570681>

Reviewed by Timothy Hatcher.

Source/WebCore:

Test: inspector/dom-debugger/attribute-modified-style.html

* css/PropertySetCSSStyleDeclaration.h:
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::StyleAttributeMutationScope::~StyleAttributeMutationScope):
(WebCore::InlineCSSStyleDeclaration::willMutate): Added.

* dom/StyledElement.cpp:
(WebCore::StyledElement::styleAttributeChanged):
(WebCore::StyledElement::inlineStyleChanged):

* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willInvalidateStyleAttr): Added.
(WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willInvalidateStyleAttrImpl): Added.
(WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):

* inspector/agents/InspectorDOMAgent.h:
* inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::didInvalidateStyleAttr):

* inspector/agents/InspectorDOMDebuggerAgent.h:
* inspector/agents/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::willInvalidateStyleAttr): Added.
(WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr): Deleted.

LayoutTests:

* inspector/dom-debugger/attribute-modified-style.html: Added.
* inspector/dom-debugger/attribute-modified-style-expected.txt: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssPropertySetCSSStyleDeclarationcpp">trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssPropertySetCSSStyleDeclarationh">trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.h</a></li>
<li><a href="#trunkSourceWebCoredomStyledElementcpp">trunk/Source/WebCore/dom/StyledElement.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorInstrumentationcpp">trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorInstrumentationh">trunk/Source/WebCore/inspector/InspectorInstrumentation.h</a></li>
<li><a href="#trunkSourceWebCoreinspectoragentsInspectorDOMAgentcpp">trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectoragentsInspectorDOMAgenth">trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.h</a></li>
<li><a href="#trunkSourceWebCoreinspectoragentsInspectorDOMDebuggerAgentcpp">trunk/Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectoragentsInspectorDOMDebuggerAgenth">trunk/Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsinspectordomdebuggerattributemodifiedstyleexpectedtxt">trunk/LayoutTests/inspector/dom-debugger/attribute-modified-style-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordomdebuggerattributemodifiedstylehtml">trunk/LayoutTests/inspector/dom-debugger/attribute-modified-style.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (244268 => 244269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2019-04-15 17:27:27 UTC (rev 244268)
+++ trunk/LayoutTests/ChangeLog 2019-04-15 17:27:40 UTC (rev 244269)
</span><span class="lines">@@ -1,5 +1,16 @@
</span><span class="cx"> 2019-04-15  Devin Rousso  <drousso@apple.com>
</span><span class="cx"> 
</span><ins>+        Web Inspector: DOMDebugger: "Attribute Modified" breakpoints pause after the modification occurs for the style attribute
+        https://bugs.webkit.org/show_bug.cgi?id=196556
+        <rdar://problem/49570681>
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/dom-debugger/attribute-modified-style.html: Added.
+        * inspector/dom-debugger/attribute-modified-style-expected.txt: Added.
+
+2019-04-15  Devin Rousso  <drousso@apple.com>
+
</ins><span class="cx">         Web Inspector: Elements: event listener change events should only be fired for the selected node and it's ancestors
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=196887
</span><span class="cx">         <rdar://problem/49870627>
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordomdebuggerattributemodifiedstyleexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/dom-debugger/attribute-modified-style-expected.txt (0 => 244269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom-debugger/attribute-modified-style-expected.txt                           (rev 0)
+++ trunk/LayoutTests/inspector/dom-debugger/attribute-modified-style-expected.txt      2019-04-15 17:27:40 UTC (rev 244269)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+Tests functionality of attribute modified DOM breakpoints when modifying the inline style attribute.
+
+Adding attribute modified breakpoint to #test...
+PASS: Added attribute modified breakpoint to #test.
+
+== Running test suite: DOMBreakpoints.AttributeModified.Style
+-- Running test case: DOMBreakpoints.AttributeModified.Style.Add
+Getting 'display'...
+PASS: 'display' should have the value ''.
+Setting 'display: none;'...
+PASS: Paused.
+Getting 'display'...
+PASS: 'display' should have the value ''.
+PASS: Resumed.
+Getting 'display'...
+PASS: 'display' should have the value 'none'.
+
+-- Running test case: DOMBreakpoints.AttributeModified.Style.ReplaceSame
+Getting 'display'...
+PASS: 'display' should have the value 'none'.
+Setting 'display: none;'...
+PASS: Paused.
+Getting 'display'...
+PASS: 'display' should have the value 'none'.
+PASS: Resumed.
+Getting 'display'...
+PASS: 'display' should have the value 'none'.
+
+-- Running test case: DOMBreakpoints.AttributeModified.Style.ReplaceDifferent
+Getting 'display'...
+PASS: 'display' should have the value 'none'.
+Setting 'display: block;'...
+PASS: Paused.
+Getting 'display'...
+PASS: 'display' should have the value 'none'.
+PASS: Resumed.
+Getting 'display'...
+PASS: 'display' should have the value 'block'.
+
+-- Running test case: DOMBreakpoints.AttributeModified.Style.Remove
+Getting 'display'...
+PASS: 'display' should have the value 'block'.
+Removing 'display'...
+PASS: Paused.
+Getting 'display'...
+PASS: 'display' should have the value 'block'.
+PASS: Resumed.
+Getting 'display'...
+PASS: 'display' should have the value ''.
+
+-- Running test case: DOMBreakpoints.AttributeModified.Style.Text
+Getting 'display'...
+PASS: 'display' should have the value ''.
+Setting style text to ''...
+PASS: Paused.
+Getting 'display'...
+PASS: 'display' should have the value ''.
+PASS: Resumed.
+Getting 'display'...
+PASS: 'display' should have the value 'none'.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomdebuggerattributemodifiedstylehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/dom-debugger/attribute-modified-style.html (0 => 244269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom-debugger/attribute-modified-style.html                           (rev 0)
+++ trunk/LayoutTests/inspector/dom-debugger/attribute-modified-style.html      2019-04-15 17:27:40 UTC (rev 244269)
</span><span class="lines">@@ -0,0 +1,147 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
+<script src="../debugger/resources/log-active-stack-trace.js"></script>
+<script>
+
+function getProperty(name) {
+    let node = document.getElementById("test");
+    return node.style.getPropertyValue(name);
+}
+
+function setProperty(name, value) {
+    let node = document.getElementById("test");
+    if (value)
+        node.style.setProperty(name, value);
+    else
+        node.style.removeProperty(name);
+}
+
+function test()
+{
+    InspectorTest.debug();
+
+    let suite = InspectorTest.createAsyncSuite("DOMBreakpoints.AttributeModified.Style");
+
+    async function checkPropertyValue(name, expectedValue) {
+        InspectorTest.log(`Getting '${name}'...`);
+        let value = await InspectorTest.evaluateInPage(`getProperty("${name}")`);
+        InspectorTest.expectEqual(value, expectedValue, `'${name}' should have the value '${expectedValue}'.`);
+    }
+
+    function addTestCase({name, propertyName, propertyValueBefore, propertyValueAfter}) {
+        suite.addTestCase({
+            name,
+            async test() {
+                await checkPropertyValue(propertyName, propertyValueBefore);
+
+                let pausedPromise = WI.debuggerManager.awaitEvent(WI.DebuggerManager.Event.Paused);
+
+                if (propertyValueAfter)
+                    InspectorTest.log(`Setting '${propertyName}: ${propertyValueAfter};'...`);
+                else
+                    InspectorTest.log(`Removing '${propertyName}'...`);
+                let evaluatePromise = InspectorTest.evaluateInPage(`setProperty("${propertyName}", "${propertyValueAfter}")`);
+
+                await pausedPromise;
+                InspectorTest.pass("Paused.");
+
+                await checkPropertyValue(propertyName, propertyValueBefore);
+
+                await WI.debuggerManager.resume();
+                InspectorTest.pass("Resumed.");
+
+                await evaluatePromise;
+
+                await checkPropertyValue(propertyName, propertyValueAfter);
+            },
+        });
+    }
+
+    addTestCase({
+        name: "DOMBreakpoints.AttributeModified.Style.Add",
+        propertyName: "display",
+        propertyValueBefore: "",
+        propertyValueAfter: "none",
+    });
+    addTestCase({
+        name: "DOMBreakpoints.AttributeModified.Style.ReplaceSame",
+        propertyName: "display",
+        propertyValueBefore: "none",
+        propertyValueAfter: "none",
+    });
+    addTestCase({
+        name: "DOMBreakpoints.AttributeModified.Style.ReplaceDifferent",
+        propertyName: "display",
+        propertyValueBefore: "none",
+        propertyValueAfter: "block",
+    });
+    addTestCase({
+        name: "DOMBreakpoints.AttributeModified.Style.Remove",
+        propertyName: "display",
+        propertyValueBefore: "block",
+        propertyValueAfter: "",
+    });
+
+    suite.addTestCase({
+        name: "DOMBreakpoints.AttributeModified.Style.Text",
+        async test() {
+            await checkPropertyValue("display", "");
+
+            let pausedPromise = WI.debuggerManager.awaitEvent(WI.DebuggerManager.Event.Paused);
+
+            InspectorTest.log(`Setting style text to ''...`);
+            let evaluatePromise = InspectorTest.evaluateInPage(`document.getElementById("test").style.cssText = "display: none;";`);
+
+            await pausedPromise;
+            InspectorTest.pass("Paused.");
+
+            await checkPropertyValue("display", "");
+
+            await WI.debuggerManager.resume();
+            InspectorTest.pass("Resumed.");
+
+            await evaluatePromise;
+
+            await checkPropertyValue("display", "none");
+        },
+    });
+
+    WI.domManager.requestDocument((documentNode) => {
+        if (!documentNode) {
+            InspectorTest.fail("Missing document node");
+            InspectorTest.completeTest();
+            return;
+        }
+
+        WI.domManager.querySelector(documentNode.id, "#test", async (nodeId) => {
+            let testNode = WI.domManager.nodeForId(nodeId);
+            if (!testNode) {
+                InspectorTest.fail("Missing #test node");
+                InspectorTest.completeTest();
+                return;
+            }
+
+            let promise = WI.domDebuggerManager.awaitEvent(WI.DOMDebuggerManager.Event.DOMBreakpointAdded)
+            .then((event) => {
+                InspectorTest.pass("Added attribute modified breakpoint to #test.");
+            });
+
+            InspectorTest.log("Adding attribute modified breakpoint to #test...");
+            WI.domDebuggerManager.addDOMBreakpoint(new WI.DOMBreakpoint(testNode, WI.DOMBreakpoint.Type.AttributeModified));
+            await promise;
+
+            InspectorTest.assert(!WI.debuggerManager.paused, "Should not be paused.");
+
+            suite.runTestCasesAndFinish();
+        });
+    });
+}
+</script>
+</head>
+<body onload="runTest()">
+    <p>Tests functionality of attribute modified DOM breakpoints when modifying the inline style attribute.</p>
+    <div id="test"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (244268 => 244269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2019-04-15 17:27:27 UTC (rev 244268)
+++ trunk/Source/WebCore/ChangeLog      2019-04-15 17:27:40 UTC (rev 244269)
</span><span class="lines">@@ -1,5 +1,40 @@
</span><span class="cx"> 2019-04-15  Devin Rousso  <drousso@apple.com>
</span><span class="cx"> 
</span><ins>+        Web Inspector: DOMDebugger: "Attribute Modified" breakpoints pause after the modification occurs for the style attribute
+        https://bugs.webkit.org/show_bug.cgi?id=196556
+        <rdar://problem/49570681>
+
+        Reviewed by Timothy Hatcher.
+
+        Test: inspector/dom-debugger/attribute-modified-style.html
+
+        * css/PropertySetCSSStyleDeclaration.h:
+        * css/PropertySetCSSStyleDeclaration.cpp:
+        (WebCore::StyleAttributeMutationScope::~StyleAttributeMutationScope):
+        (WebCore::InlineCSSStyleDeclaration::willMutate): Added.
+
+        * dom/StyledElement.cpp:
+        (WebCore::StyledElement::styleAttributeChanged):
+        (WebCore::StyledElement::inlineStyleChanged):
+
+        * inspector/InspectorInstrumentation.h:
+        (WebCore::InspectorInstrumentation::willInvalidateStyleAttr): Added.
+        (WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
+        * inspector/InspectorInstrumentation.cpp:
+        (WebCore::InspectorInstrumentation::willInvalidateStyleAttrImpl): Added.
+        (WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):
+
+        * inspector/agents/InspectorDOMAgent.h:
+        * inspector/agents/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::didInvalidateStyleAttr):
+
+        * inspector/agents/InspectorDOMDebuggerAgent.h:
+        * inspector/agents/InspectorDOMDebuggerAgent.cpp:
+        (WebCore::InspectorDOMDebuggerAgent::willInvalidateStyleAttr): Added.
+        (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr): Deleted.
+
+2019-04-15  Devin Rousso  <drousso@apple.com>
+
</ins><span class="cx">         Web Inspector: Elements: event listener change events should only be fired for the selected node and it's ancestors
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=196887
</span><span class="cx">         <rdar://problem/49870627>
</span></span></pre></div>
<a id="trunkSourceWebCorecssPropertySetCSSStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp (244268 => 244269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp      2019-04-15 17:27:27 UTC (rev 244268)
+++ trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp 2019-04-15 17:27:40 UTC (rev 244269)
</span><span class="lines">@@ -104,8 +104,9 @@
</span><span class="cx">         PropertySetCSSStyleDeclaration* localCopyStyleDecl = s_currentDecl;
</span><span class="cx">         s_currentDecl = nullptr;
</span><span class="cx">         s_shouldNotifyInspector = false;
</span><del>-        if (localCopyStyleDecl->parentElement())
-            InspectorInstrumentation::didInvalidateStyleAttr(localCopyStyleDecl->parentElement()->document(), *localCopyStyleDecl->parentElement());
</del><ins>+
+        if (auto* parentElement = localCopyStyleDecl->parentElement())
+            InspectorInstrumentation::didInvalidateStyleAttr(*parentElement);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     void enqueueMutationRecord()
</span><span class="lines">@@ -421,6 +422,13 @@
</span><span class="cx">     m_propertySet->ref();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool InlineCSSStyleDeclaration::willMutate()
+{
+    if (m_parentElement)
+        InspectorInstrumentation::willInvalidateStyleAttr(*m_parentElement);
+    return true;
+}
+
</ins><span class="cx"> void InlineCSSStyleDeclaration::didMutate(MutationType type)
</span><span class="cx"> {
</span><span class="cx">     if (type == NoChanges)
</span></span></pre></div>
<a id="trunkSourceWebCorecssPropertySetCSSStyleDeclarationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.h (244268 => 244269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.h        2019-04-15 17:27:27 UTC (rev 244268)
+++ trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.h   2019-04-15 17:27:40 UTC (rev 244269)
</span><span class="lines">@@ -134,6 +134,7 @@
</span><span class="cx">     StyledElement* parentElement() const final { return m_parentElement; }
</span><span class="cx">     void clearParentElement() final { m_parentElement = nullptr; }
</span><span class="cx"> 
</span><ins>+    bool willMutate() final WARN_UNUSED_RETURN;
</ins><span class="cx">     void didMutate(MutationType) final;
</span><span class="cx">     CSSParserContext cssParserContext() const final;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomStyledElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/StyledElement.cpp (244268 => 244269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/StyledElement.cpp       2019-04-15 17:27:27 UTC (rev 244268)
+++ trunk/Source/WebCore/dom/StyledElement.cpp  2019-04-15 17:27:40 UTC (rev 244269)
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx">     elementData()->setStyleAttributeIsDirty(false);
</span><span class="cx"> 
</span><span class="cx">     invalidateStyle();
</span><del>-    InspectorInstrumentation::didInvalidateStyleAttr(document(), *this);
</del><ins>+    InspectorInstrumentation::didInvalidateStyleAttr(*this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void StyledElement::invalidateStyleAttribute()
</span><span class="lines">@@ -231,7 +231,7 @@
</span><span class="cx"> void StyledElement::inlineStyleChanged()
</span><span class="cx"> {
</span><span class="cx">     invalidateStyleAttribute();
</span><del>-    InspectorInstrumentation::didInvalidateStyleAttr(document(), *this);
</del><ins>+    InspectorInstrumentation::didInvalidateStyleAttr(*this);
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> bool StyledElement::setInlineStyleProperty(CSSPropertyID propertyID, CSSValueID identifier, bool important)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorInstrumentationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (244268 => 244269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp      2019-04-15 17:27:27 UTC (rev 244268)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2019-04-15 17:27:40 UTC (rev 244269)
</span><span class="lines">@@ -188,14 +188,18 @@
</span><span class="cx">         domAgent->didRemoveDOMAttr(element, name);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didInvalidateStyleAttrImpl(InstrumentingAgents& instrumentingAgents, Node& node)
</del><ins>+void InspectorInstrumentation::willInvalidateStyleAttrImpl(InstrumentingAgents& instrumentingAgents, Element& element)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
-        domAgent->didInvalidateStyleAttr(node);
-    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents.inspectorDOMDebuggerAgent())
-        domDebuggerAgent->didInvalidateStyleAttr(node);
</del><ins>+    if (auto* domDebuggerAgent = instrumentingAgents.inspectorDOMDebuggerAgent())
+        domDebuggerAgent->willInvalidateStyleAttr(element);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void InspectorInstrumentation::didInvalidateStyleAttrImpl(InstrumentingAgents& instrumentingAgents, Element& element)
+{
+    if (auto* domAgent = instrumentingAgents.inspectorDOMAgent())
+        domAgent->didInvalidateStyleAttr(element);
+}
+
</ins><span class="cx"> void InspectorInstrumentation::documentDetachedImpl(InstrumentingAgents& instrumentingAgents, Document& document)
</span><span class="cx"> {
</span><span class="cx">     if (InspectorCSSAgent* cssAgent = instrumentingAgents.inspectorCSSAgent())
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorInstrumentationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (244268 => 244269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h        2019-04-15 17:27:27 UTC (rev 244268)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h   2019-04-15 17:27:40 UTC (rev 244269)
</span><span class="lines">@@ -115,7 +115,8 @@
</span><span class="cx">     static void didModifyDOMAttr(Document&, Element&, const AtomicString& name, const AtomicString& value);
</span><span class="cx">     static void didRemoveDOMAttr(Document&, Element&, const AtomicString& name);
</span><span class="cx">     static void characterDataModified(Document&, CharacterData&);
</span><del>-    static void didInvalidateStyleAttr(Document&, Node&);
</del><ins>+    static void willInvalidateStyleAttr(Element&);
+    static void didInvalidateStyleAttr(Element&);
</ins><span class="cx">     static void documentDetached(Document&);
</span><span class="cx">     static void frameWindowDiscarded(Frame&, DOMWindow*);
</span><span class="cx">     static void mediaQueryResultChanged(Document&);
</span><span class="lines">@@ -308,7 +309,8 @@
</span><span class="cx">     static void didModifyDOMAttrImpl(InstrumentingAgents&, Element&, const AtomicString& name, const AtomicString& value);
</span><span class="cx">     static void didRemoveDOMAttrImpl(InstrumentingAgents&, Element&, const AtomicString& name);
</span><span class="cx">     static void characterDataModifiedImpl(InstrumentingAgents&, CharacterData&);
</span><del>-    static void didInvalidateStyleAttrImpl(InstrumentingAgents&, Node&);
</del><ins>+    static void willInvalidateStyleAttrImpl(InstrumentingAgents&, Element&);
+    static void didInvalidateStyleAttrImpl(InstrumentingAgents&, Element&);
</ins><span class="cx">     static void documentDetachedImpl(InstrumentingAgents&, Document&);
</span><span class="cx">     static void frameWindowDiscardedImpl(InstrumentingAgents&, DOMWindow*);
</span><span class="cx">     static void mediaQueryResultChangedImpl(InstrumentingAgents&);
</span><span class="lines">@@ -552,13 +554,20 @@
</span><span class="cx">         didRemoveDOMAttrImpl(*instrumentingAgents, element, name);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didInvalidateStyleAttr(Document& document, Node& node)
</del><ins>+inline void InspectorInstrumentation::willInvalidateStyleAttr(Element& element)
</ins><span class="cx"> {
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><del>-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
-        didInvalidateStyleAttrImpl(*instrumentingAgents, node);
</del><ins>+    if (auto* instrumentingAgents = instrumentingAgentsForDocument(element.document()))
+        willInvalidateStyleAttrImpl(*instrumentingAgents, element);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline void InspectorInstrumentation::didInvalidateStyleAttr(Element& element)
+{
+    FAST_RETURN_IF_NO_FRONTENDS(void());
+    if (auto* instrumentingAgents = instrumentingAgentsForDocument(element.document()))
+        didInvalidateStyleAttrImpl(*instrumentingAgents, element);
+}
+
</ins><span class="cx"> inline void InspectorInstrumentation::documentDetached(Document& document)
</span><span class="cx"> {
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectoragentsInspectorDOMAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp (244268 => 244269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp      2019-04-15 17:27:27 UTC (rev 244268)
+++ trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp 2019-04-15 17:27:40 UTC (rev 244269)
</span><span class="lines">@@ -2311,15 +2311,15 @@
</span><span class="cx">     m_frontendDispatcher->characterDataModified(id, characterData.data());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorDOMAgent::didInvalidateStyleAttr(Node& node)
</del><ins>+void InspectorDOMAgent::didInvalidateStyleAttr(Element& element)
</ins><span class="cx"> {
</span><del>-    int id = m_documentNodeToIdMap.get(&node);
</del><ins>+    int id = m_documentNodeToIdMap.get(&element);
</ins><span class="cx">     if (!id)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (!m_revalidateStyleAttrTask)
</span><span class="cx">         m_revalidateStyleAttrTask = std::make_unique<RevalidateStyleAttributeTask>(this);
</span><del>-    m_revalidateStyleAttrTask->scheduleFor(downcast<Element>(&node));
</del><ins>+    m_revalidateStyleAttrTask->scheduleFor(&element);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorDOMAgent::didPushShadowRoot(Element& host, ShadowRoot& root)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectoragentsInspectorDOMAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.h (244268 => 244269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.h        2019-04-15 17:27:27 UTC (rev 244268)
+++ trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.h   2019-04-15 17:27:40 UTC (rev 244269)
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx">     void didModifyDOMAttr(Element&, const AtomicString& name, const AtomicString& value);
</span><span class="cx">     void didRemoveDOMAttr(Element&, const AtomicString& name);
</span><span class="cx">     void characterDataModified(CharacterData&);
</span><del>-    void didInvalidateStyleAttr(Node&);
</del><ins>+    void didInvalidateStyleAttr(Element&);
</ins><span class="cx">     void didPushShadowRoot(Element& host, ShadowRoot&);
</span><span class="cx">     void willPopShadowRoot(Element& host, ShadowRoot&);
</span><span class="cx">     void didChangeCustomElementState(Element&);
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectoragentsInspectorDOMDebuggerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.cpp (244268 => 244269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.cpp      2019-04-15 17:27:27 UTC (rev 244268)
+++ trunk/Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.cpp 2019-04-15 17:27:40 UTC (rev 244269)
</span><span class="lines">@@ -170,14 +170,14 @@
</span><span class="cx">     m_eventBreakpoints.remove(std::make_pair(*breakpointType, eventName));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorDOMDebuggerAgent::didInvalidateStyleAttr(Node& node)
</del><ins>+void InspectorDOMDebuggerAgent::willInvalidateStyleAttr(Element& element)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_debuggerAgent->breakpointsActive())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (hasBreakpoint(&node, AttributeModified)) {
</del><ins>+    if (hasBreakpoint(&element, AttributeModified)) {
</ins><span class="cx">         Ref<JSON::Object> eventData = JSON::Object::create();
</span><del>-        descriptionForDOMEvent(node, AttributeModified, false, eventData.get());
</del><ins>+        descriptionForDOMEvent(element, AttributeModified, false, eventData.get());
</ins><span class="cx">         m_debuggerAgent->breakProgram(Inspector::DebuggerFrontendDispatcher::Reason::DOM, WTFMove(eventData));
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectoragentsInspectorDOMDebuggerAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.h (244268 => 244269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.h        2019-04-15 17:27:27 UTC (rev 244268)
+++ trunk/Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.h   2019-04-15 17:27:40 UTC (rev 244269)
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx"> 
</span><span class="cx">     // InspectorInstrumentation
</span><span class="cx">     void willInsertDOMNode(Node& parent);
</span><del>-    void didInvalidateStyleAttr(Node&);
</del><ins>+    void willInvalidateStyleAttr(Element&);
</ins><span class="cx">     void didInsertDOMNode(Node&);
</span><span class="cx">     void willRemoveDOMNode(Node&);
</span><span class="cx">     void didRemoveDOMNode(Node&);
</span></span></pre>
</div>
</div>

</body>
</html>