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

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

Issue 2573963002: [SPInvalidation] Update paint properties when border radii change (Closed)
Patch Set: Rebase Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 int borderBottomWidth() const { 86 int borderBottomWidth() const {
87 if (m_bottom.style() == BorderStyleNone || 87 if (m_bottom.style() == BorderStyleNone ||
88 m_bottom.style() == BorderStyleHidden) 88 m_bottom.style() == BorderStyleHidden)
89 return 0; 89 return 0;
90 return m_bottom.width(); 90 return m_bottom.width();
91 } 91 }
92 92
93 bool operator==(const BorderData& o) const { 93 bool operator==(const BorderData& o) const {
94 return m_left == o.m_left && m_right == o.m_right && m_top == o.m_top && 94 return m_left == o.m_left && m_right == o.m_right && m_top == o.m_top &&
95 m_bottom == o.m_bottom && m_image == o.m_image && 95 m_bottom == o.m_bottom && m_image == o.m_image && radiiEqual(o);
96 m_topLeft == o.m_topLeft && m_topRight == o.m_topRight &&
97 m_bottomLeft == o.m_bottomLeft && m_bottomRight == o.m_bottomRight;
98 } 96 }
99 97
100 bool visuallyEqual(const BorderData& o) const { 98 bool visuallyEqual(const BorderData& o) const {
101 return m_left.visuallyEqual(o.m_left) && m_right.visuallyEqual(o.m_right) && 99 return m_left.visuallyEqual(o.m_left) && m_right.visuallyEqual(o.m_right) &&
102 m_top.visuallyEqual(o.m_top) && m_bottom.visuallyEqual(o.m_bottom) && 100 m_top.visuallyEqual(o.m_top) && m_bottom.visuallyEqual(o.m_bottom) &&
103 m_image == o.m_image && m_topLeft == o.m_topLeft && 101 m_image == o.m_image && radiiEqual(o);
104 m_topRight == o.m_topRight && m_bottomLeft == o.m_bottomLeft &&
105 m_bottomRight == o.m_bottomRight;
106 } 102 }
107 103
108 bool visualOverflowEqual(const BorderData& o) const { 104 bool visualOverflowEqual(const BorderData& o) const {
109 return m_image.outset() == o.m_image.outset(); 105 return m_image.outset() == o.m_image.outset();
110 } 106 }
111 107
112 bool operator!=(const BorderData& o) const { return !(*this == o); } 108 bool operator!=(const BorderData& o) const { return !(*this == o); }
113 109
114 bool sizeEquals(const BorderData& o) const { 110 bool sizeEquals(const BorderData& o) const {
115 return borderLeftWidth() == o.borderLeftWidth() && 111 return borderLeftWidth() == o.borderLeftWidth() &&
116 borderTopWidth() == o.borderTopWidth() && 112 borderTopWidth() == o.borderTopWidth() &&
117 borderRightWidth() == o.borderRightWidth() && 113 borderRightWidth() == o.borderRightWidth() &&
118 borderBottomWidth() == o.borderBottomWidth(); 114 borderBottomWidth() == o.borderBottomWidth();
119 } 115 }
120 116
117 bool radiiEqual(const BorderData& o) const {
118 return m_topLeft == o.m_topLeft && m_topRight == o.m_topRight &&
119 m_bottomLeft == o.m_bottomLeft && m_bottomRight == o.m_bottomRight;
120 }
121
121 const BorderValue& left() const { return m_left; } 122 const BorderValue& left() const { return m_left; }
122 const BorderValue& right() const { return m_right; } 123 const BorderValue& right() const { return m_right; }
123 const BorderValue& top() const { return m_top; } 124 const BorderValue& top() const { return m_top; }
124 const BorderValue& bottom() const { return m_bottom; } 125 const BorderValue& bottom() const { return m_bottom; }
125 126
126 const NinePieceImage& image() const { return m_image; } 127 const NinePieceImage& image() const { return m_image; }
127 128
128 const LengthSize& topLeft() const { return m_topLeft; } 129 const LengthSize& topLeft() const { return m_topLeft; }
129 const LengthSize& topRight() const { return m_topRight; } 130 const LengthSize& topRight() const { return m_topRight; }
130 const LengthSize& bottomLeft() const { return m_bottomLeft; } 131 const LengthSize& bottomLeft() const { return m_bottomLeft; }
131 const LengthSize& bottomRight() const { return m_bottomRight; } 132 const LengthSize& bottomRight() const { return m_bottomRight; }
132 133
133 private: 134 private:
134 BorderValue m_left; 135 BorderValue m_left;
135 BorderValue m_right; 136 BorderValue m_right;
136 BorderValue m_top; 137 BorderValue m_top;
137 BorderValue m_bottom; 138 BorderValue m_bottom;
138 139
139 NinePieceImage m_image; 140 NinePieceImage m_image;
140 141
141 LengthSize m_topLeft; 142 LengthSize m_topLeft;
142 LengthSize m_topRight; 143 LengthSize m_topRight;
143 LengthSize m_bottomLeft; 144 LengthSize m_bottomLeft;
144 LengthSize m_bottomRight; 145 LengthSize m_bottomRight;
145 }; 146 };
146 147
147 } // namespace blink 148 } // namespace blink
148 149
149 #endif // BorderData_h 150 #endif // BorderData_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698