Closed Bug 1127112 Opened 7 years ago Closed 6 years ago

offset and margin logical properties should resolve against parent's writing mode information

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: heycam, Assigned: heycam)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

http://dev.w3.org/csswg/css-logical-props/#logical-prop says that the offset-* and margin-* logical properties are resolved to physical properties using the parent element's writing-mode, direction and text-orientation properties, but we are resolving them against the current element's writing mode properties.
Blocks: writing-mode
Attached patch WIP v0.1Splinter Review
David, how should I be interpreting "parent element" in the spec?  From within nsCSS{Compressed,Expanded}DataBlock::MapRuleInfoInto we don't know what element we are resolving style for.  If "parent element" is to be interpreted literally, then using the parent style context seems wrong for cases where we don't have a 1:1 mapping of element to style context or if we are computing style for a pseudo-element.  Should I instead squint and assume it means "parent box"?
Assignee: nobody → cam
Status: NEW → ASSIGNED
Flags: needinfo?(dbaron)
I'm curious too whether any of our existing use of logical margin properties in chrome will break.  Pushed a try run (which will at least fail on test_logical_properties.html until I fix that): https://treeherder.mozilla.org/#/jobs?repo=try&revision=39db26bf003a
You should assume that it means the thing we have the parent style context set to; we set the parent style context much more carefully than the spec says anything about "parent".
Flags: needinfo?(dbaron)
Given the response in this thread https://lists.w3.org/Archives/Public/www-style/2015Jan/thread.html#msg576 I'm not going to make this change for now.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.