We do a comparison of computed style for background properties in FillLayer and trigger a repaint if they differ. We don't need to do that if there are no background images present.
https://chromium-review.googlesource.com/c/612089
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1a519367e5550cd606e4ec78bda5d0f971d94cae commit 1a519367e5550cd606e4ec78bda5d0f971d94cae Author: Rune Lillesveen <rune@opera.com> Date: Wed Aug 16 09:48:56 2017 Only need to repaint background for color changes with no image. Implement a VisuallyEqual for backgrounds because computed style comparison would trigger unnecessary repaints when background image related properties changed when there were no images. Bug: 754685 Change-Id: I4c687426905e9687b298549b3015ac1207dbbc17 Reviewed-on: https://chromium-review.googlesource.com/612089 Reviewed-by: meade_UTC10 <meade@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Commit-Queue: Rune Lillesveen <rune@opera.com> Cr-Commit-Position: refs/heads/master@{#494738} [add] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/LayoutTests/external/wpt/css-backgrounds/background-clip-color-ref.html [add] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/LayoutTests/external/wpt/css-backgrounds/background-clip-color-repaint-ref.html [add] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/LayoutTests/external/wpt/css-backgrounds/background-clip-color-repaint.html [add] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/LayoutTests/external/wpt/css-backgrounds/background-clip-color.html [add] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/LayoutTests/paint/invalidation/background-position-no-image-expected.txt [add] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/LayoutTests/paint/invalidation/background-position-no-image.html [modify] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/Source/core/style/ComputedStyle.cpp [modify] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/Source/core/style/ComputedStyle.h [modify] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/Source/core/style/FillLayer.cpp [modify] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/Source/core/style/FillLayer.h
Comment 1 by r...@opera.com
, Aug 11 2017