Auto merge of #12495 - ice9js:implement-runnable-for-PauseIfNotInDocumentTask, r=KiChjang

Implement Runnable trait name method for PauseIfNotInDocumentTask

Implements #12350.

---
<!-- 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 #12350.

<!-- Either: -->
- [X] These changes do not require tests

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/12495)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-07-18 13:18:49 -07:00 committed by GitHub
commit 589c6eeb0f

View file

@ -801,6 +801,8 @@ impl PauseIfNotInDocumentTask {
}
impl Runnable for PauseIfNotInDocumentTask {
fn name(&self) -> &'static str { "PauseIfNotInDocumentTask" }
fn handler(self: Box<PauseIfNotInDocumentTask>) {
let elem = self.elem.root();
if !elem.upcast::<Node>().is_in_doc() {