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

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

Issue 2682573002: Split EBreak enum into EBreakBetween & EBreakInside (Closed)
Patch Set: Use more specific valueForFoo function names Created 3 years, 10 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/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index f84acb14f2732f342564960bb26213502df380d3..7c7190fea41fde96e831471f295341f31e0680d6 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -310,9 +310,12 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
m_nonInheritedData.m_verticalAlign =
static_cast<unsigned>(initialVerticalAlign());
m_nonInheritedData.m_position = initialPosition();
- m_nonInheritedData.m_breakBefore = initialBreakBefore();
- m_nonInheritedData.m_breakAfter = initialBreakAfter();
- m_nonInheritedData.m_breakInside = initialBreakInside();
+ m_nonInheritedData.m_breakBefore =
+ static_cast<unsigned>(initialBreakBefore());
+ m_nonInheritedData.m_breakAfter =
+ static_cast<unsigned>(initialBreakAfter());
+ m_nonInheritedData.m_breakInside =
+ static_cast<unsigned>(initialBreakInside());
m_nonInheritedData.m_styleType = PseudoIdNone;
m_nonInheritedData.m_pseudoBits = 0;
m_nonInheritedData.m_explicitInheritance = false;
@@ -761,33 +764,32 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
// Page break properties.
// break-after (shorthand for page-break-after and -webkit-column-break-after)
- static EBreak initialBreakAfter() { return BreakAuto; }
- EBreak breakAfter() const {
- return static_cast<EBreak>(m_nonInheritedData.m_breakAfter);
+ static EBreakBetween initialBreakAfter() { return EBreakBetween::kAuto; }
+ EBreakBetween breakAfter() const {
+ return static_cast<EBreakBetween>(m_nonInheritedData.m_breakAfter);
}
- void setBreakAfter(EBreak b) {
- m_nonInheritedData.m_breakAfter = b;
+ void setBreakAfter(EBreakBetween b) {
+ m_nonInheritedData.m_breakAfter = static_cast<unsigned>(b);
}
// break-before (shorthand for page-break-before and
// -webkit-column-break-before)
- static EBreak initialBreakBefore() { return BreakAuto; }
- EBreak breakBefore() const {
- return static_cast<EBreak>(m_nonInheritedData.m_breakBefore);
+ static EBreakBetween initialBreakBefore() { return EBreakBetween::kAuto; }
+ EBreakBetween breakBefore() const {
+ return static_cast<EBreakBetween>(m_nonInheritedData.m_breakBefore);
}
- void setBreakBefore(EBreak b) {
- m_nonInheritedData.m_breakBefore = b;
+ void setBreakBefore(EBreakBetween b) {
+ m_nonInheritedData.m_breakBefore = static_cast<unsigned>(b);
}
// break-inside (shorthand for page-break-inside and
// -webkit-column-break-inside)
- static EBreak initialBreakInside() { return BreakAuto; }
- EBreak breakInside() const {
- return static_cast<EBreak>(m_nonInheritedData.m_breakInside);
+ static EBreakInside initialBreakInside() { return EBreakInside::kAuto; }
+ EBreakInside breakInside() const {
+ return static_cast<EBreakInside>(m_nonInheritedData.m_breakInside);
}
- void setBreakInside(EBreak b) {
- DCHECK_LE(b, BreakValueLastAllowedForBreakInside);
- m_nonInheritedData.m_breakInside = b;
+ void setBreakInside(EBreakInside b) {
+ m_nonInheritedData.m_breakInside = static_cast<unsigned>(b);
}
// clip

Powered by Google App Engine
This is Rietveld 408576698