New issue
Advanced search Search tips

Issue 819119 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

The 2-value syntax of the `background-position` CSS property is not correctly inherited

Reported by zalawa.x...@gmail.com, Mar 6 2018

Issue description

Chrome Version 64.0.3282.186 (Build officiel) (64 bits)
Other browsers tested:
  Chrome Version 67.0.3362.0 (Build officiel) canary (64 bits): FAIL
  Safari 11.0.3 (12604.5.6.1.1): FAIL
  Firefox 58.0.2 (64 bits): OK
  IE 11.248.16299.0: OK
  Edge 41.16299.248.0 - EdgeHTML 16.16299: OK

What steps will reproduce the problem?
1. Nest two depths of `div` HTML element.
2. Apply a `background` CSS property with an image and a 2-value syntax `background-position` (e.g.: `top .6875em right 40px`) on the first one.
3. Apply `background: inherit` on the second one.

What is the expected result?
The background images of the two nested `div` HTML element should be superimposed.

What happens instead?
The background image of the first `div` HTML element is correctly drawn but the second one fails. 
Instead of the background image of the second `div` HTML element is drawn at the same position as its parent: `top .6875em right 40px`, it is drawn at: `.6875em 40px`.

https://codepen.io/7studio/pen/QQRBOr

 
background-position-2-value-syntax.html
610 bytes View Download
background-position-2-value-syntax.jpg
340 KB View Download
Components: Blink>CSS
Labels: Needs-Triage-M64

Comment 3 by e...@chromium.org, Mar 7 2018

Status: Available (was: Unconfirmed)
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 15 2018

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

commit 141b23e55c08725252179ff3e03d0f702e8a2023
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Thu Mar 15 05:22:36 2018

SetBackground{X/Y}Origin after BackgroundPosition{X/Y}::ApplyInherit SetPosition{X/Y}

BackgroundPosition{X/Y}::ApplyInherit only SetPosition{X/Y}(),
Background{X/Y}Origin are not set. We should make them set.

Bug:  819119 

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: Ic7d37e95c5cb91f4d613f0455d0ed7e7e8e16a24
Reviewed-on: https://chromium-review.googlesource.com/961765
Reviewed-by: Alan Cutter <alancutter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543307}
[modify] https://crrev.com/141b23e55c08725252179ff3e03d0f702e8a2023/third_party/WebKit/LayoutTests/fast/css/background-position-inherit-expected.txt
[modify] https://crrev.com/141b23e55c08725252179ff3e03d0f702e8a2023/third_party/WebKit/LayoutTests/fast/css/background-position-inherit.html
[modify] https://crrev.com/141b23e55c08725252179ff3e03d0f702e8a2023/third_party/WebKit/Source/build/scripts/core/css/properties/templates/CSSPropertySubclass.cpp.tmpl

Owner: zhuoyu.q...@samsung.com
Status: Fixed (was: Available)

Sign in to add a comment