mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Move nsStyleContext::mParent to GeckoStyleContext.
Unfortunately this means that we lose the NS_STYLE_INHERIT_BIT optimization to avoid posting changes if we had not requested the struct. In practice, I'm not sure this optimization matters much, though, and we already compare all the structs anyway. We _could_ keep a weak parent pointer from the text style if needed, given we're going to keep alive the text style at least until the parent style context goes away, so should be safe, but I don't think the extra churn is worth it, to be honest. Happy to do so as part of bug 1368290 if you think it's worth it. Bug: 1385896 Reviewed-by: heycam MozReview-Commit-ID: ka6tNwf4Ke
This commit is contained in:
parent
3ef182ca36
commit
6c5cf5e2ec
7 changed files with 48 additions and 5 deletions
|
@ -37,5 +37,12 @@ bitflags! {
|
|||
/// A flag used to mark styles under a relevant link that is also
|
||||
/// visited.
|
||||
const IS_RELEVANT_LINK_VISITED = 1 << 3,
|
||||
|
||||
/// A flag used to mark styles which are a pseudo-element or under one.
|
||||
const IS_IN_PSEUDO_ELEMENT_SUBTREE = 1 << 4,
|
||||
|
||||
/// A flag used to mark styles which are in a display: none subtree, or
|
||||
/// under one.
|
||||
const IS_IN_DISPLAY_NONE_SUBTREE = 1 << 5,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue