New issue
Advanced search Search tips

Issue 793773 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

CSS background is not evaluated completely after class change

Reported by satef...@gmail.com, Dec 11 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0

Example URL:
https://jsfiddle.net/bz64dqkh/1/

Steps to reproduce the problem:
1. Create a class A with css property `background: none center no-repeat, linear-gradient(#fff, #000);`
2. Create a class B with css property `background: none center no-repeat, linear-gradient(#000, #fff);`
3. Toggle between class A and class B on one element

What is the expected behavior?
The one element with toggling classes should have a toggling background linear-gradient

What went wrong?
Background stays the same

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: Version 63.0.3239.84 (Offizieller Build) (64-Bit)  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

Fiddle with problem: https://jsfiddle.net/bz64dqkh/1/

In internet explorer 11 and firefox 57 everything is as expected. In Chrome 60 and prior it worked as well (could be that Chrome60 is broken as well, but it worked for over 3 years now), but around Chrome 61-62 it stopped working correctly.
 
bug.html
1.3 KB View Download

Comment 1 by f...@opera.com, Dec 11 2017

Components: Blink>CSS
Labels: -Type-Compat OS-Android OS-Linux OS-Mac Type-Bug-Regression
Owner: futhark@chromium.org
Status: Assigned (was: Unconfirmed)
Bisected to https://chromium.googlesource.com/chromium/src/+log/6c0e76236671f219294dcb5330590de58f79d396..1a519367e5550cd606e4ec78bda5d0f971d94cae

suspecting: 1a519367e5550cd606e4ec78bda5d0f971d94cae ("Only need to repaint background for color changes with no image.")

Not using 'none' as the first "image" works around the issue.
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 12 2017

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

commit c34e49dbb593ee21366901e1d6b47dc8123974a4
Author: Rune Lillesveen <futhark@chromium.org>
Date: Tue Dec 12 12:29:23 2017

FillLayer::VisuallyEqual incorrect comparison when first layer is none.

Even if the first background layer has none for image, we may have
subsequent layers with images. The previous implementation did an early
exit if both images in the first layer were null.

Implement VisuallyEqual without using operator== to fix this issue for
all layers without missing the optimization that different background
positions do not trigger a repaint if the background image for the layer
is none.

Bug:  793773 
Change-Id: I846c75b2c4c273bcebecdf84685d834d946926b1
Reviewed-on: https://chromium-review.googlesource.com/822074
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#523412}
[add] https://crrev.com/c34e49dbb593ee21366901e1d6b47dc8123974a4/third_party/WebKit/LayoutTests/external/wpt/css/css-backgrounds/background-image-none-gradient-repaint.html
[modify] https://crrev.com/c34e49dbb593ee21366901e1d6b47dc8123974a4/third_party/WebKit/Source/core/style/FillLayer.cpp
[modify] https://crrev.com/c34e49dbb593ee21366901e1d6b47dc8123974a4/third_party/WebKit/Source/core/style/FillLayer.h

Status: Fixed (was: Started)

Sign in to add a comment