mirror of
https://github.com/servo/servo.git
synced 2025-07-31 11:10:22 +01:00
style: Don't share style for cousins that are using Container Queries
Differential Revision: https://phabricator.services.mozilla.com/D164224
This commit is contained in:
parent
6a6658801f
commit
a478c1bf90
1 changed files with 8 additions and 2 deletions
|
@ -476,10 +476,16 @@ impl ElementData {
|
|||
/// happens later in the styling pipeline. The former gives us the stronger guarantees
|
||||
/// we need for style sharing, the latter does not.
|
||||
pub fn safe_for_cousin_sharing(&self) -> bool {
|
||||
!self.flags.intersects(
|
||||
if self.flags.intersects(
|
||||
ElementDataFlags::TRAVERSED_WITHOUT_STYLING |
|
||||
ElementDataFlags::PRIMARY_STYLE_REUSED_VIA_RULE_NODE,
|
||||
)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
if !self.styles.primary().get_box().clone_container_type().is_normal() {
|
||||
return false;
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
/// Measures memory usage.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue