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

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

Issue 2682573002: Split EBreak enum into EBreakBetween & EBreakInside (Closed)
Patch Set: Update references to EBreak in ComputedStyle.h comments 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..2942825c258f540c594652497f39aaf94dda38ad 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -263,9 +263,9 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
// 32 bits
- unsigned m_breakBefore : 4; // EBreak
- unsigned m_breakAfter : 4; // EBreak
- unsigned m_breakInside : 2; // EBreak
+ unsigned m_breakBefore : 4; // EBreakBetween
+ unsigned m_breakAfter : 4; // EBreakBetween
+ unsigned m_breakInside : 2; // EBreakInside
unsigned m_styleType : 6; // PseudoId
unsigned m_pseudoBits : 8;
@@ -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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698