Skip to content

Commit

Permalink
Unreviewed build fix. rdar://problem/91519558
Browse files Browse the repository at this point in the history
./rendering/RenderElement.cpp:723:21:|error: out-of-line definition of 'moveLayers' does not match any declaration in 'WebCore::RenderElement'

Canonical link: https://commits.webkit.org/245886.581@safari-613-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-613-branch@295003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
alancoon committed May 28, 2022
1 parent 6a5122b commit 905f5f3
Show file tree
Hide file tree
Showing 41 changed files with 1,271 additions and 166 deletions.
129 changes: 129 additions & 0 deletions LayoutTests/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,132 @@
2022-05-25 Alan Coon <alancoon@apple.com>

Cherry-pick 1a810ee6f98a. rdar://problem/87980543

Expose the correct role, subrole and role description properties for the <dialog> element.
https://bugs.webkit.org/show_bug.cgi?id=236359

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/dialog-properties.html

Elements with role="dialog" are exposed to accessibility clients with
role AXGroup, subrole AXApplicationDialog and role description
"web dialog". This patch implements this behavior for the <dialog>
element.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRoleFromNode const):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::defaultObjectInclusion const):

LayoutTests:

Tests that these AX properties have the expected values both when the
dialog is shown modal or modeless.

* accessibility/dialog-properties-expected.txt: Added.
* accessibility/dialog-properties.html: Added.

Canonical link: https://commits.webkit.org/247198@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289713 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2022-02-13 Andres Gonzalez <andresg_22@apple.com>

Expose the correct role, subrole and role description properties for the <dialog> element.
https://bugs.webkit.org/show_bug.cgi?id=236359

Reviewed by Chris Fleizach.

Tests that these AX properties have the expected values both when the
dialog is shown modal or modeless.

* accessibility/dialog-properties-expected.txt: Added.
* accessibility/dialog-properties.html: Added.

2022-05-19 Alan Coon <alancoon@apple.com>

Cherry-pick r294234. rdar://problem/93602100

Web Inspector: Regression(r266885) Crash sometimes when rehydrating imported audit results
https://bugs.webkit.org/show_bug.cgi?id=240366

Reviewed by Devin Rousso.

Source/JavaScriptCore:

* inspector/protocol/DOM.json:

Source/WebCore:

Added test cases to inspector/model/dom-node.html

After r266885, there is no path to handle the possibility that there may not be a resulting node for calls to
`DOM.querySelector`. To correct this, mark the return value as optional (Web Inspector frontend already treats
it as optional) and return early if there was no Element matching the selector.

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

LayoutTests:

* inspector/model/dom-node.html:
* inspector/model/dom-node-expected.txt:

Canonical link: https://commits.webkit.org/250592@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294234 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2022-05-16 Patrick Angle <pangle@apple.com>

Web Inspector: Regression(r266885) Crash sometimes when rehydrating imported audit results
https://bugs.webkit.org/show_bug.cgi?id=240366

Reviewed by Devin Rousso.

* inspector/model/dom-node.html:
* inspector/model/dom-node-expected.txt:

2022-05-19 Alan Coon <alancoon@apple.com>

Cherry-pick r293819. rdar://problem/93602086

Crash in WindowProxy::setDOMWindow
https://bugs.webkit.org/show_bug.cgi?id=232763

Patch by Alex Christensen <achristensen@webkit.org> on 2022-05-04
Reviewed by Chris Dumez.

Source/WebCore:

Add a few null checks here and there.

Test: fast/dom/set-dom-window-without-page.html

* bindings/js/WindowProxy.cpp:
(WebCore::WindowProxy::setDOMWindow):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::findFrameForNavigation):

LayoutTests:

* fast/dom/set-dom-window-without-page-expected.txt: Added.
* fast/dom/set-dom-window-without-page.html: Added.

Canonical link: https://commits.webkit.org/250292@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293819 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2022-05-04 Alex Christensen <achristensen@webkit.org>

Crash in WindowProxy::setDOMWindow
https://bugs.webkit.org/show_bug.cgi?id=232763

Reviewed by Chris Dumez.

* fast/dom/set-dom-window-without-page-expected.txt: Added.
* fast/dom/set-dom-window-without-page.html: Added.

2022-05-16 Alan Coon <alancoon@apple.com>

Cherry-pick r294012. rdar://problem/92425915
Expand Down
15 changes: 15 additions & 0 deletions LayoutTests/accessibility/dialog-properties-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
This test verifies several AX properties of the dialog element.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


Modal dialog:
AXRole: AXGroup AXSubrole: AXApplicationDialog AXRoleDescription: web dialog
Modeless dialog:
AXRole: AXGroup AXSubrole: AXApplicationDialog AXRoleDescription: web dialog
PASS successfullyParsed is true

TEST COMPLETE
Just a dialog.

OK Cancel
50 changes: 50 additions & 0 deletions LayoutTests/accessibility/dialog-properties.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test.js"></script>
<script src="../resources/accessibility-helper.js"></script>
</head>
<body id="body">

<dialog id="dialog">
<h3>Just a dialog.</h3>
<button id="ok" onclick="document.getElementById('dialog').close();" class="close-button">OK</button>
<button onclick="document.getElementById('dialog').close();" class="close-button">Cancel</button>
</dialog>

<script>
description("This test verifies several AX properties of the dialog element.");

if (window.accessibilityController) {
window.jsTestIsAsync = true;

setTimeout(async () => {
// Show the dialog as modal.
debug("Modal dialog:");
document.getElementById("dialog").showModal();
let dialog = null;
await waitFor(() => {
dialog = accessibilityController.accessibleElementById("dialog");
return dialog;
});
let properties = `${dialog.role} ${dialog.subrole} ${dialog.roleDescription}`;
debug(properties);

// Dismiss the modal and show the dialog as modeless.
document.getElementById("dialog").close();
debug("Modeless dialog:");
document.getElementById("dialog").show();
dialog = null;
await waitFor(() => {
dialog = accessibilityController.accessibleElementById("dialog");
return dialog;
});
properties = `${dialog.role} ${dialog.subrole} ${dialog.roleDescription}`;
debug(properties);

finishJSTest();
}, 0);
}
</script>
</body>
</html>
2 changes: 2 additions & 0 deletions LayoutTests/fast/dom/set-dom-window-without-page-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONSOLE MESSAGE: this test passes if it does not crash

13 changes: 13 additions & 0 deletions LayoutTests/fast/dom/set-dom-window-without-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script>
if (window.testRunner) { testRunner.dumpAsText(); console.log("this test passes if it does not crash") }
function start() {
window.firstFrame = document.createElement('iframe');
document.body.appendChild(window.firstFrame);
window.secondFrame = document.createElement('iframe');
window.firstFrame.contentDocument.documentElement.appendChild(window.secondFrame);
window.secondFrame.contentWindow.onunload = function() {
document.documentElement.removeChild(window.bodyEl);
};
window.firstFrame.src = 'javascript:"";';
}
</script><body id="bodyEl"onload="start()">
8 changes: 8 additions & 0 deletions LayoutTests/inspector/model/dom-node-expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@ id="test-id"
class="test-class"
data-item="test-data"

-- Running test case: WI.DOMNode.querySelector
Calling querySelector("#test-id") on document node.
PASS: `querySelector("#test-id")` should return a WI.DOMNode
Calling querySelector("#non-existent-id") on document node.
PASS: `querySelector("#non-existent-id")` should return null.
Calling querySelector("^\_(invalid selector)_/^") on document node.
PASS: `querySelector` with an invalid selector should throw a SyntaxError.

28 changes: 28 additions & 0 deletions LayoutTests/inspector/model/dom-node.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,34 @@
}
});

suite.addTestCase({
name: "WI.DOMNode.querySelector",
description: "Test getting a child node via querySelector.",
async test() {
let documentNode = await WI.domManager.requestDocument();

function querySelector(selector) {
InspectorTest.log(`Calling querySelector("${selector}") on document node.`);
return documentNode.querySelector(selector).then((nodeId) => {
if (!nodeId)
return null;
return WI.domManager.nodeForId(nodeId);
});
}

let nodeFromQueryingExistingId = await querySelector("#test-id");
InspectorTest.expectThat(nodeFromQueryingExistingId instanceof WI.DOMNode, "`querySelector(\"#test-id\")` should return a WI.DOMNode");

let nodeFromQueryingNonExistantId = await querySelector("#non-existent-id");
InspectorTest.expectNull(nodeFromQueryingNonExistantId, "`querySelector(\"#non-existent-id\")` should return null.");

await querySelector("^\\_(invalid selector)_/^").catch((error) => {
InspectorTest.expectEqual(error.message, "SyntaxError", "`querySelector` with an invalid selector should throw a SyntaxError.");
});

}
});

suite.runTestCasesAndFinish();
}
</script>
Expand Down
2 changes: 2 additions & 0 deletions LayoutTests/platform/gtk/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -2130,3 +2130,5 @@ webkit.org/b/160119 fast/repaint/selection-gap-flipped-fixed-child.html [ Failur
#////////////////////////////////////////////////////////////////////////////////////////
# UNSORTED Expectations. When in doubt, put it here.
#////////////////////////////////////////////////////////////////////////////////////////

accessibility/dialog-properties.html [ Skip ]
1 change: 1 addition & 0 deletions LayoutTests/platform/win/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -4739,6 +4739,7 @@ webkit.org/b/229300 http/tests/security/no-javascript-refresh-spaces.py [ Pass C

accessibility/selected-state-changed-notifications.html [ Skip ]
accessibility/element-line-rects-and-text.html [ Skip ]
accessibility/dialog-properties.html [ Skip ]

webkit.org/b/229247 http/tests/fetch/keepalive-fetch-2.html [ Pass Failure ]

Expand Down
42 changes: 42 additions & 0 deletions Source/JavaScriptCore/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
2022-05-19 Alan Coon <alancoon@apple.com>

Cherry-pick r294234. rdar://problem/93602100

Web Inspector: Regression(r266885) Crash sometimes when rehydrating imported audit results
https://bugs.webkit.org/show_bug.cgi?id=240366

Reviewed by Devin Rousso.

Source/JavaScriptCore:

* inspector/protocol/DOM.json:

Source/WebCore:

Added test cases to inspector/model/dom-node.html

After r266885, there is no path to handle the possibility that there may not be a resulting node for calls to
`DOM.querySelector`. To correct this, mark the return value as optional (Web Inspector frontend already treats
it as optional) and return early if there was no Element matching the selector.

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

LayoutTests:

* inspector/model/dom-node.html:
* inspector/model/dom-node-expected.txt:

Canonical link: https://commits.webkit.org/250592@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294234 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2022-05-16 Patrick Angle <pangle@apple.com>

Web Inspector: Regression(r266885) Crash sometimes when rehydrating imported audit results
https://bugs.webkit.org/show_bug.cgi?id=240366

Reviewed by Devin Rousso.

* inspector/protocol/DOM.json:

2022-05-16 Alan Coon <alancoon@apple.com>

Cherry-pick r293220. rdar://problem/91924480
Expand Down
Loading

0 comments on commit 905f5f3

Please sign in to comment.