Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate writing-mode and direction from body to html. #19637

Merged
merged 1 commit into from Oct 11, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Oct 11, 2019

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/c/chromium/src/+/1852786
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705218}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1852786 branch 3 times, most recently from 4f8a30c to 7bed3ad Compare October 11, 2019 17:49
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/c/chromium/src/+/1852786
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705218}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants