mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Used shared clips for overflow:hidden and CSS clip
Instead of passing down a complex clipping region to each item, used shared clipping to handle overflow:hidden and CSS clips. In addition to being more efficient, this should also fix quite a few issues related to absolutely positioned elements. One existing reftest is slightly modified to avoid tickling a quirk with the way that WebRender rasterizes masks. We are working out how to best express these combined masks with the API or need to. The change does not affect the original subject of the reftest. Fixes #13109. Fixes #10151. Fixes #7575. Fixes #8074. Fixes #8780.
This commit is contained in:
parent
b9274b7527
commit
4451b8a771
16 changed files with 483 additions and 343 deletions
|
@ -45,8 +45,7 @@ use euclid::rect::Rect;
|
|||
use euclid::scale_factor::ScaleFactor;
|
||||
use euclid::size::Size2D;
|
||||
use fnv::FnvHasher;
|
||||
use gfx::display_list::{ClippingRegion, OpaqueNode};
|
||||
use gfx::display_list::WebRenderImageInfo;
|
||||
use gfx::display_list::{OpaqueNode, WebRenderImageInfo};
|
||||
use gfx::font;
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use gfx::font_context;
|
||||
|
@ -854,8 +853,7 @@ impl LayoutThread {
|
|||
LogicalPoint::zero(writing_mode).to_physical(writing_mode,
|
||||
self.viewport_size);
|
||||
|
||||
flow::mut_base(layout_root).clip =
|
||||
ClippingRegion::from_rect(&data.page_clip_rect);
|
||||
flow::mut_base(layout_root).clip = data.page_clip_rect;
|
||||
|
||||
if flow::base(layout_root).restyle_damage.contains(REPOSITION) {
|
||||
layout_root.traverse_preorder(&ComputeAbsolutePositions {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue