Closed Bug 1588038 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 19637 - Propagate writing-mode and direction from body to html.

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 19637 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/19637
Details from upstream follow.

Rune Lillesveen <futhark@chromium.org> wrote:

Propagate writing-mode and direction from body to html.

Direction and writing-mode is propagated from body to the viewport, but
when the computed value of those properties are different between the
root and body elements, their used values are the computed values of the
body element. The computed values are not affected by this.

We implement this propagation by using a ComputedStyle on the
HTMLHtmlElement's LayoutObject which has the propagated values for
direction and writing-mode.

The modified tests relied on direction on #container being different
from the #container parent. That is no longer possible with body being
container and the used direction value of body propagated to html.
The tests were modified to use a child of body as container instead,
the removed 8px margin was just replicating the body margin and we do
not want that on the #container div.

Spec: https://drafts.csswg.org/css-writing-modes-3/#principal-flow

TEST=external/wpt/css/css-writing-modes/wm-propagation-002.html
TEST=external/wpt/css/css-writing-modes/wm-propagation-body-033.html
TEST=external/wpt/css/css-writing-modes/wm-propagation-body-037.html

Bug: 988585
Change-Id: I2879c8fdc082940d2baaf67e126b28915f9f1eca

Reviewed-on: https://chromium-review.googlesource.com/1852786
WPT-Export-Revision: 45b9b3abf8ac80036e21bf605dbc1b3df18f0de5

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/25089fc0275d [wpt PR 19637] - Propagate writing-mode and direction from body to html., a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.