Title: [219779] branches/safari-604-branch
- Revision
- 219779
- Author
- [email protected]
- Date
- 2017-07-22 23:51:08 -0700 (Sat, 22 Jul 2017)
Log Message
Cherry-pick r219661. rdar://problem/33465132
Modified Paths
Added Paths
Diff
Modified: branches/safari-604-branch/LayoutTests/ChangeLog (219778 => 219779)
--- branches/safari-604-branch/LayoutTests/ChangeLog 2017-07-23 06:51:05 UTC (rev 219778)
+++ branches/safari-604-branch/LayoutTests/ChangeLog 2017-07-23 06:51:08 UTC (rev 219779)
@@ -1,5 +1,19 @@
2017-07-22 Jason Marcell <[email protected]>
+ Cherry-pick r219661. rdar://problem/33465132
+
+ 2017-07-19 Nan Wang <[email protected]>
+
+ AX: Web page reloaded when a node is labelling multiple childnodes
+ https://bugs.webkit.org/show_bug.cgi?id=174655
+
+ Reviewed by Chris Fleizach.
+
+ * accessibility/mac/aria-labelledby-multiple-child-crash-expected.txt: Added.
+ * accessibility/mac/aria-labelledby-multiple-child-crash.html: Added.
+
+2017-07-22 Jason Marcell <[email protected]>
+
Cherry-pick r219625. rdar://problem/33465689
2017-07-18 Antoine Quint <[email protected]>
Added: branches/safari-604-branch/LayoutTests/accessibility/mac/aria-labelledby-multiple-child-crash-expected.txt (0 => 219779)
--- branches/safari-604-branch/LayoutTests/accessibility/mac/aria-labelledby-multiple-child-crash-expected.txt (rev 0)
+++ branches/safari-604-branch/LayoutTests/accessibility/mac/aria-labelledby-multiple-child-crash-expected.txt 2017-07-23 06:51:08 UTC (rev 219779)
@@ -0,0 +1,14 @@
+Header
+Header2
+Description text
+
+This tests that when a node is labelling multiple child nodes it won't cause crash.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+AXDescription: Description text
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: branches/safari-604-branch/LayoutTests/accessibility/mac/aria-labelledby-multiple-child-crash.html (0 => 219779)
--- branches/safari-604-branch/LayoutTests/accessibility/mac/aria-labelledby-multiple-child-crash.html (rev 0)
+++ branches/safari-604-branch/LayoutTests/accessibility/mac/aria-labelledby-multiple-child-crash.html 2017-07-23 06:51:08 UTC (rev 219779)
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<div id="hd">
+<div role="heading" id="heading" aria-level="7" aria-labelledby="hd">Header</div>
+<div role="heading" id="heading2" aria-level="7" aria-labelledby="hd">Header2</div>
+
+<p>Description text</p>
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that when a node is labelling multiple child nodes it won't cause crash.");
+
+ if (window.accessibilityController) {
+
+ var heading = accessibilityController.accessibleElementById("heading");
+ // Do not crash
+ debug(heading.description);
+ }
+
+</script>
+
+<script src=""
+</body>
+</html>
Modified: branches/safari-604-branch/Source/WebCore/ChangeLog (219778 => 219779)
--- branches/safari-604-branch/Source/WebCore/ChangeLog 2017-07-23 06:51:05 UTC (rev 219778)
+++ branches/safari-604-branch/Source/WebCore/ChangeLog 2017-07-23 06:51:08 UTC (rev 219779)
@@ -1,5 +1,26 @@
2017-07-22 Jason Marcell <[email protected]>
+ Cherry-pick r219661. rdar://problem/33465132
+
+ 2017-07-19 Nan Wang <[email protected]>
+
+ AX: Web page reloaded when a node is labelling multiple childnodes
+ https://bugs.webkit.org/show_bug.cgi?id=174655
+
+ Reviewed by Chris Fleizach.
+
+ When we are asking for the aria-labelledby attribute of a node and its
+ sibling is also labelled by the same node, we get into an infinite loop
+ in textUnderElement since we only ignore one child. Added checks for
+ siblings to avoid such loop.
+
+ Test: accessibility/mac/aria-labelledby-multiple-child-crash.html
+
+ * accessibility/AccessibilityNodeObject.cpp:
+ (WebCore::AccessibilityNodeObject::textUnderElement):
+
+2017-07-22 Jason Marcell <[email protected]>
+
Cherry-pick r219645. rdar://problem/33464440
2017-07-18 Zalan Bujtas <[email protected]>
Modified: branches/safari-604-branch/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (219778 => 219779)
--- branches/safari-604-branch/Source/WebCore/accessibility/AccessibilityNodeObject.cpp 2017-07-23 06:51:05 UTC (rev 219778)
+++ branches/safari-604-branch/Source/WebCore/accessibility/AccessibilityNodeObject.cpp 2017-07-23 06:51:08 UTC (rev 219779)
@@ -1731,6 +1731,14 @@
continue;
if (is<AccessibilityNodeObject>(*child)) {
+ // We should ignore the child if it's labeled by this node.
+ // This could happen when this node labels multiple child nodes and we didn't
+ // skip in the above ignoredChildNode check.
+ Vector<Element*> labeledByElements;
+ downcast<AccessibilityNodeObject>(*child).ariaLabeledByElements(labeledByElements);
+ if (labeledByElements.contains(node))
+ continue;
+
Vector<AccessibilityText> textOrder;
downcast<AccessibilityNodeObject>(*child).alternativeText(textOrder);
if (textOrder.size() > 0 && textOrder[0].text.length()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes