diff options
Diffstat (limited to 'components/layout/fragment.rs')
-rw-r--r-- | components/layout/fragment.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs index 9868e141df1..1de7a6ee86f 100644 --- a/components/layout/fragment.rs +++ b/components/layout/fragment.rs @@ -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 } |