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

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

Issue 2569013006: Changed EOverflow to an enum class and renamed its members (Closed)
Patch Set: Rebase Created 4 years 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 fddd23cd5c63f15b36ce23268a2df0aa29a20196..a8172d839897b60eead6c61a136dbe57bf3014fc 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -370,8 +370,8 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
static_cast<unsigned>(initialDisplay());
m_nonInheritedData.m_overflowAnchor =
static_cast<unsigned>(initialOverflowAnchor());
- m_nonInheritedData.m_overflowX = initialOverflowX();
- m_nonInheritedData.m_overflowY = initialOverflowY();
+ m_nonInheritedData.m_overflowX = static_cast<unsigned>(initialOverflowX());
+ m_nonInheritedData.m_overflowY = static_cast<unsigned>(initialOverflowY());
m_nonInheritedData.m_verticalAlign = initialVerticalAlign();
m_nonInheritedData.m_clear = initialClear();
m_nonInheritedData.m_position = initialPosition();
@@ -1551,18 +1551,22 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
}
// overflow-x
- static EOverflow initialOverflowX() { return OverflowVisible; }
+ static EOverflow initialOverflowX() { return EOverflow::Visible; }
EOverflow overflowX() const {
return static_cast<EOverflow>(m_nonInheritedData.m_overflowX);
}
- void setOverflowX(EOverflow v) { m_nonInheritedData.m_overflowX = v; }
+ void setOverflowX(EOverflow v) {
+ m_nonInheritedData.m_overflowX = static_cast<unsigned>(v);
+ }
// overflow-y
- static EOverflow initialOverflowY() { return OverflowVisible; }
+ static EOverflow initialOverflowY() { return EOverflow::Visible; }
EOverflow overflowY() const {
return static_cast<EOverflow>(m_nonInheritedData.m_overflowY);
}
- void setOverflowY(EOverflow v) { m_nonInheritedData.m_overflowY = v; }
+ void setOverflowY(EOverflow v) {
+ m_nonInheritedData.m_overflowY = static_cast<unsigned>(v);
+ }
// Padding properties.
static Length initialPadding() { return Length(Fixed); }
@@ -3526,11 +3530,11 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
// It's sufficient to just check one direction, since it's illegal to have
// visible on only one overflow value.
bool isOverflowVisible() const {
- DCHECK(overflowX() != OverflowVisible || overflowX() == overflowY());
- return overflowX() == OverflowVisible;
+ DCHECK(overflowX() != EOverflow::Visible || overflowX() == overflowY());
+ return overflowX() == EOverflow::Visible;
}
bool isOverflowPaged() const {
- return overflowY() == OverflowPagedX || overflowY() == OverflowPagedY;
+ return overflowY() == EOverflow::PagedX || overflowY() == EOverflow::PagedY;
}
// Visibility utility functions.
@@ -3730,7 +3734,7 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
// columns may be laid out along the inline axis, just like for regular
// multicol. Otherwise, we need to lay out along the block axis.
if (isOverflowPaged())
- return (overflowY() == OverflowPagedX) == isHorizontalWritingMode();
+ return (overflowY() == EOverflow::PagedX) == isHorizontalWritingMode();
return false;
}

Powered by Google App Engine
This is Rietveld 408576698