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

Unified Diff: third_party/WebKit/Source/core/style/BorderData.h

Issue 2861773004: Move border-*-width out of BorderValue and store on SurroundData in ComputedStyle instead (Closed)
Patch Set: meade@'s suggestion Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/style/BorderData.h
diff --git a/third_party/WebKit/Source/core/style/BorderData.h b/third_party/WebKit/Source/core/style/BorderData.h
index 91af0da8956316bcea05de0eb8de0c6f816ae7ef..c6d188818043eec41ac1a5c50b9e8358a77418d3 100644
--- a/third_party/WebKit/Source/core/style/BorderData.h
+++ b/third_party/WebKit/Source/core/style/BorderData.h
@@ -25,7 +25,7 @@
#ifndef BorderData_h
#define BorderData_h
-#include "core/style/BorderValue.h"
+#include "core/style/BorderColorAndStyle.h"
#include "core/style/NinePieceImage.h"
#include "platform/LengthSize.h"
#include "platform/geometry/IntRect.h"
@@ -54,33 +54,6 @@ class BorderData {
(bottom_.NonZero() && bottom_.GetColor().IsCurrentColor());
}
- float BorderLeftWidth() const {
- if (left_.Style() == kBorderStyleNone ||
- left_.Style() == kBorderStyleHidden)
- return 0;
- return left_.Width();
- }
-
- float BorderRightWidth() const {
- if (right_.Style() == kBorderStyleNone ||
- right_.Style() == kBorderStyleHidden)
- return 0;
- return right_.Width();
- }
-
- float BorderTopWidth() const {
- if (top_.Style() == kBorderStyleNone || top_.Style() == kBorderStyleHidden)
- return 0;
- return top_.Width();
- }
-
- float BorderBottomWidth() const {
- if (bottom_.Style() == kBorderStyleNone ||
- bottom_.Style() == kBorderStyleHidden)
- return 0;
- return bottom_.Width();
- }
-
bool operator==(const BorderData& o) const {
return left_ == o.left_ && right_ == o.right_ && top_ == o.top_ &&
bottom_ == o.bottom_ && image_ == o.image_;
@@ -98,25 +71,18 @@ class BorderData {
bool operator!=(const BorderData& o) const { return !(*this == o); }
- bool SizeEquals(const BorderData& o) const {
- return BorderLeftWidth() == o.BorderLeftWidth() &&
- BorderTopWidth() == o.BorderTopWidth() &&
- BorderRightWidth() == o.BorderRightWidth() &&
- BorderBottomWidth() == o.BorderBottomWidth();
- }
-
- const BorderValue& Left() const { return left_; }
- const BorderValue& Right() const { return right_; }
- const BorderValue& Top() const { return top_; }
- const BorderValue& Bottom() const { return bottom_; }
+ const BorderColorAndStyle& Left() const { return left_; }
+ const BorderColorAndStyle& Right() const { return right_; }
+ const BorderColorAndStyle& Top() const { return top_; }
+ const BorderColorAndStyle& Bottom() const { return bottom_; }
const NinePieceImage& GetImage() const { return image_; }
private:
- BorderValue left_;
- BorderValue right_;
- BorderValue top_;
- BorderValue bottom_;
+ BorderColorAndStyle left_;
+ BorderColorAndStyle right_;
+ BorderColorAndStyle top_;
+ BorderColorAndStyle bottom_;
NinePieceImage image_;
};
« no previous file with comments | « third_party/WebKit/Source/core/style/BorderColorAndStyle.h ('k') | third_party/WebKit/Source/core/style/BorderValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698