Diff
Modified: trunk/LayoutTests/ChangeLog (240211 => 240212)
--- trunk/LayoutTests/ChangeLog 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/LayoutTests/ChangeLog 2019-01-20 18:37:18 UTC (rev 240212)
@@ -1,3 +1,15 @@
+2019-01-20 Michael Catanzaro <[email protected]>
+
+ Unreviewed, rolling out r240209.
+
+ Broke GTK/WPE injected bundle
+
+ Reverted changeset:
+
+ "AX: Support returning relative frames for accessibility"
+ https://bugs.webkit.org/show_bug.cgi?id=193414
+ https://trac.webkit.org/changeset/240209
+
2019-01-20 chris fleizach <[email protected]>
AX: Support returning relative frames for accessibility
Deleted: trunk/LayoutTests/accessibility/mac/relative-frame-expected.txt (240211 => 240212)
--- trunk/LayoutTests/accessibility/mac/relative-frame-expected.txt 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/LayoutTests/accessibility/mac/relative-frame-expected.txt 2019-01-20 18:37:18 UTC (rev 240212)
@@ -1,11 +0,0 @@
-focusable link
-This tests the relative frame attribute returns accurate data.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-relative frame: NSRect: {{8, 8}, {90, 18}}
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/accessibility/mac/relative-frame.html (240211 => 240212)
--- trunk/LayoutTests/accessibility/mac/relative-frame.html 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/LayoutTests/accessibility/mac/relative-frame.html 2019-01-20 18:37:18 UTC (rev 240212)
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script>
-var successfullyParsed = false;
-</script>
-<script src=""
-</head>
-<body id="body">
-
-<a id="link" href="" link</a>
-
-<p id="description"></p>
-<div id="console"></div>
-
-<script>
-
- description("This tests the relative frame attribute returns accurate data.");
-
- if (window.accessibilityController) {
-
- var link = accessibilityController.accessibleElementById("link");
- debug("relative frame: " + link.stringDescriptionOfAttributeValue("AXRelativeFrame"));
- }
-
- successfullyParsed = true;
-</script>
-
-<script src=""
-</body>
-</html>
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (240211 => 240212)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2019-01-20 18:37:18 UTC (rev 240212)
@@ -537,7 +537,6 @@
webkit.org/b/184742 accessibility/mac/async-increment-decrement-action.html [ Skip ]
webkit.org/b/185897 accessibility/mac/AOM-event-accessiblesetvalue.html [ Skip ]
webkit.org/b/185897 accessibility/mac/set-value-editable-types.html [ Skip ]
-webkit.org/b/193414 accessibility/mac/relative-frame.html [ Skip ]
webkit.org/b/182752 accessibility/mac/accessibility-make-first-responder.html [ Skip ]
@@ -666,4 +665,4 @@
webkit.org/b/191639 imported/blink/compositing/squashing/squashing-into-ancestor-painted-layer.html [ Pass ImageOnlyFailure ]
-webkit.org/b/190627 [ Mojave+ ] compositing/masks/compositing-clip-path-change-no-repaint.html [ Pass Failure ]
+webkit.org/b/190627 [ Mojave+ ] compositing/masks/compositing-clip-path-change-no-repaint.html [ Pass Failure ]
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (240211 => 240212)
--- trunk/Source/WebCore/ChangeLog 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Source/WebCore/ChangeLog 2019-01-20 18:37:18 UTC (rev 240212)
@@ -1,3 +1,15 @@
+2019-01-20 Michael Catanzaro <[email protected]>
+
+ Unreviewed, rolling out r240209.
+
+ Broke GTK/WPE injected bundle
+
+ Reverted changeset:
+
+ "AX: Support returning relative frames for accessibility"
+ https://bugs.webkit.org/show_bug.cgi?id=193414
+ https://trac.webkit.org/changeset/240209
+
2019-01-12 Dan Bernstein <[email protected]>
[Cocoa] Avoid importing directly from subumbrella frameworks
Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (240211 => 240212)
--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2019-01-20 18:37:18 UTC (rev 240212)
@@ -77,6 +77,7 @@
@end
@interface WebAccessibilityObjectWrapper (AccessibilityPrivate)
+- (id)_accessibilityWebDocumentView;
- (id)accessibilityContainer;
- (void)setAccessibilityLabel:(NSString *)label;
- (void)setAccessibilityValue:(NSString *)value;
@@ -1497,9 +1498,8 @@
if (![self _prepareAccessibilityCall])
return point;
- auto floatPoint = FloatPoint(point);
- auto floatRect = FloatRect(floatPoint, FloatSize());
- return [self convertRectToSpace:floatRect space:ScreenSpace].origin;
+ FloatPoint floatPoint = FloatPoint(point);
+ return [self convertPointToScreenSpace:floatPoint];
}
- (BOOL)accessibilityPerformEscape
@@ -1560,12 +1560,104 @@
return result;
}
-- (CGRect)_accessibilityRelativeFrame
+- (CGPoint)convertPointToScreenSpace:(FloatPoint &)point
{
- auto rect = FloatRect(snappedIntRect(m_object->elementRect()));
- return [self convertRectToSpace:rect space:PageSpace];
+ if (!m_object)
+ return CGPointZero;
+
+ CGPoint cgPoint = CGPointMake(point.x(), point.y());
+
+ FrameView* frameView = m_object->documentFrameView();
+ WAKView* documentView = frameView ? frameView->documentView() : nullptr;
+ if (documentView) {
+ cgPoint = [documentView convertPoint:cgPoint toView:nil];
+
+ // we need the web document view to give us our final screen coordinates
+ // because that can take account of the scroller
+ id webDocument = [self _accessibilityWebDocumentView];
+ if (webDocument)
+ cgPoint = [webDocument convertPoint:cgPoint toView:nil];
+ }
+ else {
+ // Find the appropriate scroll view to use to convert the contents to the window.
+ ScrollView* scrollView = nullptr;
+ const AccessibilityObject* parent = AccessibilityObject::matchedParent(*m_object, false, [] (const AccessibilityObject& object) {
+ return is<AccessibilityScrollView>(object);
+ });
+ if (parent)
+ scrollView = downcast<AccessibilityScrollView>(*parent).scrollView();
+
+ IntPoint intPoint = flooredIntPoint(point);
+ if (scrollView)
+ intPoint = scrollView->contentsToRootView(intPoint);
+
+ Page* page = m_object->page();
+
+ // If we have an empty chrome client (like SVG) then we should use the page
+ // of the scroll view parent to help us get to the screen rect.
+ if (parent && page && page->chrome().client().isEmptyChromeClient())
+ page = parent->page();
+
+ if (page) {
+ IntRect rect = IntRect(intPoint, IntSize(0, 0));
+ intPoint = page->chrome().rootViewToAccessibilityScreen(rect).location();
+ }
+
+ cgPoint = (CGPoint)intPoint;
+ }
+
+ return cgPoint;
}
+- (CGRect)convertRectToScreenSpace:(IntRect &)rect
+{
+ if (!m_object)
+ return CGRectZero;
+
+ CGSize size = CGSizeMake(rect.size().width(), rect.size().height());
+ CGPoint point = CGPointMake(rect.x(), rect.y());
+
+ CGRect frame = CGRectMake(point.x, point.y, size.width, size.height);
+
+ FrameView* frameView = m_object->documentFrameView();
+ WAKView* documentView = frameView ? frameView->documentView() : nil;
+ if (documentView) {
+ frame = [documentView convertRect:frame toView:nil];
+
+ // we need the web document view to give us our final screen coordinates
+ // because that can take account of the scroller
+ id webDocument = [self _accessibilityWebDocumentView];
+ if (webDocument)
+ frame = [webDocument convertRect:frame toView:nil];
+
+ } else {
+ // Find the appropriate scroll view to use to convert the contents to the window.
+ ScrollView* scrollView = nullptr;
+ const AccessibilityObject* parent = AccessibilityObject::matchedParent(*m_object, false, [] (const AccessibilityObject& object) {
+ return is<AccessibilityScrollView>(object);
+ });
+ if (parent)
+ scrollView = downcast<AccessibilityScrollView>(*parent).scrollView();
+
+ if (scrollView)
+ rect = scrollView->contentsToRootView(rect);
+
+ Page* page = m_object->page();
+
+ // If we have an empty chrome client (like SVG) then we should use the page
+ // of the scroll view parent to help us get to the screen rect.
+ if (parent && page && page->chrome().client().isEmptyChromeClient())
+ page = parent->page();
+
+ if (page)
+ rect = page->chrome().rootViewToAccessibilityScreen(rect);
+
+ frame = (CGRect)rect;
+ }
+
+ return frame;
+}
+
// Used by UIKit accessibility bundle to help determine distance during a hit-test.
- (CGRect)accessibilityElementRect
{
@@ -1581,11 +1673,11 @@
if (![self _prepareAccessibilityCall])
return CGRectZero;
- auto document = m_object->document();
+ Document* document = m_object->document();
if (!document || !document->view())
return CGRectZero;
- auto rect = FloatRect(snappedIntRect(document->view()->unobscuredContentRect()));
- return [self convertRectToSpace:rect space:ScreenSpace];
+ IntRect rect = snappedIntRect(document->view()->unobscuredContentRect());
+ return [self convertRectToScreenSpace:rect];
}
// The "center point" is where VoiceOver will "press" an object. This may not be the actual
@@ -1595,8 +1687,8 @@
if (![self _prepareAccessibilityCall])
return CGPointZero;
- auto rect = FloatRect(snappedIntRect(m_object->boundingBoxRect()));
- CGRect cgRect = [self convertRectToSpace:rect space:ScreenSpace];
+ IntRect rect = snappedIntRect(m_object->boundingBoxRect());
+ CGRect cgRect = [self convertRectToScreenSpace:rect];
return CGPointMake(CGRectGetMidX(cgRect), CGRectGetMidY(cgRect));
}
@@ -1605,8 +1697,8 @@
if (![self _prepareAccessibilityCall])
return CGRectZero;
- auto rect = FloatRect(snappedIntRect(m_object->elementRect()));
- return [self convertRectToSpace:rect space:ScreenSpace];
+ IntRect rect = snappedIntRect(m_object->elementRect());
+ return [self convertRectToScreenSpace:rect];
}
// Checks whether a link contains only static text and images (and has been divided unnaturally by <spans> and other nefarious mechanisms).
@@ -2650,8 +2742,8 @@
if (!range)
return CGRectZero;
- auto rect = FloatRect(m_object->boundsForRange(range));
- return [self convertRectToSpace:rect space:ScreenSpace];
+ IntRect rect = m_object->boundsForRange(range);
+ return [self convertRectToScreenSpace:rect];
}
- (RefPtr<Range>)rangeFromMarkers:(NSArray *)markers withText:(NSString *)text
@@ -2696,8 +2788,8 @@
NSMutableArray *rects = [NSMutableArray arrayWithCapacity:size];
for (unsigned i = 0; i < size; i++) {
const WebCore::SelectionRect& coreRect = selectionRects[i];
- auto selectionRect = FloatRect(coreRect.rect());
- CGRect rect = [self convertRectToSpace:selectionRect space:ScreenSpace];
+ IntRect selectionRect = coreRect.rect();
+ CGRect rect = [self convertRectToScreenSpace:selectionRect];
[rects addObject:[NSValue valueWithRect:rect]];
}
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.h (240211 => 240212)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.h 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.h 2019-01-20 18:37:18 UTC (rev 240212)
@@ -65,10 +65,8 @@
- (void)accessibilityPostedNotification:(NSString *)notificationName userInfo:(NSDictionary *)userInfo;
- (CGPathRef)convertPathToScreenSpace:(WebCore::Path &)path;
+- (CGPoint)convertPointToScreenSpace:(WebCore::FloatPoint &)point;
-enum ConversionSpace { ScreenSpace, PageSpace };
-- (CGRect)convertRectToSpace:(WebCore::FloatRect &)rect space:(ConversionSpace)space;
-
// Math related functions
- (NSArray *)accessibilityMathPostscriptPairs;
- (NSArray *)accessibilityMathPrescriptPairs;
@@ -76,10 +74,6 @@
extern WebCore::AccessibilitySearchCriteria accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute(const NSDictionary *);
extern NSArray *convertToNSArray(const WebCore::AccessibilityObject::AccessibilityChildrenVector&);
-#if PLATFORM(IOS_FAMILY)
-- (id)_accessibilityWebDocumentView;
-#endif
-
@end
#endif // WebAccessibilityObjectWrapperBase_h
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm (240211 => 240212)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm 2019-01-20 18:37:18 UTC (rev 240212)
@@ -42,8 +42,6 @@
#import "AccessibilityTableCell.h"
#import "AccessibilityTableColumn.h"
#import "AccessibilityTableRow.h"
-#import "Chrome.h"
-#import "ChromeClient.h"
#import "ColorMac.h"
#import "ContextMenuController.h"
#import "Editing.h"
@@ -53,7 +51,6 @@
#import "FrameLoaderClient.h"
#import "FrameSelection.h"
#import "HTMLNames.h"
-#import "LayoutRect.h"
#import "LocalizedStrings.h"
#import "Page.h"
#import "RenderTextControl.h"
@@ -63,8 +60,6 @@
#import "TextCheckerClient.h"
#import "TextCheckingHelper.h"
#import "VisibleUnits.h"
-#import "WAKView.h"
-#import "WAKWindow.h"
#import "WebCoreFrameView.h"
using namespace WebCore;
@@ -466,42 +461,31 @@
{
WebAccessibilityObjectWrapperBase *wrapper = conversion.wrapper;
CGMutablePathRef newPath = conversion.path;
- FloatRect rect;
switch (element.type) {
case PathElementMoveToPoint:
{
- rect = FloatRect(element.points[0], FloatSize());
- CGPoint newPoint = [wrapper convertRectToSpace:rect space:ScreenSpace].origin;
+ CGPoint newPoint = [wrapper convertPointToScreenSpace:element.points[0]];
CGPathMoveToPoint(newPath, nil, newPoint.x, newPoint.y);
break;
}
case PathElementAddLineToPoint:
{
- rect = FloatRect(element.points[0], FloatSize());
- CGPoint newPoint = [wrapper convertRectToSpace:rect space:ScreenSpace].origin;
+ CGPoint newPoint = [wrapper convertPointToScreenSpace:element.points[0]];
CGPathAddLineToPoint(newPath, nil, newPoint.x, newPoint.y);
break;
}
case PathElementAddQuadCurveToPoint:
{
- rect = FloatRect(element.points[0], FloatSize());
- CGPoint newPoint1 = [wrapper convertRectToSpace:rect space:ScreenSpace].origin;
-
- rect = FloatRect(element.points[1], FloatSize());
- CGPoint newPoint2 = [wrapper convertRectToSpace:rect space:ScreenSpace].origin;
+ CGPoint newPoint1 = [wrapper convertPointToScreenSpace:element.points[0]];
+ CGPoint newPoint2 = [wrapper convertPointToScreenSpace:element.points[1]];
CGPathAddQuadCurveToPoint(newPath, nil, newPoint1.x, newPoint1.y, newPoint2.x, newPoint2.y);
break;
}
case PathElementAddCurveToPoint:
{
- rect = FloatRect(element.points[0], FloatSize());
- CGPoint newPoint1 = [wrapper convertRectToSpace:rect space:ScreenSpace].origin;
-
- rect = FloatRect(element.points[1], FloatSize());
- CGPoint newPoint2 = [wrapper convertRectToSpace:rect space:ScreenSpace].origin;
-
- rect = FloatRect(element.points[2], FloatSize());
- CGPoint newPoint3 = [wrapper convertRectToSpace:rect space:ScreenSpace].origin;
+ CGPoint newPoint1 = [wrapper convertPointToScreenSpace:element.points[0]];
+ CGPoint newPoint2 = [wrapper convertPointToScreenSpace:element.points[1]];
+ CGPoint newPoint3 = [wrapper convertPointToScreenSpace:element.points[2]];
CGPathAddCurveToPoint(newPath, nil, newPoint1.x, newPoint1.y, newPoint2.x, newPoint2.y, newPoint3.x, newPoint3.y);
break;
}
@@ -523,82 +507,13 @@
return conversion.path;
}
-- (id)_accessibilityWebDocumentView
+- (CGPoint)convertPointToScreenSpace:(FloatPoint &)point
{
+ UNUSED_PARAM(point);
ASSERT_NOT_REACHED();
- // Overridden by sub-classes
- return nil;
+ return CGPointZero;
}
-- (CGRect)convertRectToSpace:(WebCore::FloatRect &)rect space:(ConversionSpace)space
-{
- if (!m_object)
- return CGRectZero;
-
- CGSize size = CGSizeMake(rect.size().width(), rect.size().height());
- CGPoint point = CGPointMake(rect.x(), rect.y());
-
- CGRect cgRect = CGRectMake(point.x, point.y, size.width, size.height);
-
- // WebKit1 code path... platformWidget() exists.
- FrameView* frameView = m_object->documentFrameView();
-#if PLATFORM(IOS_FAMILY)
- WAKView* documentView = frameView ? frameView->documentView() : nullptr;
- if (documentView) {
- cgRect = [documentView convertRect:cgRect toView:nil];
-
- // we need the web document view to give us our final screen coordinates
- // because that can take account of the scroller
- id webDocument = [self _accessibilityWebDocumentView];
- if (webDocument)
- cgRect = [webDocument convertRect:cgRect toView:nil];
- }
-#else
- if (frameView && frameView->platformWidget()) {
- NSRect nsRect = NSRectFromCGRect(cgRect);
- NSView* view = frameView->documentView();
- ALLOW_DEPRECATED_DECLARATIONS_BEGIN
- nsRect = [[view window] convertRectToScreen:[view convertRect:nsRect toView:nil]];
- ALLOW_DEPRECATED_DECLARATIONS_END
- cgRect = NSRectToCGRect(nsRect);
- }
-#endif
- else {
- // Find the appropriate scroll view to use to convert the contents to the window.
- ScrollView* scrollView = nullptr;
- const AccessibilityObject* parent = AccessibilityObject::matchedParent(*m_object, false, [] (const AccessibilityObject& object) {
- return is<AccessibilityScrollView>(object);
- });
- if (parent)
- scrollView = downcast<AccessibilityScrollView>(*parent).scrollView();
-
- auto intRect = snappedIntRect(IntRect(cgRect));
- if (scrollView)
- intRect = scrollView->contentsToRootView(intRect);
-
- if (space == ScreenSpace) {
- auto page = m_object->page();
-
- // If we have an empty chrome client (like SVG) then we should use the page
- // of the scroll view parent to help us get to the screen rect.
- if (parent && page && page->chrome().client().isEmptyChromeClient())
- page = parent->page();
-
- if (page) {
-#if PLATFORM(IOS_FAMILY)
- intRect = page->chrome().rootViewToAccessibilityScreen(intRect);
-#else
- intRect = page->chrome().rootViewToScreen(intRect);
-#endif
- }
- }
-
- cgRect = (CGRect)intRect;
- }
-
- return cgRect;
-}
-
- (NSString *)ariaLandmarkRoleDescription
{
switch (m_object->roleValue()) {
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (240211 => 240212)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2019-01-20 18:37:18 UTC (rev 240212)
@@ -412,10 +412,6 @@
#define NSAccessibilityLinkRelationshipTypeAttribute @"AXLinkRelationshipType"
#endif
-#ifndef NSAccessibilityRelativeFrameAttribute
-#define NSAccessibilityRelativeFrameAttribute @"AXRelativeFrame"
-#endif
-
extern "C" AXUIElementRef NSAccessibilityCreateAXUIElementRef(id element);
@implementation WebAccessibilityObjectWrapper
@@ -1324,7 +1320,6 @@
NSAccessibilityFocusableAncestorAttribute,
NSAccessibilityEditableAncestorAttribute,
NSAccessibilityHighestEditableAncestorAttribute,
- NSAccessibilityRelativeFrameAttribute,
nil];
}
if (commonMenuAttrs == nil) {
@@ -1751,6 +1746,50 @@
return static_cast<PluginViewBase*>(pluginWidget)->accessibilityAssociatedPluginParentForElement(m_object->element());
}
+- (CGPoint)convertPointToScreenSpace:(FloatPoint &)point
+{
+ FrameView* frameView = m_object->documentFrameView();
+
+ // WebKit1 code path... platformWidget() exists.
+ if (frameView && frameView->platformWidget()) {
+ NSPoint nsPoint = (NSPoint)point;
+ NSView* view = frameView->documentView();
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+ nsPoint = [[view window] convertBaseToScreen:[view convertPoint:nsPoint toView:nil]];
+ ALLOW_DEPRECATED_DECLARATIONS_END
+ return CGPointMake(nsPoint.x, nsPoint.y);
+ } else {
+
+ // Find the appropriate scroll view to use to convert the contents to the window.
+ ScrollView* scrollView = nullptr;
+ AccessibilityObject* parent = nullptr;
+ for (parent = m_object->parentObject(); parent; parent = parent->parentObject()) {
+ if (is<AccessibilityScrollView>(*parent)) {
+ scrollView = downcast<AccessibilityScrollView>(*parent).scrollView();
+ break;
+ }
+ }
+
+ IntPoint intPoint = flooredIntPoint(point);
+ if (scrollView)
+ intPoint = scrollView->contentsToRootView(intPoint);
+
+ Page* page = m_object->page();
+
+ // If we have an empty chrome client (like SVG) then we should use the page
+ // of the scroll view parent to help us get to the screen rect.
+ if (parent && page && page->chrome().client().isEmptyChromeClient())
+ page = parent->page();
+
+ if (page) {
+ IntRect rect = IntRect(intPoint, IntSize(0, 0));
+ intPoint = page->chrome().rootViewToScreen(rect).location();
+ }
+
+ return intPoint;
+ }
+}
+
static void WebTransformCGPathToNSBezierPath(void* info, const CGPathElement *element)
{
NSBezierPath *bezierPath = (__bridge NSBezierPath *)info;
@@ -1797,14 +1836,14 @@
- (NSValue *)position
{
- auto rect = snappedIntRect(m_object->elementRect());
+ IntRect rect = snappedIntRect(m_object->elementRect());
// The Cocoa accessibility API wants the lower-left corner.
- auto floatPoint = FloatPoint(rect.x(), rect.maxY());
+ FloatPoint floatPoint = FloatPoint(rect.x(), rect.maxY());
- auto floatRect = FloatRect(floatPoint, FloatSize());
- CGPoint cgPoint = [self convertRectToSpace:floatRect space:ScreenSpace].origin;
- return [NSValue valueWithPoint:NSPointFromCGPoint(cgPoint)];
+ CGPoint cgPoint = [self convertPointToScreenSpace:floatPoint];
+
+ return [NSValue valueWithPoint:NSMakePoint(cgPoint.x, cgPoint.y)];
}
using AccessibilityRoleMap = HashMap<int, CFStringRef>;
@@ -3184,11 +3223,6 @@
return convertToNSArray(details);
}
- if ([attributeName isEqualToString:NSAccessibilityRelativeFrameAttribute]) {
- auto rect = FloatRect(snappedIntRect(m_object->elementRect()));
- return [NSValue valueWithRect:NSRectFromCGRect([self convertRectToSpace:rect space:PageSpace])];
- }
-
if ([attributeName isEqualToString:@"AXErrorMessageElements"]) {
AccessibilityObject::AccessibilityChildrenVector errorMessages;
m_object->ariaErrorMessageElements(errorMessages);
Modified: trunk/Source/WebKit/ChangeLog (240211 => 240212)
--- trunk/Source/WebKit/ChangeLog 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Source/WebKit/ChangeLog 2019-01-20 18:37:18 UTC (rev 240212)
@@ -1,3 +1,15 @@
+2019-01-20 Michael Catanzaro <[email protected]>
+
+ Unreviewed, rolling out r240209.
+
+ Broke GTK/WPE injected bundle
+
+ Reverted changeset:
+
+ "AX: Support returning relative frames for accessibility"
+ https://bugs.webkit.org/show_bug.cgi?id=193414
+ https://trac.webkit.org/changeset/240209
+
2019-01-12 Dan Bernstein <[email protected]>
[Cocoa] Avoid importing directly from subumbrella frameworks
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (240211 => 240212)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2019-01-20 18:37:18 UTC (rev 240212)
@@ -4041,21 +4041,6 @@
return _impl->accessibilityAttributeValue(attribute);
}
-IGNORE_WARNINGS_BEGIN("deprecated-implementations")
-- (id)accessibilityAttributeValue:(NSString *)attribute forParameter:(id)parameter
-IGNORE_WARNINGS_END
-{
- return _impl->accessibilityAttributeValue(attribute, parameter);
-}
-
-IGNORE_WARNINGS_BEGIN("deprecated-implementations")
-- (NSArray<NSString *> *)accessibilityParameterizedAttributeNames
-IGNORE_WARNINGS_END
-{
- NSArray<NSString *> *names = [super accessibilityParameterizedAttributeNames];
- return [names arrayByAddingObject:@"AXConvertRelativeFrame"];
-}
-
- (NSView *)hitTest:(NSPoint)point
{
if (!_impl)
Modified: trunk/Source/WebKit/UIProcess/API/mac/WKView.mm (240211 => 240212)
--- trunk/Source/WebKit/UIProcess/API/mac/WKView.mm 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Source/WebKit/UIProcess/API/mac/WKView.mm 2019-01-20 18:37:18 UTC (rev 240212)
@@ -809,21 +809,6 @@
return _data->_impl->accessibilityAttributeValue(attribute);
}
-IGNORE_WARNINGS_BEGIN("deprecated-implementations")
-- (id)accessibilityAttributeValue:(NSString *)attribute forParameter:(id)parameter
-IGNORE_WARNINGS_END
-{
- return _data->_impl->accessibilityAttributeValue(attribute, parameter);
-}
-
-IGNORE_WARNINGS_BEGIN("deprecated-implementations")
-- (NSArray<NSString *> *)accessibilityParameterizedAttributeNames
-IGNORE_WARNINGS_END
-{
- NSArray<NSString *> *names = [super accessibilityParameterizedAttributeNames];
- return [names arrayByAddingObject:@"AXConvertRelativeFrame"];
-}
-
- (NSView *)hitTest:(NSPoint)point
{
if (!_data)
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h (240211 => 240212)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h 2019-01-20 18:37:18 UTC (rev 240212)
@@ -409,7 +409,7 @@
bool accessibilityIsIgnored() const { return false; }
id accessibilityHitTest(CGPoint);
void enableAccessibilityIfNecessary();
- id accessibilityAttributeValue(NSString *, id parameter = nil);
+ id accessibilityAttributeValue(NSString *);
NSTrackingArea *primaryTrackingArea() const { return m_primaryTrackingArea.get(); }
void setPrimaryTrackingArea(NSTrackingArea *);
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (240211 => 240212)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2019-01-20 18:37:18 UTC (rev 240212)
@@ -3589,7 +3589,7 @@
updateWindowAndViewFrames();
}
-id WebViewImpl::accessibilityAttributeValue(NSString *attribute, id parameter)
+id WebViewImpl::accessibilityAttributeValue(NSString *attribute)
{
enableAccessibilityIfNecessary();
@@ -3612,13 +3612,6 @@
if ([attribute isEqualToString:NSAccessibilityEnabledAttribute])
return @YES;
- if ([attribute isEqualToString:@"AXConvertRelativeFrame"]) {
- if ([parameter isKindOfClass:[NSValue class]]) {
- NSRect rect = [(NSValue *)parameter rectValue];
- return [NSValue valueWithRect:m_pageClient->rootViewToScreen(IntRect(rect))];
- }
- }
-
return [m_view _web_superAccessibilityAttributeValue:attribute];
}
Modified: trunk/Tools/ChangeLog (240211 => 240212)
--- trunk/Tools/ChangeLog 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Tools/ChangeLog 2019-01-20 18:37:18 UTC (rev 240212)
@@ -1,3 +1,15 @@
+2019-01-20 Michael Catanzaro <[email protected]>
+
+ Unreviewed, rolling out r240209.
+
+ Broke GTK/WPE injected bundle
+
+ Reverted changeset:
+
+ "AX: Support returning relative frames for accessibility"
+ https://bugs.webkit.org/show_bug.cgi?id=193414
+ https://trac.webkit.org/changeset/240209
+
2019-01-12 Dan Bernstein <[email protected]>
[Cocoa] Avoid importing directly from subumbrella frameworks
Modified: trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm (240211 => 240212)
--- trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm 2019-01-20 18:37:18 UTC (rev 240212)
@@ -162,9 +162,9 @@
continue;
// Skip screen-specific information.
- if ([attribute isEqualToString:@"_AXPrimaryScreenHeight"] || [attribute isEqualToString:@"AXRelativeFrame"])
+ if ([attribute isEqualToString:@"_AXPrimaryScreenHeight"])
continue;
-
+
// accessibilityAttributeValue: can throw an if an attribute is not returned.
// For DumpRenderTree's purpose, we should ignore those exceptions
BEGIN_AX_OBJC_EXCEPTIONS
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h (240211 => 240212)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h 2019-01-20 18:37:18 UTC (rev 240212)
@@ -109,7 +109,6 @@
#endif
// Attributes - platform-independent implementations
- JSRetainPtr<JSStringRef> stringDescriptionOfAttributeValue(JSStringRef attribute);
JSRetainPtr<JSStringRef> stringAttributeValue(JSStringRef attribute);
double numberAttributeValue(JSStringRef attribute);
JSValueRef uiElementArrayAttributeValue(JSStringRef attribute) const;
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl (240211 => 240212)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl 2019-01-20 18:37:18 UTC (rev 240212)
@@ -58,7 +58,6 @@
readonly attribute long insertionPointLineNumber;
readonly attribute DOMString selectedTextRange;
- DOMString stringDescriptionOfAttributeValue(DOMString attr);
DOMString stringAttributeValue(DOMString attr);
double numberAttributeValue(DOMString attr);
object uiElementArrayAttributeValue(DOMString attr);
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (240211 => 240212)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm 2019-01-20 18:37:18 UTC (rev 240212)
@@ -348,11 +348,6 @@
return createEmptyJSString();
}
-JSRetainPtr<JSStringRef> AccessibilityUIElement::stringDescriptionOfAttributeValue(JSStringRef attribute)
-{
- return createEmptyJSString();
-}
-
JSRetainPtr<JSStringRef> AccessibilityUIElement::stringAttributeValue(JSStringRef attribute)
{
if (JSStringIsEqualToUTF8CString(attribute, "AXPlaceholderValue"))
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (240211 => 240212)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2019-01-20 18:02:36 UTC (rev 240211)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2019-01-20 18:37:18 UTC (rev 240212)
@@ -176,9 +176,9 @@
continue;
// Skip screen-specific information.
- if ([attribute isEqualToString:@"_AXPrimaryScreenHeight"] || [attribute isEqualToString:@"AXRelativeFrame"])
+ if ([attribute isEqualToString:@"_AXPrimaryScreenHeight"])
continue;
-
+
// accessibilityAttributeValue: can throw an if an attribute is not returned.
// For DumpRenderTree's purpose, we should ignore those exceptions
BEGIN_AX_OBJC_EXCEPTIONS
@@ -556,15 +556,6 @@
NSString* attributes = attributesOfElement(m_element);
return [attributes createJSStringRef];
}
-
-JSRetainPtr<JSStringRef> AccessibilityUIElement::stringDescriptionOfAttributeValue(JSStringRef attribute)
-{
- BEGIN_AX_OBJC_EXCEPTIONS
- NSString *value = descriptionOfValue([m_element accessibilityAttributeValue:[NSString stringWithJSStringRef:attribute]], m_element);
- return [value createJSStringRef];
- END_AX_OBJC_EXCEPTIONS
- return nullptr;
-}
JSRetainPtr<JSStringRef> AccessibilityUIElement::stringAttributeValue(JSStringRef attribute)
{