Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1782)

Unified Diff: Source/core/rendering/RenderTheme.cpp

Issue 14776012: Exclude background-repeat from comprasion when styling the controls. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Exclude background-repeat from comprasion when styling the controls. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/forms/background-repeat-no-repeat-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTheme.cpp
diff --git a/Source/core/rendering/RenderTheme.cpp b/Source/core/rendering/RenderTheme.cpp
index ea5d3389a21eb85b43fb581e9b02d9874ec34a74..de7c840ca9cfafb8d39143243fb474269ebc2403 100644
--- a/Source/core/rendering/RenderTheme.cpp
+++ b/Source/core/rendering/RenderTheme.cpp
@@ -646,9 +646,16 @@ bool RenderTheme::isControlContainer(ControlPart appearance) const
static bool isBackgroundOrBorderStyled(const RenderStyle& style, const BorderData& border, const FillLayer& background, const Color& backgroundColor)
{
+ // Code below excludes the background-repeat from comparison by resetting it
+ FillLayer backgroundCopy = background;
+ FillLayer backgroundLayersCopy = *style.backgroundLayers();
+ backgroundCopy.setRepeatX(NoRepeatFill);
+ backgroundCopy.setRepeatY(NoRepeatFill);
+ backgroundLayersCopy.setRepeatX(NoRepeatFill);
+ backgroundLayersCopy.setRepeatY(NoRepeatFill);
// Test the style to see if the UA border and background match.
return style.border() != border
- || *style.backgroundLayers() != background
+ || backgroundLayersCopy != backgroundCopy
|| style.visitedDependentColor(CSSPropertyBackgroundColor) != backgroundColor;
}
« no previous file with comments | « LayoutTests/fast/forms/background-repeat-no-repeat-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698