Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upincremental restyle: Hoist most styling functionality from TNode to TElement #13956
Conversation
highfive
commented
Oct 28, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Oct 28, 2016
|
@bors-servo try |
incremental restyle: Hoist most styling functionality from TNode to TElement This is a continuation of the work in #13951. I'm separating it out into a separate PR since the aforementioned patch has a green try run and this one doesn't yet. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13956) <!-- Reviewable:end -->
|
|
|
The idea looks good to me, but I need to check with much more care before stamping this. |
| self.init_style_and_layout_data(opaque); | ||
| } | ||
| impl<T: GetLayoutData> LayoutNodeHelpers for T { | ||
| fn ensure_layout_data(&self) -> NonOpaqueStyleAndLayoutData { |
This comment has been minimized.
This comment has been minimized.
emilio
Oct 28, 2016
Member
So I'm slightly scared about this change in the sense that now calling borrow_layout_data can trigger a non thread-safe allocation, so I'll have to check this much more carefully.
This comment has been minimized.
This comment has been minimized.
bholley
Oct 28, 2016
Author
Contributor
Great point. This observation escaped me in my post-midnight haze of getting this over the line. Let me take a crack at fixing this somehow.
| @@ -1111,8 +1111,8 @@ impl LayoutThread { | |||
|
|
|||
| let mut current = node.parent_node(); | |||
| while let Some(node) = current { | |||
| if node.has_dirty_descendants() { break; } | |||
| unsafe { node.set_dirty_descendants(); } | |||
| if node.is_element() && node.as_element().unwrap().has_dirty_descendants() { break; } | |||
This comment has been minimized.
This comment has been minimized.
emilio
Oct 28, 2016
Member
Given we're checking on parent_node, this is guaranteed to be an element, right?
This comment has been minimized.
This comment has been minimized.
|
@bors-servo: retry
|
incremental restyle: Hoist most styling functionality from TNode to TElement This is a continuation of the work in #13951. I'm separating it out into a separate PR since the aforementioned patch has a green try run and this one doesn't yet. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13956) <!-- Reviewable:end -->
|
|
@bors-servo retry |
incremental restyle: Hoist most styling functionality from TNode to TElement This is a continuation of the work in #13951. I'm separating it out into a separate PR since the aforementioned patch has a green try run and this one doesn't yet. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13956) <!-- Reviewable:end -->
|
|
|
@bors-servo retry
|
incremental restyle: Hoist most styling functionality from TNode to TElement This is a continuation of the work in #13951. I'm separating it out into a separate PR since the aforementioned patch has a green try run and this one doesn't yet. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13956) <!-- Reviewable:end -->
|
|
|
@bors-servo r=emilio Thanks for the review! |
|
|
|
@bors-servo p=1 More refactorings on top. |
|
|
incremental restyle: Hoist most styling functionality from TNode to TElement This is a continuation of the work in #13951. I'm separating it out into a separate PR since the aforementioned patch has a green try run and this one doesn't yet. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13956) <!-- Reviewable:end -->
|
|
|
MozReview-Commit-ID: 96VsmsoZtjZ
|
Whoops - I forget it was a raw pointer and not Deref impls. @bors-servo r=emilio |
|
|
incremental restyle: Hoist most styling functionality from TNode to TElement This is a continuation of the work in #13951. I'm separating it out into a separate PR since the aforementioned patch has a green try run and this one doesn't yet. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13956) <!-- Reviewable:end -->
|
|
|
@bors-servo: retry
|
|
|
|
|
bholley commentedOct 28, 2016
•
edited by larsbergstrom
This is a continuation of the work in #13951. I'm separating it out into a separate PR since the aforementioned patch has a green try run and this one doesn't yet.
This change is