Auto merge of #18758 - stuartnelson3:stn/dynamic-body-bgcolor, r=emilio

Add support for dynamic bgcolor change

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- 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/18758)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-10-08 07:47:50 -05:00 committed by GitHub
commit 712d32e899
4 changed files with 47 additions and 0 deletions

View file

@ -125,6 +125,14 @@ impl VirtualMethods for HTMLBodyElement {
Some(self.upcast::<HTMLElement>() as &VirtualMethods)
}
fn attribute_affects_presentational_hints(&self, attr: &Attr) -> bool {
if attr.local_name() == &local_name!("bgcolor") {
return true;
}
self.super_type().unwrap().attribute_affects_presentational_hints(attr)
}
fn bind_to_tree(&self, tree_in_doc: bool) {
if let Some(ref s) = self.super_type() {
s.bind_to_tree(tree_in_doc);