CSS background is not evaluated completely after class change
Reported by
satef...@gmail.com,
Dec 11 2017
|
|||
Issue descriptionUserAgent: 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.
,
Dec 11 2017
,
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
,
Dec 12 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by f...@opera.com
, Dec 11 2017Labels: -Type-Compat OS-Android OS-Linux OS-Mac Type-Bug-Regression
Owner: futhark@chromium.org
Status: Assigned (was: Unconfirmed)