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

Side by Side Diff: Source/core/rendering/style/ShapeValue.h

Issue 669093002: RenderStyle operator== incorrect for shape-outside and clip-path. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 14 matching lines...) Expand all
25 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 25 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
26 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE. 27 * SUCH DAMAGE.
28 */ 28 */
29 29
30 #ifndef ShapeValue_h 30 #ifndef ShapeValue_h
31 #define ShapeValue_h 31 #define ShapeValue_h
32 32
33 #include "core/fetch/ImageResource.h" 33 #include "core/fetch/ImageResource.h"
34 #include "core/rendering/style/BasicShapes.h" 34 #include "core/rendering/style/BasicShapes.h"
35 #include "core/rendering/style/DataEquivalency.h"
35 #include "core/rendering/style/RenderStyleConstants.h" 36 #include "core/rendering/style/RenderStyleConstants.h"
36 #include "core/rendering/style/StyleImage.h" 37 #include "core/rendering/style/StyleImage.h"
37 #include "wtf/PassRefPtr.h" 38 #include "wtf/PassRefPtr.h"
38 39
39 namespace blink { 40 namespace blink {
40 41
41 class ShapeValue : public RefCounted<ShapeValue> { 42 class ShapeValue : public RefCounted<ShapeValue> {
42 public: 43 public:
43 enum ShapeValueType { 44 enum ShapeValueType {
44 // The Auto value is defined by a null ShapeValue* 45 // The Auto value is defined by a null ShapeValue*
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 CSSBoxType m_cssBox; 116 CSSBoxType m_cssBox;
116 }; 117 };
117 118
118 inline bool ShapeValue::operator==(const ShapeValue& other) const 119 inline bool ShapeValue::operator==(const ShapeValue& other) const
119 { 120 {
120 if (type() != other.type()) 121 if (type() != other.type())
121 return false; 122 return false;
122 123
123 switch (type()) { 124 switch (type()) {
124 case Shape: 125 case Shape:
125 return shape() == other.shape() && cssBox() == other.cssBox(); 126 return dataEquivalent(shape(), other.shape()) && cssBox() == other.cssBo x();
126 case Box: 127 case Box:
127 return cssBox() == other.cssBox(); 128 return cssBox() == other.cssBox();
128 case Image: 129 case Image:
129 return image() == other.image(); 130 return dataEquivalent(image(), other.image());
130 } 131 }
131 132
132 ASSERT_NOT_REACHED(); 133 ASSERT_NOT_REACHED();
133 return false; 134 return false;
134 } 135 }
135 136
136 } 137 }
137 138
138 #endif 139 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/style/RenderStyleTest.cpp ('k') | Source/core/rendering/style/StyleRareNonInheritedData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698