Changeset 244538 in webkit
- Timestamp:
- Apr 23, 2019 3:47:45 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r244537 r244538 1 2019-04-23 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [ATK] Implement AtkComponentIface scroll_to methods 4 https://bugs.webkit.org/show_bug.cgi?id=196856 5 6 Reviewed by Michael Catanzaro. 7 8 Remove expectations for tests that are passing now. 9 10 * platform/gtk/TestExpectations: 11 1 12 2019-04-22 Zalan Bujtas <zalan@apple.com> 2 13 -
trunk/LayoutTests/platform/gtk/TestExpectations
r244498 r244538 818 818 webkit.org/b/169988 css3/filters/backdrop [ Skip ] 819 819 820 webkit.org/b/141072 accessibility/frame-disconnect-textmarker-cache-crash.html [ Failure ]821 822 820 webkit.org/b/141423 fast/css/font-shorthand-from-longhands.html [ Failure ] 823 821 webkit.org/b/141423 fast/css/font-shorthand-line-height.html [ Failure ] … … 908 906 # Text marker tests are not supported 909 907 webkit.org/b/153292 accessibility/text-marker [ Skip ] 908 webkit.org/b/141072 accessibility/frame-disconnect-textmarker-cache-crash.html [ Skip ] 910 909 911 910 # WebKitGTK+ doesn't have killring support. … … 3111 3110 webkit.org/b/148932 imported/w3c/web-platform-tests/css/css-color/t425-hsla-clip-outside-device-gamut-b.xht [ ImageOnlyFailure ] 3112 3111 3113 webkit.org/b/148935 accessibility/scroll-to-global-point-iframe-nested.html [ Failure ]3114 webkit.org/b/148935 accessibility/scroll-to-global-point-iframe.html [ Failure ]3115 webkit.org/b/148935 accessibility/scroll-to-global-point-main-window.html [ Failure ]3116 webkit.org/b/148935 accessibility/scroll-to-global-point-nested.html [ Failure ]3117 webkit.org/b/148935 accessibility/scroll-to-make-visible-div-overflow.html [ Failure ]3118 webkit.org/b/148935 accessibility/scroll-to-make-visible-iframe.html [ Failure ]3119 webkit.org/b/148935 accessibility/scroll-to-make-visible-nested-2.html [ Failure ]3120 webkit.org/b/148935 accessibility/scroll-to-make-visible-nested.html [ Failure ]3121 3112 webkit.org/b/148935 accessibility/scroll-to-make-visible-with-subfocus.html [ Failure ] 3122 3113 -
trunk/Source/WebCore/ChangeLog
r244517 r244538 1 2019-04-23 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [ATK] Implement AtkComponentIface scroll_to methods 4 https://bugs.webkit.org/show_bug.cgi?id=196856 5 6 Reviewed by Michael Catanzaro. 7 8 Implement scroll_to and scroll_to_point when ATK >= 2.30. 9 10 Fixes: accessibility/scroll-to-global-point-iframe-nested.html 11 accessibility/scroll-to-global-point-iframe.html 12 accessibility/scroll-to-global-point-main-window.html 13 accessibility/scroll-to-global-point-nested.html 14 accessibility/scroll-to-make-visible-div-overflow.html 15 accessibility/scroll-to-make-visible-iframe.html 16 accessibility/scroll-to-make-visible-nested-2.html 17 accessibility/scroll-to-make-visible-nested.html 18 19 * accessibility/AccessibilityObject.cpp: 20 (WebCore::AccessibilityObject::scrollToMakeVisible const): Add new method receiving the 21 ScrollRectToVisibleOptions since ATK interface has a parameter to decide how to scroll. 22 * accessibility/AccessibilityObject.h: 23 * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp: 24 (atkToContents): 25 (webkitAccessibleComponentRefAccessibleAtPoint): 26 (webkitAccessibleComponentGetExtents): 27 (webkitAccessibleComponentGrabFocus): 28 (webkitAccessibleComponentScrollTo): 29 (webkitAccessibleComponentScrollToPoint): 30 (webkitAccessibleComponentInterfaceInit): 31 (core): Deleted. 32 1 33 2019-04-22 Youenn Fablet <youenn@apple.com> 2 34 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r244392 r244538 3065 3065 void AccessibilityObject::scrollToMakeVisible() const 3066 3066 { 3067 scrollToMakeVisible({ SelectionRevealMode::Reveal, ScrollAlignment::alignCenterIfNeeded, ScrollAlignment::alignCenterIfNeeded, ShouldAllowCrossOriginScrolling::Yes }); 3068 } 3069 3070 void AccessibilityObject::scrollToMakeVisible(const ScrollRectToVisibleOptions& options) const 3071 { 3067 3072 if (dispatchAccessibilityEventWithType(AccessibilityEventType::ScrollIntoView)) 3068 3073 return; 3069 3074 3070 3075 if (isScrollView() && parentObject()) 3071 3076 parentObject()->scrollToMakeVisible(); 3072 3077 3073 3078 if (auto* renderer = this->renderer()) 3074 renderer->scrollRectToVisible(boundingBoxRect(), false, { SelectionRevealMode::Reveal, ScrollAlignment::alignCenterIfNeeded, ScrollAlignment::alignCenterIfNeeded, ShouldAllowCrossOriginScrolling::Yes });3079 renderer->scrollRectToVisible(boundingBoxRect(), false, options); 3075 3080 } 3076 3081 -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r244394 r244538 82 82 class ScrollView; 83 83 class Widget; 84 struct ScrollRectToVisibleOptions; 84 85 85 86 enum class AccessibilityTextSource { … … 883 884 IntSize scrollContentsSize() const; 884 885 IntRect scrollVisibleContentRect() const; 886 void scrollToMakeVisible(const ScrollRectToVisibleOptions&) const; 885 887 886 888 bool lastKnownIsIgnoredValue(); -
trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceComponent.cpp
r243970 r244538 37 37 #include "FrameView.h" 38 38 #include "IntRect.h" 39 #include "RenderLayer.h" 39 40 #include "WebKitAccessible.h" 40 41 #include "WebKitAccessibleUtil.h" … … 42 43 using namespace WebCore; 43 44 44 static AccessibilityObject* core(AtkComponent* component)45 static IntPoint atkToContents(const AccessibilityObject& coreObject, AtkCoordType coordType, gint x, gint y) 45 46 { 46 if (!WEBKIT_IS_ACCESSIBLE(component)) 47 return 0; 47 auto* frameView = coreObject.documentFrameView(); 48 if (!frameView) 49 return { x, y }; 48 50 49 return &webkitAccessibleGetAccessibilityObject(WEBKIT_ACCESSIBLE(component)); 50 } 51 52 static IntPoint atkToContents(AccessibilityObject* coreObject, AtkCoordType coordType, gint x, gint y) 53 { 54 IntPoint pos(x, y); 55 56 FrameView* frameView = coreObject->documentFrameView(); 57 if (frameView) { 58 switch (coordType) { 59 case ATK_XY_SCREEN: 60 return frameView->screenToContents(pos); 61 case ATK_XY_WINDOW: 62 return frameView->windowToContents(pos); 51 switch (coordType) { 52 case ATK_XY_SCREEN: 53 return frameView->screenToContents({ x, y }); 54 case ATK_XY_WINDOW: 55 return frameView->windowToContents({ x, y }); 63 56 #if ATK_CHECK_VERSION(2, 30, 0) 64 65 57 case ATK_XY_PARENT: 58 RELEASE_ASSERT_NOT_REACHED(); 66 59 #endif 67 }68 60 } 69 61 70 return pos;62 return { x, y }; 71 63 } 72 64 73 65 static AtkObject* webkitAccessibleComponentRefAccessibleAtPoint(AtkComponent* component, gint x, gint y, AtkCoordType coordType) 74 66 { 75 g_return_val_if_fail(ATK_IS_COMPONENT(component), 0);76 returnValIfWebKitAccessibleIsInvalid( WEBKIT_ACCESSIBLE(component), 0);67 auto* accessible = WEBKIT_ACCESSIBLE(component); 68 returnValIfWebKitAccessibleIsInvalid(accessible, nullptr); 77 69 78 IntPoint pos = atkToContents(core(component), coordType, x, y); 70 auto& coreObject = webkitAccessibleGetAccessibilityObject(accessible); 71 auto* target = downcast<AccessibilityObject>(coreObject.accessibilityHitTest(atkToContents(coreObject, coordType, x, y))); 72 if (!target) 73 return nullptr; 79 74 80 AccessibilityObject* target = downcast<AccessibilityObject>(core(component)->accessibilityHitTest(pos)); 81 if (!target) 82 return 0; 83 g_object_ref(target->wrapper()); 84 return ATK_OBJECT(target->wrapper()); 75 if (auto* wrapper = target->wrapper()) 76 return ATK_OBJECT(g_object_ref(wrapper)); 77 78 return nullptr; 85 79 } 86 80 87 81 static void webkitAccessibleComponentGetExtents(AtkComponent* component, gint* x, gint* y, gint* width, gint* height, AtkCoordType coordType) 88 82 { 89 g_return_if_fail(ATK_IS_COMPONENT(component));90 returnIfWebKitAccessibleIsInvalid( WEBKIT_ACCESSIBLE(component));83 auto* accessible = WEBKIT_ACCESSIBLE(component); 84 returnIfWebKitAccessibleIsInvalid(accessible); 91 85 92 IntRect rect = snappedIntRect(core(component)->elementRect());93 contentsRelativeToAtkCoordinateType( core(component), coordType, rect, x, y, width, height);86 auto& coreObject = webkitAccessibleGetAccessibilityObject(accessible); 87 contentsRelativeToAtkCoordinateType(&coreObject, coordType, snappedIntRect(coreObject.elementRect()), x, y, width, height); 94 88 } 95 89 96 90 static gboolean webkitAccessibleComponentGrabFocus(AtkComponent* component) 97 91 { 98 g_return_val_if_fail(ATK_IS_COMPONENT(component), FALSE);99 returnValIfWebKitAccessibleIsInvalid( WEBKIT_ACCESSIBLE(component), FALSE);92 auto* accessible = WEBKIT_ACCESSIBLE(component); 93 returnValIfWebKitAccessibleIsInvalid(accessible, FALSE); 100 94 101 core(component)->setFocused(true); 102 return core(component)->isFocused(); 95 auto& coreObject = webkitAccessibleGetAccessibilityObject(accessible); 96 coreObject.setFocused(true); 97 return coreObject.isFocused(); 103 98 } 99 100 #if ATK_CHECK_VERSION(2, 30, 0) 101 static gboolean webkitAccessibleComponentScrollTo(AtkComponent* component, AtkScrollType scrollType) 102 { 103 auto* accessible = WEBKIT_ACCESSIBLE(component); 104 returnValIfWebKitAccessibleIsInvalid(accessible, FALSE); 105 106 ScrollAlignment alignX; 107 ScrollAlignment alignY; 108 109 switch (scrollType) { 110 case ATK_SCROLL_TOP_LEFT: 111 alignX = ScrollAlignment::alignLeftAlways; 112 alignY = ScrollAlignment::alignTopAlways; 113 break; 114 case ATK_SCROLL_BOTTOM_RIGHT: 115 alignX = ScrollAlignment::alignRightAlways; 116 alignY = ScrollAlignment::alignBottomAlways; 117 break; 118 case ATK_SCROLL_TOP_EDGE: 119 case ATK_SCROLL_BOTTOM_EDGE: 120 // Align to a particular edge is not supported, it's always the closest edge. 121 alignX = ScrollAlignment::alignCenterIfNeeded; 122 alignY = ScrollAlignment::alignToEdgeIfNeeded; 123 break; 124 case ATK_SCROLL_LEFT_EDGE: 125 case ATK_SCROLL_RIGHT_EDGE: 126 // Align to a particular edge is not supported, it's always the closest edge. 127 alignX = ScrollAlignment::alignToEdgeIfNeeded; 128 alignY = ScrollAlignment::alignCenterIfNeeded; 129 break; 130 case ATK_SCROLL_ANYWHERE: 131 alignX = ScrollAlignment::alignCenterIfNeeded; 132 alignY = ScrollAlignment::alignCenterIfNeeded; 133 break; 134 } 135 136 auto& coreObject = webkitAccessibleGetAccessibilityObject(accessible); 137 coreObject.scrollToMakeVisible({ SelectionRevealMode::Reveal, alignX, alignY, ShouldAllowCrossOriginScrolling::Yes }); 138 139 return TRUE; 140 } 141 142 static gboolean webkitAccessibleComponentScrollToPoint(AtkComponent* component, AtkCoordType coordType, gint x, gint y) 143 { 144 auto* accessible = WEBKIT_ACCESSIBLE(component); 145 returnValIfWebKitAccessibleIsInvalid(accessible, FALSE); 146 147 auto& coreObject = webkitAccessibleGetAccessibilityObject(accessible); 148 149 IntPoint point(x, y); 150 if (coordType == ATK_XY_SCREEN) { 151 if (auto* frameView = coreObject.documentFrameView()) 152 point = frameView->contentsToWindow(frameView->screenToContents(point)); 153 } 154 155 coreObject.scrollToGlobalPoint(point); 156 157 return TRUE; 158 } 159 #endif 104 160 105 161 void webkitAccessibleComponentInterfaceInit(AtkComponentIface* iface) … … 108 164 iface->get_extents = webkitAccessibleComponentGetExtents; 109 165 iface->grab_focus = webkitAccessibleComponentGrabFocus; 166 #if ATK_CHECK_VERSION(2, 30, 0) 167 iface->scroll_to = webkitAccessibleComponentScrollTo; 168 iface->scroll_to_point = webkitAccessibleComponentScrollToPoint; 169 #endif 110 170 } 111 171 112 #endif 172 #endif // HAVE(ACCESSIBILITY) -
trunk/Tools/ChangeLog
r244533 r244538 1 2019-04-23 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [ATK] Implement AtkComponentIface scroll_to methods 4 https://bugs.webkit.org/show_bug.cgi?id=196856 5 6 Reviewed by Michael Catanzaro. 7 8 * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: 9 (WTR::AccessibilityUIElement::scrollToMakeVisible): Call atk_component_scroll_to(). 10 (WTR::AccessibilityUIElement::scrollToGlobalPoint): Call atk_component_scroll_to_point(). 11 * gtk/jhbuild.modules: Bump atk, at-spi2-core and at-spi2-atk to their latest stable version. 12 1 13 2019-04-22 Aakash Jain <aakash_jain@apple.com> 2 14 -
trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
r244498 r244538 2333 2333 void AccessibilityUIElement::scrollToMakeVisible() 2334 2334 { 2335 // FIXME: implement 2336 } 2337 2335 #if ATK_CHECK_VERSION(2, 30, 0) 2336 if (!ATK_IS_COMPONENT(m_element.get())) 2337 return; 2338 2339 atk_component_scroll_to(ATK_COMPONENT(m_element.get()), ATK_SCROLL_ANYWHERE); 2340 #endif 2341 } 2342 2338 2343 void AccessibilityUIElement::scrollToGlobalPoint(int x, int y) 2339 2344 { 2340 // FIXME: implement 2341 } 2342 2345 #if ATK_CHECK_VERSION(2, 30, 0) 2346 if (!ATK_IS_COMPONENT(m_element.get())) 2347 return; 2348 2349 atk_component_scroll_to_point(ATK_COMPONENT(m_element.get()), ATK_XY_WINDOW, x, y); 2350 #endif 2351 } 2352 2343 2353 void AccessibilityUIElement::scrollToMakeVisibleWithSubFocus(int x, int y, int width, int height) 2344 2354 { -
trunk/Tools/gtk/jhbuild.modules
r241016 r244538 282 282 </autotools> 283 283 284 <autotools id="atk" 285 autogen-sh="configure" 286 autogenargs="--disable-introspection"> 287 <branch module="pub/GNOME/sources/atk/2.25/atk-2.25.2.tar.xz" version="2.25.2" 288 repo="ftp.gnome.org" 289 hash="sha256:75ac1f63e845f895dec8d72d4645ef5f362e32c921cc78987f2f19c2ce212a24"/> 290 </autotools> 291 292 <autotools id="at-spi2-core" 293 autogen-sh="configure" 294 autogenargs="--disable-introspection"> 295 <branch module="pub/GNOME/sources/at-spi2-core/2.25/at-spi2-core-2.25.4.tar.xz" version="2.25.4" 296 repo="ftp.gnome.org" 297 hash="sha256:baeccbf92e84e64bb4a853f076c27b78ab44edf1fa5414a9c6e59a9b180bc9d8"> 298 </branch> 299 <dependencies> 300 <dep package="glib"/> 301 </dependencies> 302 </autotools> 303 304 <autotools id="at-spi2-atk" 305 autogen-sh="configure"> 306 <branch module="pub/GNOME/sources/at-spi2-atk/2.25/at-spi2-atk-2.25.3.tar.xz" version="2.25.3" 307 repo="ftp.gnome.org" 308 hash="sha256:b7aab1a4ee7182083fcfafb595b7b3fe4df34aa2230c775050fe6015b01f84e1"> 284 <meson id="atk" mesonargs="-Dintrospection=false"> 285 <branch module="pub/GNOME/sources/atk/2.32/atk-2.32.0.tar.xz" version="2.32.0" 286 repo="ftp.gnome.org" 287 hash="sha256:cb41feda7fe4ef0daa024471438ea0219592baf7c291347e5a858bb64e4091cc"/> 288 </meson> 289 290 <meson id="at-spi2-core" mesonargs="-Dintrospection=no"> 291 <branch module="pub/GNOME/sources/at-spi2-core/2.32/at-spi2-core-2.32.1.tar.xz" version="2.32.1" 292 repo="ftp.gnome.org" 293 hash="sha256:3c2aa937ebfaca2c86569bce9b16a34fbe20d69ef0c58846313b1c42f53b0d53"> 294 </branch> 295 <dependencies> 296 <dep package="glib"/> 297 </dependencies> 298 </meson> 299 300 <meson id="at-spi2-atk"> 301 <branch module="pub/GNOME/sources/at-spi2-atk/2.32/at-spi2-atk-2.32.0.tar.xz" version="2.32.0" 302 repo="ftp.gnome.org" 303 hash="sha256:0b51e6d339fa2bcca3a3e3159ccea574c67b107f1ac8b00047fa60e34ce7a45c"> 309 304 </branch> 310 305 <dependencies> … … 313 308 <dep package="at-spi2-core"/> 314 309 </dependencies> 315 </ autotools>310 </meson> 316 311 317 312 <autotools id="libxml2" supports-non-srcdir-builds="no"
Note: See TracChangeset
for help on using the changeset viewer.