mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Rename ComputedValuesExt::establishes_containing_block
This renames the helper method to be a bit more accurate. For elements with static, relative, and sticky positioning, their containing block is always formed by their nearest block container ancestor. This method is really dealing with style that means an element will establish a containing block for absolutely positioned descendants.
This commit is contained in:
parent
9acb9cc5cf
commit
db194e74ad
3 changed files with 17 additions and 6 deletions
|
@ -196,7 +196,7 @@ impl PositioningContext {
|
|||
pub(crate) fn new_for_style(style: &ComputedValues) -> Option<Self> {
|
||||
if style.establishes_containing_block_for_all_descendants() {
|
||||
Some(Self::new_for_containing_block_for_all_descendants())
|
||||
} else if style.establishes_containing_block() {
|
||||
} else if style.establishes_containing_block_for_absolute_descendants() {
|
||||
Some(Self {
|
||||
for_nearest_positioned_ancestor: Some(Vec::new()),
|
||||
for_nearest_containing_block_for_all_descendants: Vec::new(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue