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

Side by Side Diff: third_party/WebKit/Source/core/style/BorderData.h

Issue 2345543002: debugging for crbug.com/646539
Patch Set: 3 TUs, 2 .h Created 4 years, 3 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 { 44 {
45 } 45 }
46 46
47 bool hasBorder() const 47 bool hasBorder() const
48 { 48 {
49 return m_left.nonZero() || m_right.nonZero() || m_top.nonZero() || m_bot tom.nonZero(); 49 return m_left.nonZero() || m_right.nonZero() || m_top.nonZero() || m_bot tom.nonZero();
50 } 50 }
51 51
52 bool hasBorderFill() const 52 bool hasBorderFill() const
53 { 53 {
54 return m_image.hasImage() && m_image.fill(); 54 return false;
55 } 55 }
56 56
57 bool hasBorderRadius() const 57 bool hasBorderRadius() const
58 { 58 {
59 if (!m_topLeft.width().isZero()) 59 if (!m_topLeft.width().isZero())
60 return true; 60 return true;
61 if (!m_topRight.width().isZero()) 61 if (!m_topRight.width().isZero())
62 return true; 62 return true;
63 if (!m_bottomLeft.width().isZero()) 63 if (!m_bottomLeft.width().isZero())
64 return true; 64 return true;
(...skipping 25 matching lines...) Expand all
90 90
91 int borderBottomWidth() const 91 int borderBottomWidth() const
92 { 92 {
93 if (m_bottom.style() == BorderStyleNone || m_bottom.style() == BorderSty leHidden) 93 if (m_bottom.style() == BorderStyleNone || m_bottom.style() == BorderSty leHidden)
94 return 0; 94 return 0;
95 return m_bottom.width(); 95 return m_bottom.width();
96 } 96 }
97 97
98 bool operator==(const BorderData& o) const 98 bool operator==(const BorderData& o) const
99 { 99 {
100 return m_left == o.m_left && m_right == o.m_right && m_top == o.m_top && m_bottom == o.m_bottom && m_image == o.m_image 100 return m_left == o.m_left && m_right == o.m_right && m_top == o.m_top && m_bottom == o.m_bottom
101 && m_topLeft == o.m_topLeft && m_topRight == o.m_topRight && m_bo ttomLeft == o.m_bottomLeft && m_bottomRight == o.m_bottomRight; 101 && m_topLeft == o.m_topLeft && m_topRight == o.m_topRight && m_bo ttomLeft == o.m_bottomLeft && m_bottomRight == o.m_bottomRight;
102 } 102 }
103 103
104 bool visuallyEqual(const BorderData& o) const 104 bool visuallyEqual(const BorderData& o) const
105 { 105 {
106 return m_left.visuallyEqual(o.m_left) 106 return m_left.visuallyEqual(o.m_left)
107 && m_right.visuallyEqual(o.m_right) 107 && m_right.visuallyEqual(o.m_right)
108 && m_top.visuallyEqual(o.m_top) 108 && m_top.visuallyEqual(o.m_top)
109 && m_bottom.visuallyEqual(o.m_bottom) 109 && m_bottom.visuallyEqual(o.m_bottom)
110 && m_image == o.m_image
111 && m_topLeft == o.m_topLeft 110 && m_topLeft == o.m_topLeft
112 && m_topRight == o.m_topRight 111 && m_topRight == o.m_topRight
113 && m_bottomLeft == o.m_bottomLeft 112 && m_bottomLeft == o.m_bottomLeft
114 && m_bottomRight == o.m_bottomRight; 113 && m_bottomRight == o.m_bottomRight;
115 } 114 }
116 115
117 bool visualOverflowEqual(const BorderData& o) const 116 bool visualOverflowEqual(const BorderData& o) const
118 { 117 {
119 return m_image.outset() == o.m_image.outset(); 118 return false;
120 } 119 }
121 120
122 bool operator!=(const BorderData& o) const 121 bool operator!=(const BorderData& o) const
123 { 122 {
124 return !(*this == o); 123 return !(*this == o);
125 } 124 }
126 125
127 bool sizeEquals(const BorderData& o) const 126 bool sizeEquals(const BorderData& o) const
128 { 127 {
129 return borderLeftWidth() == o.borderLeftWidth() 128 return borderLeftWidth() == o.borderLeftWidth()
130 && borderTopWidth() == o.borderTopWidth() 129 && borderTopWidth() == o.borderTopWidth()
131 && borderRightWidth() == o.borderRightWidth() 130 && borderRightWidth() == o.borderRightWidth()
132 && borderBottomWidth() == o.borderBottomWidth(); 131 && borderBottomWidth() == o.borderBottomWidth();
133 } 132 }
134 133
135 const BorderValue& left() const { return m_left; } 134 const BorderValue& left() const { return m_left; }
136 const BorderValue& right() const { return m_right; } 135 const BorderValue& right() const { return m_right; }
137 const BorderValue& top() const { return m_top; } 136 const BorderValue& top() const { return m_top; }
138 const BorderValue& bottom() const { return m_bottom; } 137 const BorderValue& bottom() const { return m_bottom; }
139 138
140 const NinePieceImage& image() const { return m_image; } 139 //const NinePieceImage& image() const { return m_image; }
141 140
142 const LengthSize& topLeft() const { return m_topLeft; } 141 const LengthSize& topLeft() const { return m_topLeft; }
143 const LengthSize& topRight() const { return m_topRight; } 142 const LengthSize& topRight() const { return m_topRight; }
144 const LengthSize& bottomLeft() const { return m_bottomLeft; } 143 const LengthSize& bottomLeft() const { return m_bottomLeft; }
145 const LengthSize& bottomRight() const { return m_bottomRight; } 144 const LengthSize& bottomRight() const { return m_bottomRight; }
146 145
147 private: 146 private:
148 BorderValue m_left; 147 BorderValue m_left;
149 BorderValue m_right; 148 BorderValue m_right;
150 BorderValue m_top; 149 BorderValue m_top;
151 BorderValue m_bottom; 150 BorderValue m_bottom;
152 151
153 NinePieceImage m_image; 152 //NinePieceImage m_image;
154 153
155 LengthSize m_topLeft; 154 LengthSize m_topLeft;
156 LengthSize m_topRight; 155 LengthSize m_topRight;
157 LengthSize m_bottomLeft; 156 LengthSize m_bottomLeft;
158 LengthSize m_bottomRight; 157 LengthSize m_bottomRight;
159 }; 158 };
160 159
161 } // namespace blink 160 } // namespace blink
162 161
163 #endif // BorderData_h 162 #endif // BorderData_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/BUILD.gn ('k') | third_party/WebKit/Source/core/style/CachedUAStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698