[webkit-changes] [200508] trunk

2016-05-06 Thread n_wang
Title: [200508] trunk








Revision 200508
Author n_w...@apple.com
Date 2016-05-06 00:27:22 -0700 (Fri, 06 May 2016)


Log Message
AX: String for document range is empty if end visible position anchors to a ignored replaced node
https://bugs.webkit.org/show_bug.cgi?id=157403

Reviewed by Chris Fleizach.

Source/WebCore:

The CharacterOffset that is converted from VisiblePositon is wrong when the VisiblePostion anchors
to an ignored replaced node. Fixed it by adjusting the offset of the CharacterOffset correctly in 
such case.

Test: accessibility/mac/text-marker-string-for-document-end-replaced-node.html

* accessibility/AXObjectCache.cpp:
(WebCore::characterOffsetsInOrder):
(WebCore::AXObjectCache::characterOffsetFromVisiblePosition):
(WebCore::AXObjectCache::accessibilityObjectForTextMarkerData):

LayoutTests:

* accessibility/mac/text-marker-string-for-document-end-replaced-node-expected.txt: Added.
* accessibility/mac/text-marker-string-for-document-end-replaced-node.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/accessibility/AXObjectCache.cpp


Added Paths

trunk/LayoutTests/accessibility/mac/text-marker-string-for-document-end-replaced-node-expected.txt
trunk/LayoutTests/accessibility/mac/text-marker-string-for-document-end-replaced-node.html




Diff

Modified: trunk/LayoutTests/ChangeLog (200507 => 200508)

--- trunk/LayoutTests/ChangeLog	2016-05-06 06:25:30 UTC (rev 200507)
+++ trunk/LayoutTests/ChangeLog	2016-05-06 07:27:22 UTC (rev 200508)
@@ -1,3 +1,13 @@
+2016-05-06  Nan Wang  
+
+AX: String for document range is empty if end visible position anchors to a ignored replaced node
+https://bugs.webkit.org/show_bug.cgi?id=157403
+
+Reviewed by Chris Fleizach.
+
+* accessibility/mac/text-marker-string-for-document-end-replaced-node-expected.txt: Added.
+* accessibility/mac/text-marker-string-for-document-end-replaced-node.html: Added.
+
 2016-05-05  Dean Jackson  
 
 4 and 8 digit color attributes should use the crazypants algorithm, not the CSS one.


Added: trunk/LayoutTests/accessibility/mac/text-marker-string-for-document-end-replaced-node-expected.txt (0 => 200508)

--- trunk/LayoutTests/accessibility/mac/text-marker-string-for-document-end-replaced-node-expected.txt	(rev 0)
+++ trunk/LayoutTests/accessibility/mac/text-marker-string-for-document-end-replaced-node-expected.txt	2016-05-06 07:27:22 UTC (rev 200508)
@@ -0,0 +1,25 @@
+ Some text
+
+Message content.
+
+Some other text.
+
+This tests that we are getting the correct string for document range if the end visible position anchors an ignored replaced node.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+String: 
+ Some text
+
+Message content.
+
+Some other text.
+
+This tests that we are getting the correct string for document range if the end visible position anchors an ignored replaced node.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/accessibility/mac/text-marker-string-for-document-end-replaced-node.html (0 => 200508)

--- trunk/LayoutTests/accessibility/mac/text-marker-string-for-document-end-replaced-node.html	(rev 0)
+++ trunk/LayoutTests/accessibility/mac/text-marker-string-for-document-end-replaced-node.html	2016-05-06 07:27:22 UTC (rev 200508)
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+

+ Apple + Some text +

+
+Message content.

+Some other text.
+
+ + +

+
+ + + +