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

stylo: Don't persist styles on elements not in the document. #14776

Merged
merged 1 commit into from Dec 30, 2016

Conversation

@heycam
Copy link
Member

heycam commented Dec 29, 2016

This is the Servo half of https://bugzilla.mozilla.org/show_bug.cgi?id=1324983, which @emilio has already reviewed.


This change is Reviewable

@highfive
Copy link

highfive commented Dec 29, 2016

Heads up! This PR modifies the following files:

  • @bholley: components/style/gecko/wrapper.rs, components/style/gecko_bindings/bindings.rs, components/style/dom.rs, components/style/traversal.rs
  • @KiChjang: components/script/layout_wrapper.rs
  • @fitzgen: components/script/layout_wrapper.rs
  • @emilio: components/style/gecko/wrapper.rs, components/style/gecko_bindings/bindings.rs, components/style/dom.rs, components/style/traversal.rs
@highfive
Copy link

highfive commented Dec 29, 2016

warning Warning warning

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

heycam commented Dec 29, 2016

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Dec 29, 2016

📌 Commit b9a5538 has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Dec 29, 2016

Testing commit b9a5538 with merge c644a4c...

bors-servo added a commit that referenced this pull request Dec 29, 2016
stylo: Don't persist styles on elements not in the document.

<!-- Please describe your changes on the following line: -->

This is the Servo half of https://bugzilla.mozilla.org/show_bug.cgi?id=1324983, which @emilio has already reviewed.

<!-- 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/14776)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Dec 29, 2016

💔 Test failed - linux-dev

@@ -199,6 +199,10 @@ impl<'ln> TNode for ServoLayoutNode<'ln> {
self.node.parent_node_ref().map(|node| self.new_with_this_lifetime(&node))
}
}

fn is_in_doc(&self) -> bool {
self.node.is_in_doc()

This comment has been minimized.

Copy link
@emilio

emilio Dec 29, 2016

Member

You need to use unsafe_get here so this compiles.

This comment has been minimized.

Copy link
@heycam

heycam Dec 30, 2016

Author Member

Thanks, forgot to test a non-geckolib build.

@heycam heycam force-pushed the heycam:not-in-doc-persist branch from b9a5538 to be1a73d Dec 30, 2016
@heycam
Copy link
Member Author

heycam commented Dec 30, 2016

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Dec 30, 2016

📌 Commit be1a73d has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Dec 30, 2016

Testing commit be1a73d with merge b49eb6f...

bors-servo added a commit that referenced this pull request Dec 30, 2016
stylo: Don't persist styles on elements not in the document.

<!-- Please describe your changes on the following line: -->

This is the Servo half of https://bugzilla.mozilla.org/show_bug.cgi?id=1324983, which @emilio has already reviewed.

<!-- 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/14776)
<!-- Reviewable:end -->
@bors-servo bors-servo merged commit be1a73d into servo:master Dec 30, 2016
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
@bholley
Copy link
Contributor

bholley commented Dec 31, 2016

Nit: since the style system operates almost exclusively on elements, methods should go on TElement unless we have an active consumer that needs the method on TNode.

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.