haikuwebkit/LayoutTests/accessibility/mac/selected-visible-position-r...

20 lines
391 B
Plaintext
Raw Permalink Normal View History

First paragraph.
Last paragraph.
This tests getting and setting the selected VisiblePosition range.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
2020-07-10 01:27:19 +00:00
PASS current selection is 'Last paragraph.'
PASS current selection is 'First paragraph.
2020-07-10 01:27:19 +00:00
'
PASS current selection is ''
Source/WebCore: Range::contains does not work correctly when the common ancestor node is a Document. https://bugs.webkit.org/show_bug.cgi?id=215714 Reviewed by Darin Adler. Test: accessibility/mac/selected-visible-position-range.html. For a Range with a Document object as common ancestor, Range::contains(otherRange) would return false for any given other range in the same document. This causes problems in VoiceOver navigation and Braille functionality in the MacOS Mail.app. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange const): Use SimpleRange::isNull instead of repeating its implementation. * dom/Range.cpp: (WebCore::Range::contains const): Compare the Documents of the ranges' common ancesstor nodes instead of their ownerDocuments. LayoutTests: Range::contains(const Range&) should compare the Documents to which the Ranges belong, not the ownerDocuments. https://bugs.webkit.org/show_bug.cgi?id=215714 Reviewed by Darin Adler. Revamped the following test to check that a collapsed selection range is set to the correct character offset in the text content. In addition, properly used the Promise returned by waitFor in order to make the test timing independent and work in isolated tree mode. * accessibility/mac/selected-visible-position-range-expected.txt: * accessibility/mac/selected-visible-position-range.html: Canonical link: https://commits.webkit.org/228485@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266004 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-21 11:42:49 +00:00
PASS current selection index is 19
PASS successfullyParsed is true
TEST COMPLETE