Diff
Modified: branches/safari-604.1.38.1-branch/LayoutTests/ChangeLog (220586 => 220587)
--- branches/safari-604.1.38.1-branch/LayoutTests/ChangeLog 2017-08-11 13:46:59 UTC (rev 220586)
+++ branches/safari-604.1.38.1-branch/LayoutTests/ChangeLog 2017-08-11 15:16:56 UTC (rev 220587)
@@ -1,3 +1,19 @@
+2017-08-11 Jason Marcell <jmarc...@apple.com>
+
+ Cherry-pick r220463. rdar://problem/33594320
+
+ 2017-08-09 Nan Wang <n_w...@apple.com>
+
+ AX: crash at WebCore::AccessibilityObject::supportsARIALiveRegion() const + 24
+ https://bugs.webkit.org/show_bug.cgi?id=175340
+ <rdar://problem/33782159>
+
+ Reviewed by Chris Fleizach.
+
+ * accessibility/add-children-pseudo-element-expected.txt: Added.
+ * accessibility/add-children-pseudo-element.html: Added.
+ * accessibility/resources/svg-circle.svg: Added.
+
2017-08-10 Ryan Haddad <ryanhad...@apple.com>
Unreviwed test gardening. rdar://problem/33789505
Added: branches/safari-604.1.38.1-branch/LayoutTests/accessibility/add-children-pseudo-element-expected.txt (0 => 220587)
--- branches/safari-604.1.38.1-branch/LayoutTests/accessibility/add-children-pseudo-element-expected.txt (rev 0)
+++ branches/safari-604.1.38.1-branch/LayoutTests/accessibility/add-children-pseudo-element-expected.txt 2017-08-11 15:16:56 UTC (rev 220587)
@@ -0,0 +1,12 @@
+Language Email
+Make sure that we are updating the render block flow element's children correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS element.childrenCount is 3
+PASS element.childrenCount is 2
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: branches/safari-604.1.38.1-branch/LayoutTests/accessibility/add-children-pseudo-element.html (0 => 220587)
--- branches/safari-604.1.38.1-branch/LayoutTests/accessibility/add-children-pseudo-element.html (rev 0)
+++ branches/safari-604.1.38.1-branch/LayoutTests/accessibility/add-children-pseudo-element.html 2017-08-11 15:16:56 UTC (rev 220587)
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+
+<style>
+.pseudo::after {
+ content: url(resources/svg-circle.svg);
+ width: 18px;
+ height: 20px;
+ position: absolute;
+ margin-top: 6px;
+ right: 6px
+}
+
+.pseudo.hidden::after {
+ content: ' ';
+}
+</style>
+
+<body id="body">
+
+<div id="container">
+<div id="test" style="float : left;">
+<span>Language</span>
+<input id="test">
+</div>
+
+<div id="float" style="display: inline-block;" class="pseudo">
+<span required="" style="color: rgb(194, 0, 0);">Email</span>
+<input type="text" required="" aria-required="true" value="" _onkeyup_="hidePseudo();">
+</div>
+
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("Make sure that we are updating the render block flow element's children correctly.");
+
+ if (window.accessibilityController) {
+ var element = accessibilityController.accessibleElementById("float");
+ shouldBe("element.childrenCount", "3");
+
+ eventSender.keyDown('\t');
+ eventSender.keyDown('\t');
+
+ shouldBe("element.childrenCount", "2");
+ showPseudo();
+
+ function hidePseudo() {
+ document.getElementById("float").className += "hidden"
+ }
+
+ function showPseudo() {
+ document.getElementById("float").className = "pseudo";
+ }
+
+ // Make sure getting the attributes of its children won't cause crash
+ element.attributesOfChildren();
+ }
+
+</script>
+
+<script src=""
+</body>
+</html>
Added: branches/safari-604.1.38.1-branch/LayoutTests/accessibility/resources/svg-circle.svg (0 => 220587)
--- branches/safari-604.1.38.1-branch/LayoutTests/accessibility/resources/svg-circle.svg (rev 0)
+++ branches/safari-604.1.38.1-branch/LayoutTests/accessibility/resources/svg-circle.svg 2017-08-11 15:16:56 UTC (rev 220587)
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <g>
+ <text style="float:right"></text>
+ <text>circle</text>
+ </g>
+</svg>
\ No newline at end of file
Modified: branches/safari-604.1.38.1-branch/Source/WebCore/ChangeLog (220586 => 220587)
--- branches/safari-604.1.38.1-branch/Source/WebCore/ChangeLog 2017-08-11 13:46:59 UTC (rev 220586)
+++ branches/safari-604.1.38.1-branch/Source/WebCore/ChangeLog 2017-08-11 15:16:56 UTC (rev 220587)
@@ -1,3 +1,25 @@
+2017-08-11 Jason Marcell <jmarc...@apple.com>
+
+ Cherry-pick r220463. rdar://problem/33594320
+
+ 2017-08-09 Nan Wang <n_w...@apple.com>
+
+ AX: crash at WebCore::AccessibilityObject::supportsARIALiveRegion() const + 24
+ https://bugs.webkit.org/show_bug.cgi?id=175340
+ <rdar://problem/33782159>
+
+ Reviewed by Chris Fleizach.
+
+ When adding a psuedo element child to a RenderBlockFlow element, there might be a chance where
+ the element has already been layed out but we are still holding onto its stale children. Fixed it
+ by notifying AX correctly when inserting/removing children during layout.
+
+ Test: accessibility/add-children-pseudo-element.html
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::insertFloatingObject):
+ (WebCore::RenderBlockFlow::removeFloatingObject):
+
2017-08-09 Jason Marcell <jmarc...@apple.com>
Cherry-pick r220459. rdar://problem/33820786
Modified: branches/safari-604.1.38.1-branch/Source/WebCore/rendering/RenderBlockFlow.cpp (220586 => 220587)
--- branches/safari-604.1.38.1-branch/Source/WebCore/rendering/RenderBlockFlow.cpp 2017-08-11 13:46:59 UTC (rev 220586)
+++ branches/safari-604.1.38.1-branch/Source/WebCore/rendering/RenderBlockFlow.cpp 2017-08-11 15:16:56 UTC (rev 220587)
@@ -24,6 +24,7 @@
#include "config.h"
#include "RenderBlockFlow.h"
+#include "AXObjectCache.h"
#include "Editor.h"
#include "FloatingObjects.h"
#include "Frame.h"
@@ -2352,6 +2353,9 @@
}
setLogicalWidthForFloat(*floatingObject, logicalWidthForChild(floatBox) + marginStartForChild(floatBox) + marginEndForChild(floatBox));
+
+ if (AXObjectCache* cache = document().existingAXObjectCache())
+ cache->childrenChanged(this);
return m_floatingObjects->add(WTFMove(floatingObject));
}
@@ -2389,6 +2393,9 @@
markLinesDirtyInBlockRange(0, logicalBottom);
}
m_floatingObjects->remove(&floatingObject);
+
+ if (AXObjectCache* cache = document().existingAXObjectCache())
+ cache->childrenChanged(this);
}
}
}