Closed Bug 1763214 Opened 2 years ago Closed 2 years ago

Cache image position

Categories

(Core :: Disability Access APIs, task)

task

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: morgan, Assigned: morgan)

References

Details

Attachments

(1 file)

This function depends on bounds directly -- and now that we've cached bounds, we can theoretically switch this to a cached implementation too.

We could alter this function to be completely opaque:

LayoutDeviceIntPoint RemoteAccessible::ImagePosition(uint32_t aCoordType) {
    return Bounds().TopLeft();
}

... but I think we're probably better off casing off of mCachedFields for now, since there are still slight discrepancies between sync IPC bounds and cached bounds.

Actually I don't think there's any risk to using that ^ version of the function given the sync IPC version just ends up returning Bounds().TopLeft(), which shouldn't change if we fetch Bounds() via sync IPC and then query its TopLeft(). Theoretically sending the point instead of the rect is less IPC traffic, but I don't know how much that affects performance given the overhead of doing IPC at all.
So, nevermind 😀

Attachment #9270981 - Attachment description: Bug 1763214: Convert ImagePosition to use cached bounds r?eeejay → Bug 1763214: Convert ImagePosition, ImageSize to use cached bounds r?eeejay
Type: defect → task
Pushed by mreschenberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d8c1412fe13c
Convert ImagePosition, ImageSize to use cached bounds r=Jamie
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
Blocks: 1818176
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: