| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/animation/css/CSSPropertyEquality.h" | 6 #include "core/animation/css/CSSPropertyEquality.h" |
| 7 | 7 |
| 8 #include "core/animation/css/CSSAnimations.h" | 8 #include "core/animation/css/CSSAnimations.h" |
| 9 #include "core/rendering/style/DataEquivalency.h" | 9 #include "core/rendering/style/DataEquivalency.h" |
| 10 #include "core/rendering/style/RenderStyle.h" | 10 #include "core/rendering/style/RenderStyle.h" |
| 11 #include "core/rendering/style/ShadowList.h" | 11 #include "core/rendering/style/ShadowList.h" |
| 12 | 12 |
| 13 namespace WebCore { | 13 namespace WebCore { |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 template <CSSPropertyID property> | 17 template <CSSPropertyID property> |
| 18 bool fillLayersEqual(const FillLayer* aLayer, const FillLayer* bLayer) | 18 bool fillLayersEqual(const FillLayer& aLayers, const FillLayer& bLayers) |
| 19 { | 19 { |
| 20 if (aLayer == bLayer) | 20 const FillLayer* aLayer = &aLayers; |
| 21 return true; | 21 const FillLayer* bLayer = &bLayers; |
| 22 if (!aLayer || !bLayer) | |
| 23 return false; | |
| 24 while (aLayer && bLayer) { | 22 while (aLayer && bLayer) { |
| 25 switch (property) { | 23 switch (property) { |
| 26 case CSSPropertyBackgroundPositionX: | 24 case CSSPropertyBackgroundPositionX: |
| 27 case CSSPropertyWebkitMaskPositionX: | 25 case CSSPropertyWebkitMaskPositionX: |
| 28 if (aLayer->xPosition() != bLayer->xPosition()) | 26 if (aLayer->xPosition() != bLayer->xPosition()) |
| 29 return false; | 27 return false; |
| 30 break; | 28 break; |
| 31 case CSSPropertyBackgroundPositionY: | 29 case CSSPropertyBackgroundPositionY: |
| 32 case CSSPropertyWebkitMaskPositionY: | 30 case CSSPropertyWebkitMaskPositionY: |
| 33 if (aLayer->yPosition() != bLayer->yPosition()) | 31 if (aLayer->yPosition() != bLayer->yPosition()) |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 return a.zIndex() == b.zIndex(); | 307 return a.zIndex() == b.zIndex(); |
| 310 case CSSPropertyZoom: | 308 case CSSPropertyZoom: |
| 311 return a.zoom() == b.zoom(); | 309 return a.zoom() == b.zoom(); |
| 312 default: | 310 default: |
| 313 ASSERT_NOT_REACHED(); | 311 ASSERT_NOT_REACHED(); |
| 314 return true; | 312 return true; |
| 315 } | 313 } |
| 316 } | 314 } |
| 317 | 315 |
| 318 } | 316 } |
| OLD | NEW |