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

Unified Diff: third_party/WebKit/Source/core/layout/CollapsedBorderValue.h

Issue 2906253003: Replace call sites to BorderValue functions to save the BorderValue construction cost (Closed)
Patch Set: rune@ renames 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/CollapsedBorderValue.h
diff --git a/third_party/WebKit/Source/core/layout/CollapsedBorderValue.h b/third_party/WebKit/Source/core/layout/CollapsedBorderValue.h
index 74c55752ee67dddc67587f1710082d3fe147ef3f..12eae13ed6e97e86854f93b359bcf07f065f25a8 100644
--- a/third_party/WebKit/Source/core/layout/CollapsedBorderValue.h
+++ b/third_party/WebKit/Source/core/layout/CollapsedBorderValue.h
@@ -63,6 +63,17 @@ class CollapsedBorderValue {
DCHECK(precedence != kBorderPrecedenceOff);
}
+ CollapsedBorderValue(EBorderStyle style,
+ const float width,
+ const Color& color,
+ EBorderPrecedence precedence)
+ : color_(color),
+ width_(ComputedStyle::BorderStyleIsVisible(style) ? width : 0),
+ style_(static_cast<unsigned>(style)),
+ precedence_(precedence) {
+ DCHECK(precedence != kBorderPrecedenceOff);
+ }
+
unsigned Width() const { return width_; }
EBorderStyle Style() const { return static_cast<EBorderStyle>(style_); }
bool Exists() const { return precedence_ != kBorderPrecedenceOff; }
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698