-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Compute content sizes lazily in layout 2020 #26968
Conversation
Heads up! This PR modifies the following files:
|
@bors-servo try=wpt-2020 |
Compute content sizes lazily in layout 2020
☀️ Test successful - status-taskcluster |
@@ -144,10 +134,40 @@ impl IndependentFormattingContext { | |||
} | |||
} | |||
|
|||
pub fn content_sizes(&self) -> ContentSizes { | |||
pub fn outer_inline( |
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.
Nit: please rename this to outer_inline_content_sizes
, and similarly the next method
let container = BlockContainer::InlineFormattingContext( | ||
builder.ongoing_inline_formatting_context, | ||
); | ||
return (container, builder.contains_floats, content_sizes); | ||
return (container, builder.contains_floats); | ||
} | ||
builder.end_ongoing_inline_formatting_context(); | ||
} | ||
|
||
struct Accumulator { |
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.
Maybe remove this struct and use let mut contains_floats
instead?
components/layout_2020/flow/mod.rs
Outdated
match &self { | ||
Self::BlockLevelBoxes(boxes) => { | ||
let mut content_sizes = ContentSizes::zero(); | ||
for box_ in boxes { |
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.
Can we parallelize this loop with rayon?
I took the liberty of pushing to your branch. I’d like to land it in order to rebase another branch on top of it. @bors-servo r+ |
📌 Commit 42e9d24 has been approved by |
…apin Compute content sizes lazily in layout 2020
💔 Test failed - status-taskcluster |
…apin Compute content sizes lazily in layout 2020
💔 Test failed - status-taskcluster |
@bors-servo retry #26895 |
☀️ Test successful - status-taskcluster |
No description provided.