mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
layout: Paint flex and grid items like inline blocks (#38574)
As specified in https://drafts.csswg.org/css-flexbox-1/#painting and https://drafts.csswg.org/css-grid/#z-order Testing: Makes some WPT pass. Fixes: #38573 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
7b057be780
commit
c49d53b8dd
10 changed files with 6 additions and 28 deletions
|
@ -930,7 +930,8 @@ struct OverflowFrameData {
|
|||
|
||||
impl BoxFragment {
|
||||
fn get_stacking_context_type(&self) -> Option<StackingContextType> {
|
||||
if self.style.establishes_stacking_context(self.base.flags) {
|
||||
let flags = self.base.flags;
|
||||
if self.style.establishes_stacking_context(flags) {
|
||||
return Some(StackingContextType::RealStackingContext);
|
||||
}
|
||||
|
||||
|
@ -943,7 +944,10 @@ impl BoxFragment {
|
|||
return Some(StackingContextType::FloatStackingContainer);
|
||||
}
|
||||
|
||||
if self.is_atomic_inline_level() {
|
||||
// Flex and grid items are painted like inline blocks.
|
||||
// <https://drafts.csswg.org/css-flexbox-1/#painting>
|
||||
// <https://drafts.csswg.org/css-grid/#z-order>
|
||||
if self.is_atomic_inline_level() || flags.contains(FragmentFlags::IS_FLEX_OR_GRID_ITEM) {
|
||||
return Some(StackingContextType::AtomicInlineStackingContainer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue