Skip to content
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

incremental restyle: Hoist most styling functionality from TNode to TElement #13956

Merged
merged 2 commits into from Oct 30, 2016

Conversation

@bholley
Copy link
Contributor

bholley commented Oct 28, 2016

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 Reviewable

@highfive
Copy link

highfive commented Oct 28, 2016

Heads up! This PR modifies the following files:

  • @KiChjang: components/script_layout_interface/wrapper_traits.rs, components/script/layout_wrapper.rs
  • @fitzgen: components/script_layout_interface/wrapper_traits.rs, components/script/layout_wrapper.rs
  • @emilio: components/layout/fragment.rs, components/layout/traversal.rs, ports/geckolib/glue.rs, components/style/parallel.rs, components/layout/wrapper.rs, components/style/gecko/traversal.rs, components/style/sequential.rs, components/layout/construct.rs, components/style/dom.rs, components/style/gecko/wrapper.rs, components/layout/query.rs, components/layout/lib.rs, components/style/traversal.rs, components/style/matching.rs
@highfive
Copy link

highfive commented Oct 28, 2016

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
  • These commits modify style, layout, and script code, but no tests are modified. Please consider adding a test!
@bholley
Copy link
Contributor Author

bholley commented Oct 28, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Oct 28, 2016

Trying commit 37f05cc with merge 6f4d957...

bors-servo added a commit that referenced this pull request Oct 28, 2016
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 -->
@bholley
Copy link
Contributor Author

bholley commented Oct 28, 2016

r? @emilio

(Review #13951 first)

@highfive highfive assigned emilio and unassigned larsbergstrom Oct 28, 2016
@bors-servo
Copy link
Contributor

bors-servo commented Oct 28, 2016

💔 Test failed - linux-rel-wpt

Copy link
Member

emilio left a comment

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.

@emilio

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.

@bholley

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.

@emilio

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.

@bholley

bholley Oct 28, 2016

Author Contributor

Good point, will fix.

@emilio
Copy link
Member

emilio commented Oct 28, 2016

@bors-servo: retry

  • bash: tests/wpt/run.sh: No such file or directory?
bors-servo added a commit that referenced this pull request Oct 28, 2016
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
Copy link
Contributor

bors-servo commented Oct 28, 2016

Trying commit 37f05cc with merge d42c64a...

@bors-servo
Copy link
Contributor

bors-servo commented Oct 28, 2016

💔 Test failed - linux-rel-wpt

@bholley
Copy link
Contributor Author

bholley commented Oct 28, 2016

bash: tests/wpt/run.sh: No such file or directory

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Oct 28, 2016

Trying commit 37f05cc with merge 904c825...

bors-servo added a commit that referenced this pull request Oct 28, 2016
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
Copy link
Contributor

bors-servo commented Oct 28, 2016

💔 Test failed - linux-rel-wpt

@larsbergstrom
Copy link
Contributor

larsbergstrom commented Oct 28, 2016

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Oct 28, 2016

Trying commit 37f05cc with merge 1dcb061...

bors-servo added a commit that referenced this pull request Oct 28, 2016
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
Copy link
Contributor

bors-servo commented Oct 28, 2016

💔 Test failed - mac-dev-unit

@bholley bholley force-pushed the bholley:more_telement branch from 37f05cc to 776f781 Oct 28, 2016
@bholley
Copy link
Contributor Author

bholley commented Oct 29, 2016

@bors-servo r=emilio

Thanks for the review!

@bors-servo
Copy link
Contributor

bors-servo commented Oct 29, 2016

📌 Commit 71ee1bd has been approved by emilio

@bholley
Copy link
Contributor Author

bholley commented Oct 29, 2016

@bors-servo p=1

More refactorings on top.

@bors-servo
Copy link
Contributor

bors-servo commented Oct 29, 2016

Testing commit 71ee1bd with merge 59e651b...

bors-servo added a commit that referenced this pull request Oct 29, 2016
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
Copy link
Contributor

bors-servo commented Oct 29, 2016

💔 Test failed - linux-dev

@jdm
Copy link
Member

jdm commented Oct 29, 2016

error[E0133]: dereference of raw pointer requires unsafe function or block
   --> /home/servo/buildbot/slave/linux-dev/build/components/script/layout_wrapper.rs:560:14
    |
560 |             &**d.ptr
    |              ^^^^^^^ dereference of raw pointer

error: aborting due to previous error
MozReview-Commit-ID: 96VsmsoZtjZ
@bholley bholley force-pushed the bholley:more_telement branch from 71ee1bd to be89f73 Oct 29, 2016
@bholley
Copy link
Contributor Author

bholley commented Oct 29, 2016

Whoops - I forget it was a raw pointer and not Deref impls.

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Oct 29, 2016

📌 Commit be89f73 has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Oct 29, 2016

Testing commit be89f73 with merge b611e5c...

bors-servo added a commit that referenced this pull request Oct 29, 2016
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
Copy link
Contributor

bors-servo commented Oct 29, 2016

💔 Test failed - linux-rel-wpt

@emilio
Copy link
Member

emilio commented Oct 29, 2016

@bors-servo: retry

@bors-servo
Copy link
Contributor

bors-servo commented Oct 30, 2016

Previous build results for arm32, arm64, linux-dev, linux-rel-css, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-dev are reusable. Rebuilding only linux-rel-wpt...

@bors-servo
Copy link
Contributor

bors-servo commented Oct 30, 2016

@bors-servo bors-servo merged commit be89f73 into servo:master Oct 30, 2016
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@bholley bholley deleted the bholley:more_telement branch Oct 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.