aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-10-08 07:47:50 -0500
committerGitHub <noreply@github.com>2017-10-08 07:47:50 -0500
commit712d32e899fd7209f11a422573e18c724ecc65d8 (patch)
treeeff3fa67b5d305ebe09a67882e27de0daa55a0c6 /components/script
parent47efcd5e52afd62dcd84ba350948039f67613e20 (diff)
parentc886e3ee7560527a0674dcc1d9b146ddf11febcd (diff)
downloadservo-712d32e899fd7209f11a422573e18c724ecc65d8.tar.gz
servo-712d32e899fd7209f11a422573e18c724ecc65d8.zip
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 -->
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/htmlbodyelement.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/script/dom/htmlbodyelement.rs b/components/script/dom/htmlbodyelement.rs
index 4ade5560700..53fb0637b0d 100644
--- a/components/script/dom/htmlbodyelement.rs
+++ b/components/script/dom/htmlbodyelement.rs
@@ -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);