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 "core/animation/css/CSSPropertyEquality.h" | 5 #include "core/css/CSSPropertyEquality.h" |
6 | 6 |
7 #include "core/animation/css/CSSAnimations.h" | 7 #include "core/style/ComputedStyle.h" |
8 #include "core/style/DataEquivalency.h" | 8 #include "core/style/DataEquivalency.h" |
9 #include "core/style/ComputedStyle.h" | |
10 #include "core/style/ShadowList.h" | 9 #include "core/style/ShadowList.h" |
11 | 10 |
| 11 // TODO(ikilpatrick): generate this file. |
| 12 |
12 namespace blink { | 13 namespace blink { |
13 | 14 |
14 namespace { | 15 namespace { |
15 | 16 |
16 template <CSSPropertyID property> | 17 template <CSSPropertyID property> |
17 bool fillLayersEqual(const FillLayer& aLayers, const FillLayer& bLayers) | 18 bool fillLayersEqual(const FillLayer& aLayers, const FillLayer& bLayers) |
18 { | 19 { |
19 const FillLayer* aLayer = &aLayers; | 20 const FillLayer* aLayer = &aLayers; |
20 const FillLayer* bLayer = &bLayers; | 21 const FillLayer* bLayer = &bLayers; |
21 while (aLayer && bLayer) { | 22 while (aLayer && bLayer) { |
(...skipping 11 matching lines...) Expand all Loading... |
33 case CSSPropertyBackgroundSize: | 34 case CSSPropertyBackgroundSize: |
34 case CSSPropertyWebkitMaskSize: | 35 case CSSPropertyWebkitMaskSize: |
35 if (!(aLayer->sizeLength() == bLayer->sizeLength())) | 36 if (!(aLayer->sizeLength() == bLayer->sizeLength())) |
36 return false; | 37 return false; |
37 break; | 38 break; |
38 case CSSPropertyBackgroundImage: | 39 case CSSPropertyBackgroundImage: |
39 if (!dataEquivalent(aLayer->image(), bLayer->image())) | 40 if (!dataEquivalent(aLayer->image(), bLayer->image())) |
40 return false; | 41 return false; |
41 break; | 42 break; |
42 default: | 43 default: |
43 ASSERT_NOT_REACHED(); | 44 NOTREACHED(); |
44 return true; | 45 return true; |
45 } | 46 } |
46 | 47 |
47 aLayer = aLayer->next(); | 48 aLayer = aLayer->next(); |
48 bLayer = bLayer->next(); | 49 bLayer = bLayer->next(); |
49 } | 50 } |
50 | 51 |
51 // FIXME: Shouldn't this be return !aLayer && !bLayer; ? | 52 // FIXME: Shouldn't this be return !aLayer && !bLayer; ? |
52 return true; | 53 return true; |
53 } | 54 } |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 return a.svgStyle().y() == b.svgStyle().y(); | 326 return a.svgStyle().y() == b.svgStyle().y(); |
326 case CSSPropertyR: | 327 case CSSPropertyR: |
327 return a.svgStyle().r() == b.svgStyle().r(); | 328 return a.svgStyle().r() == b.svgStyle().r(); |
328 case CSSPropertyRx: | 329 case CSSPropertyRx: |
329 return a.svgStyle().rx() == b.svgStyle().rx(); | 330 return a.svgStyle().rx() == b.svgStyle().rx(); |
330 case CSSPropertyRy: | 331 case CSSPropertyRy: |
331 return a.svgStyle().ry() == b.svgStyle().ry(); | 332 return a.svgStyle().ry() == b.svgStyle().ry(); |
332 case CSSPropertyZIndex: | 333 case CSSPropertyZIndex: |
333 return a.hasAutoZIndex() == b.hasAutoZIndex() && (a.hasAutoZIndex() || a
.zIndex() == b.zIndex()); | 334 return a.hasAutoZIndex() == b.hasAutoZIndex() && (a.hasAutoZIndex() || a
.zIndex() == b.zIndex()); |
334 default: | 335 default: |
335 ASSERT_NOT_REACHED(); | 336 NOTREACHED(); |
336 return true; | 337 return true; |
337 } | 338 } |
338 } | 339 } |
339 | 340 |
340 } // namespace blink | 341 } // namespace blink |
OLD | NEW |