New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 731022 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
NOT IN USE
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

documentElement inherits from background color propagated to viewport

Reported by r...@opera.com, Jun 8 2017

Issue description

documentElement should inherit from initial values, not some viewport ComputedStyle which contains properties propagated from html/body.

Propagated values stick. See attached test-case.

 
bg.html
226 bytes View Download

Comment 1 by r...@opera.com, Jun 8 2017

Another effect of this, is that the computed value of background color on the html element becomes the value propagated from body to the viewport. That does not happen in Gecko and, looking at the spec[1], it seems Gecko is right. 

[1] https://drafts.csswg.org/css-backgrounds-3/#body-background

Comment 2 by r...@opera.com, Jun 20 2017

Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/334b4846828ceb697785b466619a1f1b96592a3b

commit 334b4846828ceb697785b466619a1f1b96592a3b
Author: Rune Lillesveen <rune@opera.com>
Date: Wed Jun 28 12:08:58 2017

Separate initial style and viewport/ICB style.

We store the initial containing block/viewport style on the Document
node. This style includes properties propagated from body/html like
writing-mode and overflow. It also sets things like z-index to a non-
auto value to establish a stacking context.

The problem was that this ComputedStyle was used for inheriting values
down to the root element as well, which is incorrect. The root element
should inherit initial values.

Instead, split StyleForDocument into InitialStyleForElement and a
StyleForViewport which applies viewport specific properties on top of
the initial values. Then use InitialStyleForElement as the style to
inherit from for the root element.

A bunch of writing-mode tests are modified to apply writing-mode on the
html element instead of body. The code change aligns with the spec and
how Gecko behaves by not propagating the writing-mode on body to the
html element. The intention of the modified tests was to have the effect
of setting the same writing-mode on the html element.

Bug:  732349 , 541529 , 590818 , 590835 , 731022 
Change-Id: I4ff9c076c54483245db931ede6a2293ef5279cd2
Reviewed-on: https://chromium-review.googlesource.com/548379
Commit-Queue: Rune Lillesveen <rune@opera.com>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#482950}
[delete] https://crrev.com/93846275952fa28f83a4ea318e56c4f494bf7005/third_party/WebKit/LayoutTests/editing/selection/select-delete-in-event-handler-expected.txt
[delete] https://crrev.com/93846275952fa28f83a4ea318e56c4f494bf7005/third_party/WebKit/LayoutTests/editing/selection/select-delete-in-event-handler.html
[add] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/external/wpt/css-cascade/inherit-initial.html
[add] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/external/wpt/css/css-writing-modes-3/wm-propagation-body-computed-root.html
[add] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/backgrounds/root-background-propagation3-expected.html
[add] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/backgrounds/root-background-propagation3.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/block/float/overhanging-float-crashes-when-sibling-becomes-formatting-context.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/block/positioning/vertical-lr/001.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/block/positioning/vertical-rl/001.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/borders/inline-mask-overlay-image-outset-vertical-rl.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/multicol/vertical-lr/float-big-line-expected.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/multicol/vertical-lr/float-big-line.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/multicol/vertical-lr/float-paginate-expected.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/multicol/vertical-lr/float-paginate.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/multicol/vertical-lr/unsplittable-inline-block-expected.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/multicol/vertical-lr/unsplittable-inline-block.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/multicol/vertical-rl/float-big-line-expected.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/multicol/vertical-rl/float-big-line.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/multicol/vertical-rl/float-paginate-expected.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/multicol/vertical-rl/float-paginate.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/multicol/vertical-rl/unsplittable-inline-block-expected.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/multicol/vertical-rl/unsplittable-inline-block.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/replaced/vertical-lr/absolute-position-with-auto-height-and-top-and-bottom.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/replaced/vertical-lr/absolute-position-with-auto-width-and-left-and-right.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/replaced/vertical-rl/absolute-position-with-auto-height-and-top-and-bottom.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/replaced/vertical-rl/absolute-position-with-auto-width-and-left-and-right.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/table/035-vertical.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/table/border-collapsing/003-vertical.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/text/decorations-with-text-combine.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/text/international/text-combine-image-test.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/writing-mode/Kusa-Makura-background-canvas.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/writing-mode/border-image-vertical-lr.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/writing-mode/border-image-vertical-rl.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/writing-mode/border-radius-clipping-vertical-lr.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/writing-mode/border-styles-vertical-lr.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/writing-mode/border-styles-vertical-rl.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/writing-mode/floats-in-block-layout.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fast/writing-mode/self-collapsing-block.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/fonts/mongolian-glyphs.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/paint/invalidation/inline-vertical-lr-overflow-expected.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/paint/invalidation/inline-vertical-lr-overflow.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/paint/invalidation/inline-vertical-rl-overflow-expected.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/paint/invalidation/inline-vertical-rl-overflow.html
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/LayoutTests/paint/invalidation/window-resize-vertical-writing-mode.html
[delete] https://crrev.com/93846275952fa28f83a4ea318e56c4f494bf7005/third_party/WebKit/LayoutTests/platform/linux/editing/selection/select-delete-in-event-handler-expected.txt
[delete] https://crrev.com/93846275952fa28f83a4ea318e56c4f494bf7005/third_party/WebKit/LayoutTests/platform/win/editing/selection/select-delete-in-event-handler-expected.txt
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/Source/core/css/resolver/ElementResolveContext.h
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/Source/core/css/resolver/StyleResolver.h
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/334b4846828ceb697785b466619a1f1b96592a3b/third_party/WebKit/Source/web/tests/data/rtl-iframe-inner.html

Comment 4 by r...@opera.com, Jun 28 2017

Status: Fixed (was: Started)

Sign in to add a comment