mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +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);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[flexbox-items-as-stacking-contexts-002.html]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[flexbox-mbp-horiz-003-reverse.xhtml]
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[flexbox-mbp-horiz-003.xhtml]
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[flexbox-mbp-horiz-003v.xhtml]
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[hittest-overlapping-margin.html]
|
||||
[Flexboxes should perform hit testing in reverse paint order for overlapping elements: negative margin case (crbug.com/844505)]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[hittest-overlapping-order.html]
|
||||
[Flexboxes should perform hit testing in reverse paint order for overlapping elements: flex order case (crbug.com/844505)]
|
||||
expected: FAIL
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
[grid-inline-items-inline-blocks-001.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[grid-items-inline-blocks-001.html]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[grid-item-hit-test.html]
|
||||
[grid-item-hit-test]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue