Title: [203872] branches/safari-602-branch
- Revision
- 203872
- Author
- bshaf...@apple.com
- Date
- 2016-07-29 00:11:44 -0700 (Fri, 29 Jul 2016)
Log Message
Merge r203694. rdar://problem/27220338
Modified Paths
Added Paths
Diff
Modified: branches/safari-602-branch/LayoutTests/ChangeLog (203871 => 203872)
--- branches/safari-602-branch/LayoutTests/ChangeLog 2016-07-29 07:11:41 UTC (rev 203871)
+++ branches/safari-602-branch/LayoutTests/ChangeLog 2016-07-29 07:11:44 UTC (rev 203872)
@@ -1,5 +1,19 @@
2016-07-28 Babak Shafiei <bshaf...@apple.com>
+ Merge r203694. rdar://problem/27220338
+
+ 2016-07-25 Nan Wang <n_w...@apple.com>
+
+ AX: AccessibilityRenderObject is adding duplicated children when CSS first-letter is being used.
+ https://bugs.webkit.org/show_bug.cgi?id=160155
+
+ Reviewed by Chris Fleizach.
+
+ * accessibility/mac/css-first-letter-children-expected.txt: Added.
+ * accessibility/mac/css-first-letter-children.html: Added.
+
+2016-07-28 Babak Shafiei <bshaf...@apple.com>
+
Merge r203669. rdar://problem/27285070
2016-07-24 Nan Wang <n_w...@apple.com>
Added: branches/safari-602-branch/LayoutTests/accessibility/mac/css-first-letter-children-expected.txt (0 => 203872)
--- branches/safari-602-branch/LayoutTests/accessibility/mac/css-first-letter-children-expected.txt (rev 0)
+++ branches/safari-602-branch/LayoutTests/accessibility/mac/css-first-letter-children-expected.txt 2016-07-29 07:11:44 UTC (rev 203872)
@@ -0,0 +1,14 @@
+Test text
+
+This tests that we are adding children correctly when having CSS first-letter selector.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+AXRole: AXGroup AXValue:
+ AXRole: AXStaticText AXValue: Test text
+PASS content.childrenCount is 1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: branches/safari-602-branch/LayoutTests/accessibility/mac/css-first-letter-children.html (0 => 203872)
--- branches/safari-602-branch/LayoutTests/accessibility/mac/css-first-letter-children.html (rev 0)
+++ branches/safari-602-branch/LayoutTests/accessibility/mac/css-first-letter-children.html 2016-07-29 07:11:44 UTC (rev 203872)
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+<script>
+ function dumpAccessibilityChildren(element, level) {
+ if (element.stringValue.indexOf('End of test') >= 0)
+ return false;
+
+ var indent = "";
+ for (var k = 0; k < level; k++) { indent += " "; }
+ debug(indent + element.role + " " + element.stringValue);
+ var childrenCount = element.childrenCount;
+ for (var k = 0; k < childrenCount; k++) {
+ if (!dumpAccessibilityChildren(element.childAtIndex(k), level+1))
+ return false;
+ }
+ return true;
+ }
+</script>
+
+<style>
+p::first-letter {
+ font-size: 200%;
+}
+</style>
+</head>
+
+<body id="body">
+
+<div>
+<p id="text">Test text</p>
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+<script>
+ if (window.accessibilityController) {
+ description("This tests that we are adding children correctly when having CSS first-letter selector.");
+
+ var content = accessibilityController.accessibleElementById("text");
+ dumpAccessibilityChildren(content, 0);
+
+ shouldBe("content.childrenCount", "1");
+ }
+ successfullyParsed = true;
+</script>
+
+<script src=""
+</body>
+</html>
Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (203871 => 203872)
--- branches/safari-602-branch/Source/WebCore/ChangeLog 2016-07-29 07:11:41 UTC (rev 203871)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog 2016-07-29 07:11:44 UTC (rev 203872)
@@ -1,5 +1,24 @@
2016-07-28 Babak Shafiei <bshaf...@apple.com>
+ Merge r203694. rdar://problem/27220338
+
+ 2016-07-25 Nan Wang <n_w...@apple.com>
+
+ AX: AccessibilityRenderObject is adding duplicated children when CSS first-letter is being used.
+ https://bugs.webkit.org/show_bug.cgi?id=160155
+
+ Reviewed by Chris Fleizach.
+
+ We were adding the same text node twice if CSS first-letter selector was being used. Added a
+ check for the inline continuation so that we only add it once.
+
+ Test: accessibility/mac/css-first-letter-children.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::firstChildConsideringContinuation):
+
+2016-07-28 Babak Shafiei <bshaf...@apple.com>
+
Merge r203690. rdar://problem/26668526
2016-07-25 Wenson Hsieh <wenson_hs...@apple.com>
Modified: branches/safari-602-branch/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (203871 => 203872)
--- branches/safari-602-branch/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2016-07-29 07:11:41 UTC (rev 203871)
+++ branches/safari-602-branch/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2016-07-29 07:11:44 UTC (rev 203872)
@@ -186,6 +186,12 @@
{
RenderObject* firstChild = renderer.firstChildSlow();
+ // We don't want to include the end of a continuation as the firstChild of the
+ // anonymous parent, because everything has already been linked up via continuation.
+ // CSS first-letter selector is an example of this case.
+ if (renderer.isAnonymous() && firstChild && firstChild->isInlineElementContinuation())
+ firstChild = nullptr;
+
if (!firstChild && isInlineWithContinuation(renderer))
firstChild = firstChildInContinuation(downcast<RenderInline>(renderer));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes