Closed Bug 1116638 Opened 7 years ago Closed 3 years ago
expose logical property values on computed style objects
46 bytes, text/x-phabricator-request
|Details | Review|
It probably makes sense to expose logical properties on computed style objects with values according to the direction/text-orientation/writing-mode on the same object. http://lists.w3.org/Archives/Public/www-style/2014Dec/0385.html
When we do this, we should be able to remove logical_box_prop_get_computed from property_database.js. This should have the happy side effect of testing the presence of CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH on any logical properties that need it.
See Also: → https://github.com/w3c/csswg-drafts/issues/384
According to https://lists.w3.org/Archives/Public/www-style/2017Jun/0012.html the CSSWG resolved to do this.
Igalia is working on implementing logical properties on Blink, and is adding tests for this in https://github.com/web-platform-tests/wpt/pull/11324. This is still not terribly urgent, but maybe Nazim or some of the other folks that are getting started with style / layout may want to get familiar with nsComputedDOMStyle and poke at this?
I can work on that but I have some other things on my plate right now. If someone else wants to work, please take it :) I'll work on it if it's not taken by then.
The WPTs came in today, so i have some passes to update: https://treeherder.mozilla.org/#/jobs?repo=try&revision=a239101cb4a482064882ba1f39a9c97759119673
Comment on attachment 8988472 [details] Bug 1116638: Expose logical props in computed style. r=xidorn Xidorn Quan [:xidorn] UTC+10 (less responsive until July 7) has approved the revision. https://phabricator.services.mozilla.com/D1862
Attachment #8988472 - Flags: review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/90de187124a9 Expose logical props in computed style. r=xidorn
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/a192866f4936 Update more expectations for new tests added. r=me
I guess it's worth a intent to ship as well.
Good point, just did :)
For clarity: does this affect web developers in a meaningful way? Does it make a web-exposed API behave differently (even if by fixing an error in its results)? I can't easily tell from the bug or the code without a deeper dive than the usual quick flip through I try to stick to while deciding if bugs should be added to the docs schedule.
Yes, getComputedStyle(element).getPropertyValue('margin-block-start') didn't use to work before this patch, for example.
You need to log in before you can comment on or make changes to this bug.