mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
layout_thread: Don't parse internal properties in paint registration code.
This commit is contained in:
parent
274bc4df3e
commit
97d8f6b09e
1 changed files with 7 additions and 5 deletions
|
@ -757,14 +757,16 @@ impl LayoutThread {
|
|||
Msg::RegisterPaint(name, mut properties, painter) => {
|
||||
debug!("Registering the painter");
|
||||
let properties = properties.drain(..)
|
||||
.filter_map(|name| PropertyId::parse(&*name)
|
||||
.ok().map(|id| (name.clone(), id)))
|
||||
.filter(|&(_, ref id)| id.as_shorthand().is_err())
|
||||
.filter_map(|name| {
|
||||
let id = PropertyId::parse_enabled_for_all_content(&*name).ok()?;
|
||||
Some((name.clone(), id))
|
||||
})
|
||||
.filter(|&(_, ref id)| !id.is_shorthand())
|
||||
.collect();
|
||||
let registered_painter = RegisteredPainterImpl {
|
||||
name: name.clone(),
|
||||
properties: properties,
|
||||
painter: painter,
|
||||
properties,
|
||||
painter,
|
||||
};
|
||||
self.registered_painters.0.insert(name, registered_painter);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue