Closed Bug 1755229 Opened 3 years ago Closed 3 years ago

MaybeQueueCacheUpdateForStyleChanges gets null frame for reconstructed frames

Categories

(Core :: Disability Access APIs, task)

task

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

Details

Attachments

(1 file)

While working on caching the display style (bug 1743968), I discovered that when MaybeQueueCacheUpdateForStyleChanges gets called for a reconstructed frame, GetFrame() returns null. This means we can't check for style changes and thus we don't send a cache update.

My guess is that when DidSetComputedStyle is called for a reconstructed frame, the frame isn't fully constructed, so nsIContent::GetPrimaryFrame doesn't know about it yet. We can fix this by calling MaybeQueueCacheUpdateForStyleChanges from PruneOrInsertSubtree instead.

We already call MaybeQueueCacheUpdateForStyleChanges from DidSetComputedStyle for reconstructed frames.
However, at that point, nsIContent::GetPrimaryFrame (and thus LocalAccessible::GetFrame) returns null, which means we're unable to check for style changes.
Instead, we now handle style changes for reconstructed frames in PruneOrInsertSubtree, at which point the frame is definitely available.

Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6f307defee29 Call MaybeQueueCacheUpdateForStyleChanges from PruneOrInsertSubtree to handle reconstructed frames. r=morgan,emilio
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: