Closed Bug 1344314 Opened 9 years ago Closed 8 years ago

stylo: Setup for pref checks is broken for aliases

Categories

(Core :: CSS Parsing and Computation, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox54 --- affected
firefox57 --- fixed

People

(Reporter: bzbarsky, Assigned: canova)

References

Details

Attachments

(1 file, 1 obsolete file)

Testcase: <div style="width: 100px; height: 100px; background: green; transform: rotate(45deg); -moz-transform-origin: 0 0"></div> Load that in stylo and Gecko, with "layout.css.prefixes.transforms" set to false. stylo still applies the -moz-transform-origin.
Priority: -- → P2
Assignee: nobody → mbrubeck
Priority: P2 → P1
Matt, unless you already have patches, I'm going to throw this back in the pile. I think bug 1349651 and others are more urgent.
Assignee: mbrubeck → nobody
Priority: P1 → P2
Priority: P2 → --
Priority: -- → P2
Assignee: nobody → canaltinova
Status: NEW → ASSIGNED
Comment on attachment 8896670 [details] Bug 1344314 - stylo: Add an aliasid field to CSS_PROP_ALIAS macro and include them to bindings https://reviewboard.mozilla.org/r/167976/#review174266
Attachment #8896670 - Flags: review?(manishearth) → review+
Comment on attachment 8896671 [details] Bug 1344314 - stylo: Add a pref checking mechanism for alias properties https://reviewboard.mozilla.org/r/167978/#review174270
Attachment #8896671 - Flags: review?(manishearth) → review+
Comment on attachment 8896671 [details] Bug 1344314 - stylo: Add a pref checking mechanism for alias properties https://reviewboard.mozilla.org/r/167978/#review174362 r=me with nits below addressed. ::: servo/components/style/properties/properties.mako.rs:1012 (Diff revision 5) > > impl PropertyId { > /// Returns a given property from the string `s`. > /// > /// Returns Err(()) for unknown non-custom properties > - pub fn parse(property_name: &str) -> Result<Self, ()> { > + pub fn parse(property_name: &str, context: Option< &PropertyParserContext>) -> Result<Self, ()> { Please mention in the doc that `None` would be treated as style rule context in author sheet by default. ::: servo/components/style/properties/properties.mako.rs:1270 (Diff revision 5) > + pub rule_type: CssRuleType, > +} > + > +impl PropertyParserContext { > + /// Creates a PropertyParserContext with given stylesheet origin and rule type. > + pub fn new(stylesheet_origin: Origin, rule_type: CssRuleType) -> Self { It is probably easier to use if it just takes a `ParserContext`. It seems the same pattern is used in different places. ::: servo/components/style/properties/properties.mako.rs:1278 (Diff revision 5) > +impl Default for PropertyParserContext { > + fn default() -> Self { > + Self { > + stylesheet_origin: Origin::Author, > + rule_type: CssRuleType::Style, > + } > + } > +} If it is only used once... this probably doesn't need to exist at all.
Attachment #8896671 - Flags: review?(xidorn+moz) → review+
Attachment #8896671 - Attachment is obsolete: true
Pushed by canaltinova@gmail.com: https://hg.mozilla.org/integration/autoland/rev/6f84b7bbf5d8 stylo: Add an aliasid field to CSS_PROP_ALIAS macro and include them to bindings r=manishearth
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: