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

Unified Diff: Source/core/animation/css/CSSPropertyEquality.cpp

Issue 381473002: Use reference for FillLayer if possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
Index: Source/core/animation/css/CSSPropertyEquality.cpp
diff --git a/Source/core/animation/css/CSSPropertyEquality.cpp b/Source/core/animation/css/CSSPropertyEquality.cpp
index 1c63d3f21e203c51e39373f61ef40a6a1208c6c3..8478e18afdc7f4753fad2a89349bfca5e7fc4416 100644
--- a/Source/core/animation/css/CSSPropertyEquality.cpp
+++ b/Source/core/animation/css/CSSPropertyEquality.cpp
@@ -15,12 +15,10 @@ namespace WebCore {
namespace {
template <CSSPropertyID property>
-bool fillLayersEqual(const FillLayer* aLayer, const FillLayer* bLayer)
+bool fillLayersEqual(const FillLayer& aLayers, const FillLayer& bLayers)
{
- if (aLayer == bLayer)
- return true;
- if (!aLayer || !bLayer)
- return false;
+ const FillLayer* aLayer = &aLayers;
+ const FillLayer* bLayer = &bLayers;
while (aLayer && bLayer) {
switch (property) {
case CSSPropertyBackgroundPositionX:
« no previous file with comments | « Source/core/animation/css/CSSAnimatableValueFactory.cpp ('k') | Source/core/css/CSSComputedStyleDeclaration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698