mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Cascade: skip duplicated properties before rather than after a virtual call.
This commit is contained in:
parent
0b4877590f
commit
86562992da
4 changed files with 31 additions and 36 deletions
|
@ -245,7 +245,6 @@
|
|||
inherited_style: &ComputedValues,
|
||||
default_style: &Arc<ComputedValues>,
|
||||
context: &mut computed::Context,
|
||||
seen: &mut PropertyBitField,
|
||||
cacheable: &mut bool,
|
||||
cascade_info: &mut Option<<&mut CascadeInfo>,
|
||||
error_reporter: &mut StdBox<ParseErrorReporter + Send>) {
|
||||
|
@ -256,16 +255,7 @@
|
|||
_ => panic!("entered the wrong cascade_property() implementation"),
|
||||
};
|
||||
|
||||
% if property.logical:
|
||||
let wm = context.style.writing_mode;
|
||||
% endif
|
||||
<% maybe_wm = "wm" if property.logical else "" %>
|
||||
<% maybe_physical = "_physical" if property.logical else "" %>
|
||||
% if not property.derived_from:
|
||||
if seen.get${maybe_physical}_${property.ident}(${maybe_wm}) {
|
||||
return
|
||||
}
|
||||
seen.set${maybe_physical}_${property.ident}(${maybe_wm});
|
||||
{
|
||||
let custom_props = context.style().custom_properties();
|
||||
::properties::substitute_variables_${property.ident}(
|
||||
|
@ -275,6 +265,9 @@
|
|||
cascade_info.on_cascade_property(&declaration,
|
||||
&value);
|
||||
}
|
||||
% if property.logical:
|
||||
let wm = context.style.writing_mode;
|
||||
% endif
|
||||
<% maybe_wm = ", wm" if property.logical else "" %>
|
||||
match *value {
|
||||
DeclaredValue::Value(ref specified_value) => {
|
||||
|
@ -321,7 +314,6 @@
|
|||
cascade_property_custom(declaration,
|
||||
inherited_style,
|
||||
context,
|
||||
seen,
|
||||
cacheable,
|
||||
error_reporter);
|
||||
% endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue