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

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

Issue 2880573002: Store border-*-style on SurroundData in ComputedStyle (Closed)
Patch Set: Merge branch 'enumClass' into borderStyle 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/CachedUAStyle.h
diff --git a/third_party/WebKit/Source/core/style/CachedUAStyle.h b/third_party/WebKit/Source/core/style/CachedUAStyle.h
index 07504a6d6fa642bb1b8d6deab5dda4bf897b6c77..8869ae36caddb788b11cd7f347beaedfbdd32f5a 100644
--- a/third_party/WebKit/Source/core/style/CachedUAStyle.h
+++ b/third_party/WebKit/Source/core/style/CachedUAStyle.h
@@ -61,6 +61,29 @@ class CachedUAStyle {
other.BorderBottomColorIsCurrentColor());
}
+ bool BorderWidthEquals(const ComputedStyle& other) const {
+ return (border_left_width == other.BorderLeftWidth() &&
+ border_right_width == other.BorderRightWidth() &&
+ border_top_width == other.BorderTopWidth() &&
+ border_bottom_width == other.BorderBottomWidth());
+ }
+
+ bool BorderRadiiEquals(const ComputedStyle& other) const {
+ return top_left_ == other.BorderTopLeftRadius() &&
+ top_right_ == other.BorderTopRightRadius() &&
+ bottom_left_ == other.BorderBottomLeftRadius() &&
+ bottom_right_ == other.BorderBottomRightRadius();
+ }
+
+ bool BorderStyleEquals(const ComputedStyle& other) const {
+ return (
+ border_left_style == static_cast<unsigned>(other.BorderLeftStyle()) &&
+ border_right_style == static_cast<unsigned>(other.BorderRightStyle()) &&
+ border_top_style == static_cast<unsigned>(other.BorderTopStyle()) &&
+ border_bottom_style ==
+ static_cast<unsigned>(other.BorderBottomStyle()));
+ }
+
BorderData border;
LengthSize top_left_;
LengthSize top_right_;
@@ -74,6 +97,10 @@ class CachedUAStyle {
bool border_right_color_is_current_color;
bool border_top_color_is_current_color;
bool border_bottom_color_is_current_color;
+ unsigned border_left_style : 4; // EBorderStyle
+ unsigned border_right_style : 4; // EBorderStyle
+ unsigned border_top_style : 4; // EBorderStyle
+ unsigned border_bottom_style : 4; // EBorderStyle
float border_left_width;
float border_right_width;
float border_top_width;
@@ -100,6 +127,10 @@ class CachedUAStyle {
style->BorderTopColorIsCurrentColor()),
border_bottom_color_is_current_color(
style->BorderBottomColorIsCurrentColor()),
+ border_left_style(static_cast<unsigned>(style->BorderLeftStyle())),
+ border_right_style(static_cast<unsigned>(style->BorderRightStyle())),
+ border_top_style(static_cast<unsigned>(style->BorderTopStyle())),
+ border_bottom_style(static_cast<unsigned>(style->BorderBottomStyle())),
border_left_width(style->BorderLeftWidth()),
border_right_width(style->BorderRightWidth()),
border_top_width(style->BorderTopWidth()),
« no previous file with comments | « third_party/WebKit/Source/core/style/BorderValue.h ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698