Repository navigation
stylo: Traverse anonymous children when styling - #12911
Conversation
|
Heads up! This PR modifies the following files:
|
|
r? @emilio |
|
(Though let's wait to land this until the gecko-side changes are ready) |
|
@bors-servo try |
stylo: Traverse anonymous children when styling The corresponding Gecko changes are at https://bugzilla.mozilla.org/show_bug.cgi?id=1292662
|
💔 Test failed - linux-dev |
|
@bors-servo try |
stylo: Traverse anonymous children when styling The corresponding Gecko changes are at https://bugzilla.mozilla.org/show_bug.cgi?id=1292662 <!-- 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/12911) <!-- Reviewable:end -->
|
⌛ Trying commit 25d0289 with merge 75001e0... |
|
💔 Test failed - linux-rel |
|
|
@bors-servo retry |
stylo: Traverse anonymous children when styling The corresponding Gecko changes are at https://bugzilla.mozilla.org/show_bug.cgi?id=1292662 <!-- 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/12911) <!-- Reviewable:end -->
|
💔 Test failed - mac-rel-wpt |
|
@bors-servo retry |
stylo: Traverse anonymous children when styling The corresponding Gecko changes are at https://bugzilla.mozilla.org/show_bug.cgi?id=1292662 <!-- 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/12911) <!-- Reviewable:end -->
|
☀️ Test successful - arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev |
|
|
||
| impl<'a> Drop for GeckoChildrenIterator<'a> { | ||
| fn drop(&mut self) { | ||
| match *self { |
| curr | ||
| }, | ||
| GeckoChildrenIterator::GeckoIterator(it) => unsafe { | ||
| Gecko_GetNextStyleChild(it).as_ref().map(|n| GeckoNode::from_ref(n)) |
There was a problem hiding this comment.
You can eta-reduce this closure ;-)
There was a problem hiding this comment.
I can't:
Compiling geckoservo v0.0.1 (file:///files/mozilla/stylo/bb/servo/ports/geckolib)
wrapper.rs:376:54: 376:57 error: the trait bound unsafe fn(&gecko_bindings::bindings::nsINode) -> wrapper::GeckoNode<'_> {wrapper::GeckoNode<'_>::from_ref}: std::ops::FnOnce<(&gecko_bindings::bindings::nsINode,)> is not satisfied [E0277]
wrapper.rs:376 Gecko_GetNextStyleChild(it).as_ref().map(GeckoNode::from_ref)
^~~
wrapper.rs:376:54: 376:57 help: run rustc --explain E0277 to see a detailed explanation
error: aborting due to previous error
error: Could not compile geckoservo.
To learn more, run the command again with --verbose.
|
r=me with those nits, awesome you also trimmed down the TNode trait :) |
These impose additional requirements on the traversal code that we want to avoid for Gecko (for now).
This will allow us to specialize ChildrenIterator in the Gecko case to do something more interesting in some cases.
The semantics of this method with respect to anonymous children are unclear. Thankfully it's unused, so we can remove it.
25d0289 to
122df8c
Compare
|
@bors-servo r=emilio |
|
📌 Commit 122df8c has been approved by |
|
@bors-servo p=1 Need this to rev the branch. |
stylo: Traverse anonymous children when styling The corresponding Gecko changes are at https://bugzilla.mozilla.org/show_bug.cgi?id=1292662 <!-- 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/12911) <!-- Reviewable:end -->
|
💔 Test failed - mac-rel-wpt |
|
|
@bors-servo retry |
|
⚡ Previous build results for arm32, arm64, linux-dev, linux-rel, mac-dev-unit, windows-dev are reusable. Rebuilding only mac-rel-css, mac-rel-wpt... |
|
☀️ Test successful - arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev |
The corresponding Gecko changes are at https://bugzilla.mozilla.org/show_bug.cgi?id=1292662
This change is