mirror of
https://github.com/servo/servo.git
synced 2025-06-17 12:54:28 +00:00
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:
commit
712d32e899
4 changed files with 47 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue