mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Skip computing fragment position and return early if visibility property
is not set.
This commit is contained in:
parent
b2585bee4d
commit
8aa9427af0
1 changed files with 4 additions and 4 deletions
|
@ -790,6 +790,10 @@ impl FragmentDisplayListBuilding for Fragment {
|
||||||
relative_containing_block_mode: WritingMode,
|
relative_containing_block_mode: WritingMode,
|
||||||
background_and_border_level: BackgroundAndBorderLevel,
|
background_and_border_level: BackgroundAndBorderLevel,
|
||||||
clip: &ClippingRegion) {
|
clip: &ClippingRegion) {
|
||||||
|
if self.style().get_inheritedbox().visibility != visibility::T::visible {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Compute the fragment position relative to the parent stacking context. If the fragment
|
// Compute the fragment position relative to the parent stacking context. If the fragment
|
||||||
// itself establishes a stacking context, then the origin of its position will be (0, 0)
|
// itself establishes a stacking context, then the origin of its position will be (0, 0)
|
||||||
// for the purposes of this computation.
|
// for the purposes of this computation.
|
||||||
|
@ -807,10 +811,6 @@ impl FragmentDisplayListBuilding for Fragment {
|
||||||
stacking_relative_flow_origin,
|
stacking_relative_flow_origin,
|
||||||
self);
|
self);
|
||||||
|
|
||||||
if self.style().get_inheritedbox().visibility != visibility::T::visible {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if !stacking_relative_border_box.intersects(&layout_context.shared.dirty) {
|
if !stacking_relative_border_box.intersects(&layout_context.shared.dirty) {
|
||||||
debug!("Fragment::build_display_list: Did not intersect...");
|
debug!("Fragment::build_display_list: Did not intersect...");
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue