WebKit Bugzilla
Attachment 339021 Details for
Bug 185085
: AX: Accessibility needs to know which part of the content view is visible on iOS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
patch.txt (text/plain), 7.67 KB, created by
Nan Wang
on 2018-04-27 13:58:06 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Nan Wang
Created:
2018-04-27 13:58:06 PDT
Size:
7.67 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 231022) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,18 @@ >+2018-04-27 Nan Wang <n_wang@apple.com> >+ >+ AX: Accessibility needs to know which part of the content view is visible on iOS >+ https://bugs.webkit.org/show_bug.cgi?id=185085 >+ <rdar://problem/39801363> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Exposed unobscuredContentRect() to iOS accessibility object wrapper. >+ >+ Test: accessibility/ios-simulator/unobscured-content-rect.html >+ >+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: >+ (-[WebAccessibilityObjectWrapper accessibilityVisibleContentRect]): >+ > 2018-04-25 Ryosuke Niwa <rniwa@webkit.org> > > PSON: Don't create a new process when navigating to a blob URL, data URL, and about:blank >Index: Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm >=================================================================== >--- Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (revision 231022) >+++ Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (working copy) >@@ -1666,6 +1666,18 @@ - (CGRect)accessibilityElementRect > return CGRectMake(rect.x(), rect.y(), rect.width(), rect.height()); > } > >+- (CGRect)accessibilityVisibleContentRect >+{ >+ if (![self _prepareAccessibilityCall]) >+ return CGRectZero; >+ >+ Document* document = m_object->document(); >+ if (!document || !document->view()) >+ return CGRectZero; >+ 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 > // center of the accessibilityFrame > - (CGPoint)accessibilityActivationPoint >Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 231110) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,14 @@ >+2018-04-27 Nan Wang <n_wang@apple.com> >+ >+ AX: Accessibility needs to know which part of the content view is visible on iOS >+ https://bugs.webkit.org/show_bug.cgi?id=185085 >+ <rdar://problem/39801363> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: >+ (WTR::AccessibilityUIElement::stringAttributeValue): >+ > 2018-04-27 Wenson Hsieh <wenson_hsieh@apple.com> > > [Extra zoom mode] Add a mechanism to override default viewport behaviors in extra zoom mode >Index: Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm >=================================================================== >--- Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (revision 231022) >+++ Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (working copy) >@@ -81,6 +81,7 @@ - (NSUInteger)accessibilityBlockquoteLev > - (NSArray *)accessibilityFindMatchingObjects:(NSDictionary *)parameters; > - (NSArray<NSString *> *)accessibilitySpeechHint; > - (BOOL)_accessibilityIsStrongPasswordField; >+- (CGRect)accessibilityVisibleContentRect; > > // TextMarker related > - (NSArray *)textMarkerRange; >@@ -356,6 +357,12 @@ JSRetainPtr<JSStringRef> AccessibilityUI > > if (JSStringIsEqualToUTF8CString(attribute, "AXSortDirection")) > return [[m_element accessibilitySortDirection] createJSStringRef]; >+ >+ if (JSStringIsEqualToUTF8CString(attribute, "AXVisibleContentRect")) { >+ CGRect screenRect = [m_element accessibilityVisibleContentRect]; >+ NSString *rectStr = [NSString stringWithFormat:@"{%.2f, %.2f, %.2f, %.2f}", screenRect.origin.x, screenRect.origin.y, screenRect.size.width, screenRect.size.height]; >+ return [rectStr createJSStringRef]; >+ } > > return JSStringCreateWithCharacters(0, 0); > } >Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 231022) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2018-04-27 Nan Wang <n_wang@apple.com> >+ >+ AX: Accessibility needs to know which part of the content view is visible on iOS >+ https://bugs.webkit.org/show_bug.cgi?id=185085 >+ <rdar://problem/39801363> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * accessibility/ios-simulator/unobscured-content-rect-expected.txt: Added. >+ * accessibility/ios-simulator/unobscured-content-rect.html: Added. >+ * platform/ios-wk1/TestExpectations: >+ > 2018-04-25 Wenson Hsieh <wenson_hsieh@apple.com> > > [Extra zoom mode] The search field on www.bing.com is missing label text >Index: LayoutTests/accessibility/ios-simulator/unobscured-content-rect-expected.txt >=================================================================== >--- LayoutTests/accessibility/ios-simulator/unobscured-content-rect-expected.txt (nonexistent) >+++ LayoutTests/accessibility/ios-simulator/unobscured-content-rect-expected.txt (working copy) >@@ -0,0 +1,12 @@ >+test >+This tests that unobscured content rect is exposed to accessibility. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS button.stringAttributeValue('AXVisibleContentRect') is '{0.00, 0.00, 800.00, 600.00}' >+PASS frameButton.stringAttributeValue('AXVisibleContentRect') is '{60.00, 10.00, 200.00, 200.00}' >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >Index: LayoutTests/accessibility/ios-simulator/unobscured-content-rect.html >=================================================================== >--- LayoutTests/accessibility/ios-simulator/unobscured-content-rect.html (nonexistent) >+++ LayoutTests/accessibility/ios-simulator/unobscured-content-rect.html (working copy) >@@ -0,0 +1,38 @@ >+ >+<!DOCTYPE html> >+<html> >+<body id="body"> >+<script src="../../resources/js-test-pre.js"></script> >+<div id="content"> >+<button id="button">test</button> >+ >+<iframe id="iframe" onload="startTest();" width="200" height="200" src="data:text/html,<body><button id='frame-button'>Click me</button><a href='#' id='frame-link'>a</a></body>"></iframe> >+ >+</div> >+ >+<p id="description"></p> >+<div id="console"></div> >+ >+<script> >+ >+ description("This tests that unobscured content rect is exposed to accessibility."); >+ >+ if (window.accessibilityController) { >+ window.jsTestIsAsync = true; >+ var button = accessibilityController.accessibleElementById("button"); >+ shouldBe("button.stringAttributeValue('AXVisibleContentRect')", "'{0.00, 0.00, 800.00, 600.00}'"); >+ >+ var frameButton; >+ function startTest() { >+ var iframe = document.getElementById("iframe"); >+ frameButton = iframe.contentWindow.accessibilityController.accessibleElementById("frame-button"); >+ shouldBe("frameButton.stringAttributeValue('AXVisibleContentRect')", "'{60.00, 10.00, 200.00, 200.00}'"); >+ finishJSTest(); >+ } >+ } >+</script> >+ >+<script src="../../resources/js-test-post.js"></script> >+</body> >+</html> >+ >Index: LayoutTests/platform/ios-wk1/TestExpectations >=================================================================== >--- LayoutTests/platform/ios-wk1/TestExpectations (revision 231022) >+++ LayoutTests/platform/ios-wk1/TestExpectations (working copy) >@@ -105,6 +105,7 @@ fast/zooming/uiscript-zooming.html [ Fai > # Not supported on WK1 > accessibility/ios-simulator/speak-selection-content.html [ Skip ] > accessibility/ios-simulator/accessibility-events-setting.html [ Skip ] >+accessibility/ios-simulator/unobscured-content-rect.html [ Skip ] > > # FIXME: Tests that fail due to lack of textInputController <rdar://problem/5106287> > editing/inserting/insert-composition-whitespace.html [ Failure ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185085
:
339017
| 339021