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" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 case CSSPropertyBoxShadow: | 115 case CSSPropertyBoxShadow: |
116 return dataEquivalent(a.boxShadow(), b.boxShadow()); | 116 return dataEquivalent(a.boxShadow(), b.boxShadow()); |
117 case CSSPropertyClip: | 117 case CSSPropertyClip: |
118 return a.clip() == b.clip(); | 118 return a.clip() == b.clip(); |
119 case CSSPropertyColor: | 119 case CSSPropertyColor: |
120 return a.color() == b.color() && a.visitedLinkColor() == b.visitedLinkCo
lor(); | 120 return a.color() == b.color() && a.visitedLinkColor() == b.visitedLinkCo
lor(); |
121 case CSSPropertyFill: { | 121 case CSSPropertyFill: { |
122 const SVGRenderStyle& aSVG = *a.svgStyle(); | 122 const SVGRenderStyle& aSVG = *a.svgStyle(); |
123 const SVGRenderStyle& bSVG = *b.svgStyle(); | 123 const SVGRenderStyle& bSVG = *b.svgStyle(); |
124 return aSVG.fillPaintType() == bSVG.fillPaintType() | 124 return aSVG.fillPaintType() == bSVG.fillPaintType() |
125 && (aSVG.fillPaintType() != SVGPaint::SVG_PAINTTYPE_RGBCOLOR || aSVG
.fillPaintColor() == bSVG.fillPaintColor()) | 125 && (aSVG.fillPaintType() != SVG_PAINTTYPE_RGBCOLOR || aSVG.fillPaint
Color() == bSVG.fillPaintColor()) |
126 && aSVG.visitedLinkFillPaintType() == bSVG.visitedLinkFillPaintType(
) | 126 && aSVG.visitedLinkFillPaintType() == bSVG.visitedLinkFillPaintType(
) |
127 && (aSVG.visitedLinkFillPaintType() != SVGPaint::SVG_PAINTTYPE_RGBCO
LOR || aSVG.visitedLinkFillPaintColor() == bSVG.visitedLinkFillPaintColor()); | 127 && (aSVG.visitedLinkFillPaintType() != SVG_PAINTTYPE_RGBCOLOR || aSV
G.visitedLinkFillPaintColor() == bSVG.visitedLinkFillPaintColor()); |
128 } | 128 } |
129 case CSSPropertyFillOpacity: | 129 case CSSPropertyFillOpacity: |
130 return a.fillOpacity() == b.fillOpacity(); | 130 return a.fillOpacity() == b.fillOpacity(); |
131 case CSSPropertyFlexBasis: | 131 case CSSPropertyFlexBasis: |
132 return a.flexBasis() == b.flexBasis(); | 132 return a.flexBasis() == b.flexBasis(); |
133 case CSSPropertyFlexGrow: | 133 case CSSPropertyFlexGrow: |
134 return a.flexGrow() == b.flexGrow(); | 134 return a.flexGrow() == b.flexGrow(); |
135 case CSSPropertyFlexShrink: | 135 case CSSPropertyFlexShrink: |
136 return a.flexShrink() == b.flexShrink(); | 136 return a.flexShrink() == b.flexShrink(); |
137 case CSSPropertyFloodColor: | 137 case CSSPropertyFloodColor: |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 case CSSPropertyShapeOutside: | 204 case CSSPropertyShapeOutside: |
205 return dataEquivalent(a.shapeOutside(), b.shapeOutside()); | 205 return dataEquivalent(a.shapeOutside(), b.shapeOutside()); |
206 case CSSPropertyStopColor: | 206 case CSSPropertyStopColor: |
207 return a.stopColor() == b.stopColor(); | 207 return a.stopColor() == b.stopColor(); |
208 case CSSPropertyStopOpacity: | 208 case CSSPropertyStopOpacity: |
209 return a.stopOpacity() == b.stopOpacity(); | 209 return a.stopOpacity() == b.stopOpacity(); |
210 case CSSPropertyStroke: { | 210 case CSSPropertyStroke: { |
211 const SVGRenderStyle& aSVG = *a.svgStyle(); | 211 const SVGRenderStyle& aSVG = *a.svgStyle(); |
212 const SVGRenderStyle& bSVG = *b.svgStyle(); | 212 const SVGRenderStyle& bSVG = *b.svgStyle(); |
213 return aSVG.strokePaintType() == bSVG.strokePaintType() | 213 return aSVG.strokePaintType() == bSVG.strokePaintType() |
214 && (aSVG.strokePaintType() != SVGPaint::SVG_PAINTTYPE_RGBCOLOR || aS
VG.strokePaintColor() == bSVG.strokePaintColor()) | 214 && (aSVG.strokePaintType() != SVG_PAINTTYPE_RGBCOLOR || aSVG.strokeP
aintColor() == bSVG.strokePaintColor()) |
215 && aSVG.visitedLinkStrokePaintType() == bSVG.visitedLinkStrokePaintT
ype() | 215 && aSVG.visitedLinkStrokePaintType() == bSVG.visitedLinkStrokePaintT
ype() |
216 && (aSVG.visitedLinkStrokePaintType() != SVGPaint::SVG_PAINTTYPE_RGB
COLOR || aSVG.visitedLinkStrokePaintColor() == bSVG.visitedLinkStrokePaintColor(
)); | 216 && (aSVG.visitedLinkStrokePaintType() != SVG_PAINTTYPE_RGBCOLOR || a
SVG.visitedLinkStrokePaintColor() == bSVG.visitedLinkStrokePaintColor()); |
217 } | 217 } |
218 case CSSPropertyStrokeDasharray: | 218 case CSSPropertyStrokeDasharray: |
219 return dataEquivalent(a.strokeDashArray(), b.strokeDashArray()); | 219 return dataEquivalent(a.strokeDashArray(), b.strokeDashArray()); |
220 case CSSPropertyStrokeDashoffset: | 220 case CSSPropertyStrokeDashoffset: |
221 return dataEquivalent(a.strokeDashOffset(), b.strokeDashOffset()); | 221 return dataEquivalent(a.strokeDashOffset(), b.strokeDashOffset()); |
222 case CSSPropertyStrokeMiterlimit: | 222 case CSSPropertyStrokeMiterlimit: |
223 return a.strokeMiterLimit() == b.strokeMiterLimit(); | 223 return a.strokeMiterLimit() == b.strokeMiterLimit(); |
224 case CSSPropertyStrokeOpacity: | 224 case CSSPropertyStrokeOpacity: |
225 return a.strokeOpacity() == b.strokeOpacity(); | 225 return a.strokeOpacity() == b.strokeOpacity(); |
226 case CSSPropertyStrokeWidth: | 226 case CSSPropertyStrokeWidth: |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 return a.zIndex() == b.zIndex(); | 309 return a.zIndex() == b.zIndex(); |
310 case CSSPropertyZoom: | 310 case CSSPropertyZoom: |
311 return a.zoom() == b.zoom(); | 311 return a.zoom() == b.zoom(); |
312 default: | 312 default: |
313 ASSERT_NOT_REACHED(); | 313 ASSERT_NOT_REACHED(); |
314 return true; | 314 return true; |
315 } | 315 } |
316 } | 316 } |
317 | 317 |
318 } | 318 } |
OLD | NEW |