Bug 253224 - Add mechanism to compute renderer offsets ignoring scrolling
Summary: Add mechanism to compute renderer offsets ignoring scrolling
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tyler Wilcock
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-03-01 22:04 PST by Tyler Wilcock
Modified: 2023-03-04 05:21 PST (History)
27 users (show)

See Also:


Attachments
Patch (110.31 KB, patch)
2023-03-01 22:07 PST, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (109.36 KB, patch)
2023-03-04 00:34 PST, Tyler Wilcock
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler Wilcock 2023-03-01 22:04:51 PST
Soon, support will be added to resolve accessibility object frames off the main-thread. To avoid the need to recalculate the frame of every object every time a scroll happens, we need to be able to compute renderer position offsets that exclude scroll offsets.
Comment 1 Radar WebKit Bug Importer 2023-03-01 22:05:00 PST
<rdar://problem/106125806>
Comment 2 Tyler Wilcock 2023-03-01 22:07:05 PST
Created attachment 465256 [details]
Patch
Comment 3 Andres Gonzalez 2023-03-02 12:59:39 PST
(In reply to Tyler Wilcock from comment #2)
> Created attachment 465256 [details]
> Patch

--- a/Source/WebCore/accessibility/AccessibilityObjectInterface.h
+++ b/Source/WebCore/accessibility/AccessibilityObjectInterface.h

-    virtual LayoutRect boundingBoxRect() const = 0;
+    virtual LayoutRect boundingBoxRect(OptionSet<MapCoordinatesMode> = { }) const = 0;

Why do we need to expose this in the AXCoreObject interface? I would think that this is only relevant in the AccessibilityRenderObject class hierarchy, maybe in AccessibilityNodeObject, but don't think it has to be all the way to the interface and thus to the AXIsolatedObjects.
Comment 4 Tyler Wilcock 2023-03-02 14:08:53 PST
(In reply to Andres Gonzalez from comment #3)
> (In reply to Tyler Wilcock from comment #2)
> > Created attachment 465256 [details]
> > Patch
> 
> --- a/Source/WebCore/accessibility/AccessibilityObjectInterface.h
> +++ b/Source/WebCore/accessibility/AccessibilityObjectInterface.h
> 
> -    virtual LayoutRect boundingBoxRect() const = 0;
> +    virtual LayoutRect boundingBoxRect(OptionSet<MapCoordinatesMode> = { })
> const = 0;
> 
> Why do we need to expose this in the AXCoreObject interface? I would think
> that this is only relevant in the AccessibilityRenderObject class hierarchy,
> maybe in AccessibilityNodeObject, but don't think it has to be all the way
> to the interface and thus to the AXIsolatedObjects.
We don't :) my larger patch actually moved boundingBoxRect to be virtual on AccessibilityObject rather than AXCoreObject. But I wanted to make this patch as straight-forward and atomic as possible, so I excluded that change from this patch.
Comment 5 Tyler Wilcock 2023-03-04 00:34:27 PST
Created attachment 465290 [details]
Patch