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

Issue 590818 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
NOT IN USE
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 590835



Sign in to add a comment

z-index incorrectly inherited from documentStyle

Reported by r...@opera.com, Feb 29 2016

Issue description

At least, this renders differently in Blink and Gecko:

<!DOCTYPE html>
<style>
* { z-index: inherit; position: relative }
div { width: 100px; height: 100px; }
</style>
<p>You should see a green square and no FAIL</p>
<div style="background: green">
    <div style="z-index: -1">FAIL</div>
</div>


If you add "body { z-index: auto }", it works as expected in Blink.

 
Components: -Blink>Layout
Labels: -Pri-3 Hotlist-Interop Pri-2
We should confirm whether this is a CSS issue and assign to layout if it's not.

Comment 2 by r...@opera.com, May 4 2016

Yes, this is Blink>CSS. We incorrectly inherit from StyleResolver::styleForDocument() into the document root element.

Comment 3 by nainar@chromium.org, Feb 13 2017

Labels: Update-Quarterly

Comment 4 by meade@chromium.org, Feb 13 2017

Blockedon: 590835

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

Owner: r...@opera.com
Status: Started (was: Available)
Project Member

Comment 6 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 7 by r...@opera.com, Jun 28 2017

Status: Fixed (was: Started)

Sign in to add a comment