mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
compositor: Request reflow when doing a page zooming (#38166)
Request a reflow when doing page zoom and only modify the scaling of the WebView scene after the first root pipeline display list with the new zoom is ready. In addition: - store zoom limits in `Scale` types - send `ViewportDetails` along with the display list so that we can detect when the root pipeline scale is ready. Testing: This is quite hard to test as it requires verification that contents are zoomed appropriately at the right time. Fixes: #38091. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
3d2f0d1be5
commit
8d5faa9bf9
10 changed files with 111 additions and 44 deletions
|
@ -75,7 +75,7 @@ use style::{Zero, driver};
|
|||
use style_traits::{CSSPixel, SpeculativePainter};
|
||||
use stylo_atoms::Atom;
|
||||
use url::Url;
|
||||
use webrender_api::units::{DevicePixel, DevicePoint, LayoutSize, LayoutVector2D};
|
||||
use webrender_api::units::{DevicePixel, DevicePoint, LayoutVector2D};
|
||||
use webrender_api::{ExternalScrollId, HitTestFlags};
|
||||
|
||||
use crate::context::{CachedImageOrError, ImageResolver, LayoutContext};
|
||||
|
@ -960,12 +960,6 @@ impl LayoutThread {
|
|||
return;
|
||||
}
|
||||
|
||||
let viewport_size = self.stylist.device().au_viewport_size();
|
||||
let viewport_size = LayoutSize::new(
|
||||
viewport_size.width.to_f32_px(),
|
||||
viewport_size.height.to_f32_px(),
|
||||
);
|
||||
|
||||
let mut stacking_context_tree = self.stacking_context_tree.borrow_mut();
|
||||
let old_scroll_offsets = stacking_context_tree
|
||||
.as_ref()
|
||||
|
@ -976,7 +970,7 @@ impl LayoutThread {
|
|||
// applicable spatial and clip nodes.
|
||||
let mut new_stacking_context_tree = StackingContextTree::new(
|
||||
fragment_tree,
|
||||
viewport_size,
|
||||
reflow_request.viewport_details,
|
||||
self.id.into(),
|
||||
!self.have_ever_generated_display_list.get(),
|
||||
&self.debug,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue