Diff
Modified: trunk/LayoutTests/ChangeLog (219423 => 219424)
--- trunk/LayoutTests/ChangeLog 2017-07-12 20:46:36 UTC (rev 219423)
+++ trunk/LayoutTests/ChangeLog 2017-07-12 20:57:43 UTC (rev 219424)
@@ -1,3 +1,16 @@
+2017-07-12 Matt Lewis <jlew...@apple.com>
+
+ Unreviewed, rolling out r219409.
+
+ The revision caused the Windows builds to fail.
+
+ Reverted changeset:
+
+ "AX: [iOS] Implement a way to retrieve a text marker range
+ with desired text that is closest to a position"
+ https://bugs.webkit.org/show_bug.cgi?id=174393
+ http://trac.webkit.org/changeset/219409
+
2017-07-12 Commit Queue <commit-qu...@webkit.org>
Unreviewed, rolling out r219361.
Deleted: trunk/LayoutTests/accessibility/ios-simulator/text-marker-range-matches-text-expected.txt (219423 => 219424)
--- trunk/LayoutTests/accessibility/ios-simulator/text-marker-range-matches-text-expected.txt 2017-07-12 20:46:36 UTC (rev 219423)
+++ trunk/LayoutTests/accessibility/ios-simulator/text-marker-range-matches-text-expected.txt 2017-07-12 20:57:43 UTC (rev 219424)
@@ -1,13 +0,0 @@
-This is some testing content.
-This tests that we are able to get a range with desired text that is close to a given range.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS text.stringForTextMarkerRange(markerRange) is 'ome t'
-PASS text.stringForTextMarkerRange(matchedMarkerRange) is 'testing'
-PASS text.stringForTextMarkerRange(matchedMarkerRange) is 'some'
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/accessibility/ios-simulator/text-marker-range-matches-text.html (219423 => 219424)
--- trunk/LayoutTests/accessibility/ios-simulator/text-marker-range-matches-text.html 2017-07-12 20:46:36 UTC (rev 219423)
+++ trunk/LayoutTests/accessibility/ios-simulator/text-marker-range-matches-text.html 2017-07-12 20:57:43 UTC (rev 219424)
@@ -1,46 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
- <script src=""
- <body id="body" tabindex="0">
- <div tabindex="0" id="text">
- This is some testing content.
- </div>
-
- <p id="description"></p>
- <div id="console"></div>
-
- <script>
-
- description("This tests that we are able to get a range with desired text that is close to a given range.");
-
- if (window.accessibilityController) {
- accessibilityController.enableEnhancedAccessibility(true);
- var webArea = accessibilityController.rootElement.childAtIndex(0);
- var text = accessibilityController.accessibleElementById("text").childAtIndex(0);
-
- // Get the marker range (9, 5), should be "ome t".
- var startMarker = text.startTextMarkerForTextMarkerRange(text.textMarkerRangeForElement(text));
- for (var i = 0; i < 9 ; i++)
- startMarker = text.nextTextMarker(startMarker);
- var endMarker = startMarker;
- for (var i = 0; i < 5 ; i++)
- endMarker = text.nextTextMarker(endMarker);
-
- var markerRange = text.textMarkerRangeForMarkers(startMarker, endMarker);
- shouldBe("text.stringForTextMarkerRange(markerRange)", "'ome t'");
-
- // Search forward and backwards.
- var matchedMarkerRange = text.textMarkerRangeMatchesTextNearMarkers("testing", startMarker, endMarker);
- shouldBe("text.stringForTextMarkerRange(matchedMarkerRange)", "'testing'");
-
- matchedMarkerRange = text.textMarkerRangeMatchesTextNearMarkers("some", startMarker, endMarker);
- shouldBe("text.stringForTextMarkerRange(matchedMarkerRange)", "'some'");
- }
-
- </script>
-
- <script src=""
-
- </body>
-</html>
-
Modified: trunk/Source/WebCore/ChangeLog (219423 => 219424)
--- trunk/Source/WebCore/ChangeLog 2017-07-12 20:46:36 UTC (rev 219423)
+++ trunk/Source/WebCore/ChangeLog 2017-07-12 20:57:43 UTC (rev 219424)
@@ -1,3 +1,16 @@
+2017-07-12 Matt Lewis <jlew...@apple.com>
+
+ Unreviewed, rolling out r219409.
+
+ The revision caused the Windows builds to fail.
+
+ Reverted changeset:
+
+ "AX: [iOS] Implement a way to retrieve a text marker range
+ with desired text that is closest to a position"
+ https://bugs.webkit.org/show_bug.cgi?id=174393
+ http://trac.webkit.org/changeset/219409
+
2017-07-12 Alicia Boya GarcĂa <ab...@igalia.com>
[FreeType] Enable BCI on webfonts
Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (219423 => 219424)
--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2017-07-12 20:46:36 UTC (rev 219423)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2017-07-12 20:57:43 UTC (rev 219424)
@@ -1726,37 +1726,6 @@
}
return WTFMove(range);
}
-
-static VisiblePosition visiblePositionForPositionWithOffset(const VisiblePosition& position, int32_t offset)
-{
- RefPtr<ContainerNode> root;
- unsigned startIndex = indexForVisiblePosition(position, root);
- return visiblePositionForIndex(startIndex + offset, root.get());
-}
-
-RefPtr<Range> AXObjectCache::rangeMatchesTextNearRange(RefPtr<Range> originalRange, const String& matchText)
-{
- if (!originalRange)
- return nullptr;
-
- // Create a large enough range for searching the text within.
- unsigned textLength = matchText.length();
- auto startPosition = visiblePositionForPositionWithOffset(originalRange->startPosition(), -textLength);
- auto endPosition = visiblePositionForPositionWithOffset(originalRange->startPosition(), 2 * textLength);
-
- if (startPosition.isNull())
- startPosition = firstPositionInOrBeforeNode(&originalRange->startContainer());
- if (endPosition.isNull())
- endPosition = lastPositionInOrAfterNode(&originalRange->endContainer());
-
- RefPtr<Range> searchRange = Range::create(m_document, startPosition, endPosition);
- if (!searchRange || searchRange->collapsed())
- return nullptr;
-
- RefPtr<Range> range = Range::create(m_document, startPosition, originalRange->startPosition());
- unsigned targetOffset = TextIterator::rangeLength(range.get(), true);
- return findClosestPlainText(*searchRange.get(), matchText, 0, targetOffset);
-}
static bool isReplacedNodeOrBR(Node* node)
{
Modified: trunk/Source/WebCore/accessibility/AXObjectCache.h (219423 => 219424)
--- trunk/Source/WebCore/accessibility/AXObjectCache.h 2017-07-12 20:46:36 UTC (rev 219423)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.h 2017-07-12 20:57:43 UTC (rev 219424)
@@ -332,9 +332,6 @@
void deferRecomputeIsIgnored(Element*);
void deferTextChangedIfNeeded(Node*);
void performDeferredCacheUpdate();
-
- RefPtr<Range> rangeMatchesTextNearRange(RefPtr<Range>, const String&);
-
protected:
void postPlatformNotification(AccessibilityObject*, AXNotification);
Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (219423 => 219424)
--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2017-07-12 20:46:36 UTC (rev 219423)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2017-07-12 20:57:43 UTC (rev 219424)
@@ -52,7 +52,6 @@
#import "RuntimeApplicationChecks.h"
#import "SVGNames.h"
#import "SVGElement.h"
-#import "SelectionRect.h"
#import "TextIterator.h"
#import "WAKScrollView.h"
#import "WAKView.h"
@@ -2589,56 +2588,6 @@
return [self convertRectToScreenSpace:rect];
}
-- (RefPtr<Range>)rangeFromMarkers:(NSArray *)markers withText:(NSString *)text
-{
- RefPtr<Range> originalRange = [self rangeForTextMarkers:markers];
- if (!originalRange)
- return nil;
-
- AXObjectCache* cache = m_object->axObjectCache();
- if (!cache)
- return nil;
-
- return cache->rangeMatchesTextNearRange(originalRange, text);
-}
-
-// This is only used in the layout test.
-- (NSArray *)textMarkerRangeFromMarkers:(NSArray *)markers withText:(NSString *)text
-{
- return [self textMarkersForRange:[self rangeFromMarkers:markers withText:text]];
-}
-
-- (NSArray *)textRectsFromMarkers:(NSArray *)markers withText:(NSString *)text
-{
- if (![self _prepareAccessibilityCall])
- return nil;
-
- RefPtr<Range> range = [self rangeFromMarkers:markers withText:text];
- if (!range || range->collapsed())
- return nil;
-
- Vector<WebCore::SelectionRect> selectionRects;
- range->collectSelectionRectsWithoutUnionInteriorLines(selectionRects);
- return [self rectsForSelectionRects:selectionRects];
-}
-
-- (NSArray *)rectsForSelectionRects:(const Vector<WebCore::SelectionRect>&)selectionRects
-{
- unsigned size = selectionRects.size();
- if (!size)
- return nil;
-
- NSMutableArray *rects = [NSMutableArray arrayWithCapacity:size];
- for (unsigned i = 0; i < size; i++) {
- const WebCore::SelectionRect& coreRect = selectionRects[i];
- IntRect selectionRect = coreRect.rect();
- CGRect rect = [self convertRectToScreenSpace:selectionRect];
- [rects addObject:[NSValue valueWithRect:rect]];
- }
-
- return rects;
-}
-
- (WebAccessibilityTextMarker *)textMarkerForPoint:(CGPoint)point
{
if (![self _prepareAccessibilityCall])
Modified: trunk/Tools/ChangeLog (219423 => 219424)
--- trunk/Tools/ChangeLog 2017-07-12 20:46:36 UTC (rev 219423)
+++ trunk/Tools/ChangeLog 2017-07-12 20:57:43 UTC (rev 219424)
@@ -1,3 +1,16 @@
+2017-07-12 Matt Lewis <jlew...@apple.com>
+
+ Unreviewed, rolling out r219409.
+
+ The revision caused the Windows builds to fail.
+
+ Reverted changeset:
+
+ "AX: [iOS] Implement a way to retrieve a text marker range
+ with desired text that is closest to a position"
+ https://bugs.webkit.org/show_bug.cgi?id=174393
+ http://trac.webkit.org/changeset/219409
+
2017-07-12 Nan Wang <n_w...@apple.com>
AX: [iOS] Implement a way to retrieve a text marker range with desired text that is closest to a position
Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp (219423 => 219424)
--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp 2017-07-12 20:46:36 UTC (rev 219423)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp 2017-07-12 20:57:43 UTC (rev 219424)
@@ -927,8 +927,8 @@
static JSValueRef textMarkerRangeForMarkersCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
- AccessibilityTextMarker* startMarker = nullptr;
- AccessibilityTextMarker* endMarker = nullptr;
+ AccessibilityTextMarker* startMarker = 0;
+ AccessibilityTextMarker* endMarker = 0;
if (argumentCount == 2) {
startMarker = toTextMarker(JSValueToObject(context, arguments[0], exception));
endMarker = toTextMarker(JSValueToObject(context, arguments[1], exception));
@@ -1483,23 +1483,6 @@
return JSValueMakeBoolean(context, toAXElement(thisObject)->hasContainedByFieldsetTrait());
}
-static JSValueRef textMarkerRangeMatchesTextNearMarkersCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- JSStringRef searchText = nullptr;
- AccessibilityTextMarker* startMarker = nullptr;
- AccessibilityTextMarker* endMarker = nullptr;
- if (argumentCount == 3) {
- searchText = JSValueToStringCopy(context, arguments[0], exception);
- startMarker = toTextMarker(JSValueToObject(context, arguments[1], exception));
- endMarker = toTextMarker(JSValueToObject(context, arguments[2], exception));
- }
-
- JSValueRef result = AccessibilityTextMarkerRange::makeJSAccessibilityTextMarkerRange(context, toAXElement(thisObject)->textMarkerRangeMatchesTextNearMarkers(searchText, startMarker, endMarker));
- if (searchText)
- JSStringRelease(searchText);
- return result;
-}
-
#endif // PLATFORM(IOS)
#if PLATFORM(MAC) && !PLATFORM(IOS)
@@ -1721,11 +1704,6 @@
return nullptr;
}
-AccessibilityTextMarkerRange AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers(JSStringRef, AccessibilityTextMarker*, AccessibilityTextMarker*)
-{
- return nullptr;
-}
-
#endif
// Destruction
@@ -1942,7 +1920,6 @@
{ "scrollPageRight", scrollPageRightCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "assistiveTechnologySimulatedFocus", assistiveTechnologySimulatedFocusCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "fieldsetAncestorElement", fieldsetAncestorElementCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "textMarkerRangeMatchesTextNearMarkers", textMarkerRangeMatchesTextNearMarkersCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
#endif
{ 0, 0, 0 }
};
Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.h (219423 => 219424)
--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.h 2017-07-12 20:46:36 UTC (rev 219423)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.h 2017-07-12 20:57:43 UTC (rev 219424)
@@ -306,8 +306,6 @@
bool isTextArea() const;
bool isSearchField() const;
- AccessibilityTextMarkerRange textMarkerRangeMatchesTextNearMarkers(JSStringRef, AccessibilityTextMarker*, AccessibilityTextMarker*);
-
#endif // PLATFORM(IOS)
#if PLATFORM(MAC) && !PLATFORM(IOS)
Modified: trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm (219423 => 219424)
--- trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm 2017-07-12 20:46:36 UTC (rev 219423)
+++ trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm 2017-07-12 20:57:43 UTC (rev 219424)
@@ -113,7 +113,6 @@
- (id)accessibilityObjectForTextMarker:(id)marker;
- (id)lineStartMarkerForMarker:(id)marker;
- (id)lineEndMarkerForMarker:(id)marker;
-- (NSArray *)textMarkerRangeFromMarkers:(NSArray *)markers withText:(NSString *)text;
@end
@interface NSObject (WebAccessibilityObjectWrapperPrivate)
@@ -621,16 +620,6 @@
return nullptr;
}
-AccessibilityTextMarkerRange AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers(JSStringRef text, AccessibilityTextMarker* startMarker, AccessibilityTextMarker* endMarker)
-{
- NSArray *textMarkers = nil;
- if (startMarker->platformTextMarker() && endMarker->platformTextMarker())
- textMarkers = [NSArray arrayWithObjects:(id)startMarker->platformTextMarker(), (id)endMarker->platformTextMarker(), nil];
- id textMarkerRange = [m_element textMarkerRangeFromMarkers:textMarkers withText:[NSString stringWithJSStringRef:text]];
- return AccessibilityTextMarkerRange(textMarkerRange);
-}
-
-
#endif // SUPPORTS_AX_TEXTMARKERS && PLATFORM(IOS)
#pragma mark Unused
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp (219423 => 219424)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp 2017-07-12 20:46:36 UTC (rev 219423)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp 2017-07-12 20:57:43 UTC (rev 219424)
@@ -74,7 +74,7 @@
RefPtr<AccessibilityUIElement> AccessibilityUIElement::fieldsetAncestorElement() { return nullptr; }
bool AccessibilityUIElement::isSearchField() const { return false; }
bool AccessibilityUIElement::isTextArea() const { return false; }
-RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers(JSStringRef, AccessibilityTextMarker*, AccessibilityTextMarker*) { return nullptr; }
+
#endif
// Unsupported methods on various platforms. As they're implemented on other platforms this list should be modified.
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h (219423 => 219424)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h 2017-07-12 20:46:36 UTC (rev 219423)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h 2017-07-12 20:57:43 UTC (rev 219424)
@@ -289,7 +289,6 @@
RefPtr<AccessibilityTextMarkerRange> sentenceTextMarkerRangeForTextMarker(AccessibilityTextMarker*);
RefPtr<AccessibilityTextMarker> nextSentenceEndTextMarkerForTextMarker(AccessibilityTextMarker*);
RefPtr<AccessibilityTextMarker> previousSentenceStartTextMarkerForTextMarker(AccessibilityTextMarker*);
- RefPtr<AccessibilityTextMarkerRange> textMarkerRangeMatchesTextNearMarkers(JSStringRef, AccessibilityTextMarker*, AccessibilityTextMarker*);
// Returns an ordered list of supported actions for an element.
JSRetainPtr<JSStringRef> supportedActions() const;
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl (219423 => 219424)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl 2017-07-12 20:46:36 UTC (rev 219423)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl 2017-07-12 20:57:43 UTC (rev 219424)
@@ -226,7 +226,6 @@
AccessibilityTextMarkerRange sentenceTextMarkerRangeForTextMarker(AccessibilityTextMarker textMarker);
AccessibilityTextMarker previousSentenceStartTextMarkerForTextMarker(AccessibilityTextMarker textMarker);
AccessibilityTextMarker nextSentenceEndTextMarkerForTextMarker(AccessibilityTextMarker textMarker);
- AccessibilityTextMarkerRange textMarkerRangeMatchesTextNearMarkers(DOMString text, AccessibilityTextMarker startMarker, AccessibilityTextMarker endMarker);
// Returns an ordered list of supported actions for an element.
readonly attribute DOMString supportedActions;
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (219423 => 219424)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm 2017-07-12 20:46:36 UTC (rev 219423)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm 2017-07-12 20:57:43 UTC (rev 219424)
@@ -91,7 +91,6 @@
- (id)accessibilityObjectForTextMarker:(id)marker;
- (id)lineStartMarkerForMarker:(id)marker;
- (id)lineEndMarkerForMarker:(id)marker;
-- (NSArray *)textMarkerRangeFromMarkers:(NSArray *)markers withText:(NSString *)text;
@end
@interface NSObject (WebAccessibilityObjectWrapperPrivate)
@@ -1201,15 +1200,6 @@
{
return nullptr;
}
-
-RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers(JSStringRef text, AccessibilityTextMarker* startMarker, AccessibilityTextMarker* endMarker)
-{
- NSArray *textMarkers = nil;
- if (startMarker->platformTextMarker() && endMarker->platformTextMarker())
- textMarkers = [NSArray arrayWithObjects:(id)startMarker->platformTextMarker(), (id)endMarker->platformTextMarker(), nil];
- id textMarkerRange = [m_element textMarkerRangeFromMarkers:textMarkers withText:[NSString stringWithJSStringRef:text]];
- return AccessibilityTextMarkerRange::create(textMarkerRange);
-}
JSRetainPtr<JSStringRef> AccessibilityUIElement::mathPostscriptsDescription() const
{