mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
script: Map HTMLCanvasElement width and height attributes.
This commit is contained in:
parent
df29d02026
commit
53cad6227e
4 changed files with 63 additions and 3 deletions
|
@ -133,7 +133,7 @@ use std::sync::Arc;
|
|||
use std::time::{Duration, Instant};
|
||||
use style::attr::AttrValue;
|
||||
use style::context::{QuirksMode, ReflowGoal};
|
||||
use style::restyle_hints::{RestyleHint, RESTYLE_STYLE_ATTRIBUTE};
|
||||
use style::restyle_hints::{RestyleHint, RESTYLE_SELF, RESTYLE_STYLE_ATTRIBUTE};
|
||||
use style::selector_parser::{RestyleDamage, Snapshot};
|
||||
use style::shared_lock::SharedRwLock as StyleSharedRwLock;
|
||||
use style::str::{HTML_SPACE_CHARACTERS, split_html_space_chars, str_join};
|
||||
|
@ -2355,6 +2355,13 @@ impl Document {
|
|||
entry.hint |= RESTYLE_STYLE_ATTRIBUTE;
|
||||
}
|
||||
|
||||
// FIXME(emilio): This should become something like
|
||||
// element.is_attribute_mapped(attr.local_name()).
|
||||
if attr.local_name() == &local_name!("width") ||
|
||||
attr.local_name() == &local_name!("height") {
|
||||
entry.hint |= RESTYLE_SELF;
|
||||
}
|
||||
|
||||
let mut snapshot = entry.snapshot.as_mut().unwrap();
|
||||
if snapshot.attrs.is_none() {
|
||||
let attrs = el.attrs()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue