New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
layout: Do not inherit node and fragment flags in anonymous boxes #31586
Conversation
🔨 Triggering try run (#8205014162) for Linux WPT |
style, | ||
} | ||
} | ||
|
||
pub(crate) fn new_replacing_style(&self, style: ServoArc<ComputedValues>) -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should all callers of this use new_anonymous
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose to keep it for a couple callers which expect things to be inherited or which are creating list markers. There's a larger refactor we should do to clean this up and we need to implement the ::marker
pseudo, but these are pretty intrusive things that should be done in a larger project.
Test results for linux-wpt-layout-2020 from try job (#8205014162): Flaky unexpected result (15)
Stable unexpected results that are known to be intermittent (18)
|
✨ Try run (#8205014162) succeeded. |
let (rowspan, colspan) = info | ||
.node | ||
.map(|node| { | ||
let node = node.to_threadsafe(); | ||
let rowspan = (node.get_rowspan().unwrap_or(1) as usize).min(65534); | ||
let colspan = (node.get_colspan().unwrap_or(1) as usize).min(1000); | ||
(rowspan, colspan) | ||
}) | ||
.unwrap_or((1, 1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let (rowspan, colspan) = info | |
.node | |
.map(|node| { | |
let node = node.to_threadsafe(); | |
let rowspan = (node.get_rowspan().unwrap_or(1) as usize).min(65534); | |
let colspan = (node.get_colspan().unwrap_or(1) as usize).min(1000); | |
(rowspan, colspan) | |
}) | |
.unwrap_or((1, 1)); | |
let (rowspan, colspan) = info.node.map_or((1, 1), |node| { | |
let node = node.to_threadsafe(); | |
let rowspan = node.get_rowspan().unwrap_or(1).min(65534) as usize; | |
let colspan = node.get_colspan().unwrap_or(1).min(1000) as usize; | |
(rowspan, colspan) | |
}); |
components/layout_2020/table/mod.rs
Outdated
self.base_fragment_info | ||
.tag | ||
.map(|tag| tag.node.0) | ||
.unwrap_or(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.base_fragment_info | |
.tag | |
.map(|tag| tag.node.0) | |
.unwrap_or(0) | |
self.base_fragment_info.tag.map_or(0, |tag| tag.node.0) |
This doesn't really have observable behavior right now, as much as I tried to trigger some kind of bug. On the other hand, it's just wrong and is very obvious when you dump the Fragment tree. If you create a `display: table-cell` that is a child of the `<body>` all parts of the anonymous table are flagged as if they are the `<body>` element.
This doesn't really have observable behavior right now, as much as I
tried to trigger some kind of bug. On the other hand, it's just wrong
and is very obvious when you dump the Fragment tree. If you create a
display: table-cell
that is a child of the<body>
all parts of theanonymous table are flagged as if they are the
<body>
element../mach build -d
does not report any errors./mach test-tidy
does not report any errors