Bug 1454830 part 3 - Add CAN_ANIMATE_ON_COMPOSITOR in Servo side and propagate it to ServoCSSPropList.h. r=emilio

MozReview-Commit-ID: 2OBCliDY02g

--HG--
extra : rebase_source : 0b292c07ef89c472cfeb7834df83a574641a4c18
This commit is contained in:
Xidorn Quan 2018-04-20 20:32:57 +10:00
Родитель 3f0e7b7d9e
Коммит abfdb524a5
5 изменённых файлов: 18 добавлений и 9 удалений

Просмотреть файл

@ -39,6 +39,8 @@ def flags(prop):
result.append("CSS_PROPERTY_PARSE_INACCESSIBLE")
if "GETCS_NEEDS_LAYOUT_FLUSH" in prop.flags:
result.append("CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH")
if "CAN_ANIMATE_ON_COMPOSITOR" in prop.flags:
result.append("CSS_PROPERTY_CAN_ANIMATE_ON_COMPOSITOR")
return ", ".join('"{}"'.format(flag) for flag in result)
def pref(prop):

Просмотреть файл

@ -185,7 +185,8 @@ CheckServoCSSPropList()
const uint32_t kServoFlags =
CSS_PROPERTY_ENABLED_MASK | CSS_PROPERTY_INTERNAL |
CSS_PROPERTY_PARSE_INACCESSIBLE | CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH;
CSS_PROPERTY_PARSE_INACCESSIBLE | CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
CSS_PROPERTY_CAN_ANIMATE_ON_COMPOSITOR;
bool mismatch = false;
for (size_t i = 0; i < eCSSProperty_COUNT_with_aliases; i++) {
auto& geckoData = sGeckoProps[i];

Просмотреть файл

@ -410,7 +410,8 @@ ${helpers.predefined_type(
extra_prefixes=transform_extra_prefixes,
animation_value_type="ComputedValue",
gecko_ffi_name="mSpecifiedTransform",
flags="CREATES_STACKING_CONTEXT FIXPOS_CB GETCS_NEEDS_LAYOUT_FLUSH",
flags="CREATES_STACKING_CONTEXT FIXPOS_CB \
GETCS_NEEDS_LAYOUT_FLUSH CAN_ANIMATE_ON_COMPOSITOR",
spec="https://drafts.csswg.org/css-transforms/#propdef-transform",
servo_restyle_damage="reflow_out_of_flow"
)}

Просмотреть файл

@ -7,13 +7,16 @@
// Box-shadow, etc.
<% data.new_style_struct("Effects", inherited=False) %>
${helpers.predefined_type("opacity",
"Opacity",
"1.0",
animation_value_type="ComputedValue",
flags="CREATES_STACKING_CONTEXT APPLIES_TO_PLACEHOLDER",
spec="https://drafts.csswg.org/css-color/#opacity",
servo_restyle_damage = "reflow_out_of_flow")}
${helpers.predefined_type(
"opacity",
"Opacity",
"1.0",
animation_value_type="ComputedValue",
flags="CREATES_STACKING_CONTEXT APPLIES_TO_PLACEHOLDER \
CAN_ANIMATE_ON_COMPOSITOR",
spec="https://drafts.csswg.org/css-color/#opacity",
servo_restyle_damage = "reflow_out_of_flow"
)}
${helpers.predefined_type(
"box-shadow",

Просмотреть файл

@ -788,6 +788,8 @@ bitflags! {
/// This property's getComputedStyle implementation requires layout
/// to be flushed.
const GETCS_NEEDS_LAYOUT_FLUSH = 0;
/// This property can be animated on the compositor.
const CAN_ANIMATE_ON_COMPOSITOR = 0;
}
}