mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Auto merge of #11035 - mrobinson:no-stacking-contexts-for-text-fragments, r=pcwalton
Do not create stacking contexts for text fragments Without this change, each text fragment in a block that establishes a stacking context will establish its own stacking context. This is unnecessary and increases the amount of work done during display list construction. This change should not change output, but should improve performance. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11035) <!-- Reviewable:end -->
This commit is contained in:
commit
cc7953e25e
41 changed files with 13 additions and 113 deletions
|
@ -2207,6 +2207,13 @@ impl Fragment {
|
|||
|
||||
/// Returns true if this fragment establishes a new stacking context and false otherwise.
|
||||
pub fn establishes_stacking_context(&self) -> bool {
|
||||
// Text fragments shouldn't create stacking contexts.
|
||||
match self.specific {
|
||||
SpecificFragmentInfo::ScannedText(_) |
|
||||
SpecificFragmentInfo::UnscannedText(_) => return false,
|
||||
_ => {}
|
||||
}
|
||||
|
||||
if self.flags.contains(HAS_LAYER) {
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue