mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
script/layout: Ensure a StackingContextTree before IntersectionObserver geometry queries (#38473)
IntersectionObserver needs to be able to query node geometry without forcing a layout. A previous layout could have run without needing a `StackingContextTree`. In that case the layout-less query should finish building the `StackingContextTree` before doing the query. Add a new type of layout API which requests that layout finishes building the StackingContextTree. This change also slightly simplifies and corrects the naming of `Element` APIs around client box queries. Testing: This should fix intermittent failures in WPT tests. Fixes: #38380. Fixes: #38390. Closes: #38400. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
757dbc0eda
commit
44a11a7c6c
12 changed files with 78 additions and 59 deletions
|
@ -241,6 +241,10 @@ pub trait Layout {
|
|||
/// Requests a reflow.
|
||||
fn reflow(&mut self, reflow_request: ReflowRequest) -> Option<ReflowResult>;
|
||||
|
||||
/// Do not request a reflow, but ensure that any previous reflow completes building a stacking
|
||||
/// context tree so that it is ready to query the final size of any elements in script.
|
||||
fn ensure_stacking_context_tree(&self, viewport_details: ViewportDetails);
|
||||
|
||||
/// Tells layout that script has added some paint worklet modules.
|
||||
fn register_paint_worklet_modules(
|
||||
&mut self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue