diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-05-27 06:21:36 -0500 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-05-27 06:21:36 -0500 |
commit | fb8934a1382ca2c9145895cf77cbe222beeb93e4 (patch) | |
tree | 12b9d116a9ccfaf5ccc8e7c5c81d51846ed94b95 | |
parent | d890453f786e2f6aa37095d9ed298cd11be0854d (diff) | |
parent | 51e2802047442c7a297c6f51627c9adb1736bdcb (diff) | |
download | servo-fb8934a1382ca2c9145895cf77cbe222beeb93e4.tar.gz servo-fb8934a1382ca2c9145895cf77cbe222beeb93e4.zip |
Auto merge of #11449 - djc:rm-get-html-element, r=nox
Remove Document.get_html_element() (fixes #8409)
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #8409 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because small refactor
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Replace uses by calling self.GetDocumentElement(), instead.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11449)
<!-- Reviewable:end -->
-rw-r--r-- | components/script/dom/document.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index d65efd7acd8..59deb93abd2 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -1229,9 +1229,9 @@ impl Document { self.stylesheets_changed_since_reflow.set(true); *self.stylesheets.borrow_mut() = None; // Mark the document element dirty so a reflow will be performed. - self.get_html_element().map(|root| { - root.upcast::<Node>().dirty(NodeDamage::NodeStyleDamaged); - }); + if let Some(element) = self.GetDocumentElement() { + element.upcast::<Node>().dirty(NodeDamage::NodeStyleDamaged); + } } pub fn get_and_reset_stylesheets_changed_since_reflow(&self) -> bool { |