- Revision
- 241879
- Author
- [email protected]
- Date
- 2019-02-21 13:26:45 -0800 (Thu, 21 Feb 2019)
Log Message
Cherry-pick r241547. rdar://problem/48220627
Web Inspector: don't include accessibility role in DOM.Node object payloads
https://bugs.webkit.org/show_bug.cgi?id=194623
<rdar://problem/36384037>
Reviewed by Devin Rousso.
Source/_javascript_Core:
Remove property of DOM.Node that is no longer being sent.
* inspector/protocol/DOM.json:
Source/WebCore:
Accessibility properties are complicated to fetch at all the points where we want to build and push nodes immediately.
Turning on AX often indirectly causes style recalc and layout. This is bad because we are often building nodes in the
first place due to a DOM node tree update (i.e., NodeInserted).
It turns out that DOM.getAccessibilityPropertiesForNode is called every time we display
the computed role in the Elements Tab > Nodes Sidebar > Accessibility Section. So it is not
necessary to collect this information in a problematic way when initially pushing the node, as
it will be updated anyway.
No new tests, no change in behavior.
* inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForNode):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-607-branch/Source/_javascript_Core/ChangeLog (241878 => 241879)
--- branches/safari-607-branch/Source/_javascript_Core/ChangeLog 2019-02-21 21:26:42 UTC (rev 241878)
+++ branches/safari-607-branch/Source/_javascript_Core/ChangeLog 2019-02-21 21:26:45 UTC (rev 241879)
@@ -1,3 +1,49 @@
+2019-02-20 Alan Coon <[email protected]>
+
+ Cherry-pick r241547. rdar://problem/48220627
+
+ Web Inspector: don't include accessibility role in DOM.Node object payloads
+ https://bugs.webkit.org/show_bug.cgi?id=194623
+ <rdar://problem/36384037>
+
+ Reviewed by Devin Rousso.
+
+ Source/_javascript_Core:
+
+ Remove property of DOM.Node that is no longer being sent.
+
+ * inspector/protocol/DOM.json:
+
+ Source/WebCore:
+
+ Accessibility properties are complicated to fetch at all the points where we want to build and push nodes immediately.
+ Turning on AX often indirectly causes style recalc and layout. This is bad because we are often building nodes in the
+ first place due to a DOM node tree update (i.e., NodeInserted).
+
+ It turns out that DOM.getAccessibilityPropertiesForNode is called every time we display
+ the computed role in the Elements Tab > Nodes Sidebar > Accessibility Section. So it is not
+ necessary to collect this information in a problematic way when initially pushing the node, as
+ it will be updated anyway.
+
+ No new tests, no change in behavior.
+
+ * inspector/agents/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForNode):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-02-13 Brian Burg <[email protected]>
+
+ Web Inspector: don't include accessibility role in DOM.Node object payloads
+ https://bugs.webkit.org/show_bug.cgi?id=194623
+ <rdar://problem/36384037>
+
+ Reviewed by Devin Rousso.
+
+ Remove property of DOM.Node that is no longer being sent.
+
+ * inspector/protocol/DOM.json:
+
2019-02-13 Alan Coon <[email protected]>
Cherry-pick r241267. rdar://problem/47971556
Modified: branches/safari-607-branch/Source/_javascript_Core/inspector/protocol/DOM.json (241878 => 241879)
--- branches/safari-607-branch/Source/_javascript_Core/inspector/protocol/DOM.json 2019-02-21 21:26:42 UTC (rev 241878)
+++ branches/safari-607-branch/Source/_javascript_Core/inspector/protocol/DOM.json 2019-02-21 21:26:45 UTC (rev 241879)
@@ -65,7 +65,6 @@
{ "name": "shadowRoots", "type": "array", "optional": true, "items": { "$ref": "Node" }, "description": "Shadow root list for given element host." },
{ "name": "templateContent", "$ref": "Node", "optional": true, "description": "Content document fragment for template elements" },
{ "name": "pseudoElements", "type": "array", "items": { "$ref": "Node" }, "optional": true, "description": "Pseudo elements associated with this node." },
- { "name": "role", "type": "string", "optional": true, "description": "Computed value for first recognized role token, default role per element, or overridden role." },
{ "name": "contentSecurityPolicyHash", "type": "string", "optional": true, "description": "Computed SHA-256 Content Security Policy hash source for given element." }
]
},
Modified: branches/safari-607-branch/Source/WebCore/ChangeLog (241878 => 241879)
--- branches/safari-607-branch/Source/WebCore/ChangeLog 2019-02-21 21:26:42 UTC (rev 241878)
+++ branches/safari-607-branch/Source/WebCore/ChangeLog 2019-02-21 21:26:45 UTC (rev 241879)
@@ -1,5 +1,61 @@
2019-02-20 Alan Coon <[email protected]>
+ Cherry-pick r241547. rdar://problem/48220627
+
+ Web Inspector: don't include accessibility role in DOM.Node object payloads
+ https://bugs.webkit.org/show_bug.cgi?id=194623
+ <rdar://problem/36384037>
+
+ Reviewed by Devin Rousso.
+
+ Source/_javascript_Core:
+
+ Remove property of DOM.Node that is no longer being sent.
+
+ * inspector/protocol/DOM.json:
+
+ Source/WebCore:
+
+ Accessibility properties are complicated to fetch at all the points where we want to build and push nodes immediately.
+ Turning on AX often indirectly causes style recalc and layout. This is bad because we are often building nodes in the
+ first place due to a DOM node tree update (i.e., NodeInserted).
+
+ It turns out that DOM.getAccessibilityPropertiesForNode is called every time we display
+ the computed role in the Elements Tab > Nodes Sidebar > Accessibility Section. So it is not
+ necessary to collect this information in a problematic way when initially pushing the node, as
+ it will be updated anyway.
+
+ No new tests, no change in behavior.
+
+ * inspector/agents/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForNode):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-02-13 Brian Burg <[email protected]>
+
+ Web Inspector: don't include accessibility role in DOM.Node object payloads
+ https://bugs.webkit.org/show_bug.cgi?id=194623
+ <rdar://problem/36384037>
+
+ Reviewed by Devin Rousso.
+
+ Accessibility properties are complicated to fetch at all the points where we want to build and push nodes immediately.
+ Turning on AX often indirectly causes style recalc and layout. This is bad because we are often building nodes in the
+ first place due to a DOM node tree update (i.e., NodeInserted).
+
+ It turns out that DOM.getAccessibilityPropertiesForNode is called every time we display
+ the computed role in the Elements Tab > Nodes Sidebar > Accessibility Section. So it is not
+ necessary to collect this information in a problematic way when initially pushing the node, as
+ it will be updated anyway.
+
+ No new tests, no change in behavior.
+
+ * inspector/agents/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForNode):
+
+2019-02-20 Alan Coon <[email protected]>
+
Cherry-pick r241492. rdar://problem/48243254
[Mac] PiP window can get "stuck" if PiP is closed while Safari window is minimized.
Modified: branches/safari-607-branch/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp (241878 => 241879)
--- branches/safari-607-branch/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp 2019-02-21 21:26:42 UTC (rev 241878)
+++ branches/safari-607-branch/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp 2019-02-21 21:26:45 UTC (rev 241879)
@@ -1594,15 +1594,6 @@
value->setShadowRootType(shadowRootType(shadowRoot.mode()));
}
- // Need to enable AX to get the computed role.
- if (!WebCore::AXObjectCache::accessibilityEnabled())
- WebCore::AXObjectCache::enableAccessibility();
-
- if (AXObjectCache* axObjectCache = node->document().axObjectCache()) {
- if (AccessibilityObject* axObject = axObjectCache->getOrCreate(node))
- value->setRole(axObject->computedRoleString());
- }
-
return value;
}
Modified: branches/safari-607-branch/Source/WebInspectorUI/UserInterface/Models/DOMNode.js (241878 => 241879)
--- branches/safari-607-branch/Source/WebInspectorUI/UserInterface/Models/DOMNode.js 2019-02-21 21:26:42 UTC (rev 241878)
+++ branches/safari-607-branch/Source/WebInspectorUI/UserInterface/Models/DOMNode.js 2019-02-21 21:26:45 UTC (rev 241879)
@@ -48,7 +48,7 @@
this._nodeValue = payload.nodeValue;
this._pseudoType = payload.pseudoType;
this._shadowRootType = payload.shadowRootType;
- this._computedRole = payload.role;
+ this._computedRole = null;
this._contentSecurityPolicyHash = payload.contentSecurityPolicyHash;
if (this._nodeType === Node.DOCUMENT_NODE)
@@ -566,6 +566,8 @@
function accessibilityPropertiesCallback(error, accessibilityProperties)
{
if (!error && callback && accessibilityProperties) {
+ this._computedRole = accessibilityProperties.role;
+
callback({
activeDescendantNodeId: accessibilityProperties.activeDescendantNodeId,
busy: accessibilityProperties.busy,