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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp

Issue 2667493002: Changed EPosition to an enum class and renamed its members (Closed)
Patch Set: Rebase 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/layout/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index 09baabe4299cb92198933bcdacf623e7404015d9..42147997120672501f39cdb177809e1a9b7daf5e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -348,8 +348,8 @@ void LayoutBoxModelObject::styleDidChange(StyleDifference diff,
// re-raster (rect-based invalidation) is needed, display items should
// still update their paint offset.
if (oldStyle) {
- bool newStyleIsFixedPosition = style()->position() == FixedPosition;
- bool oldStyleIsFixedPosition = oldStyle->position() == FixedPosition;
+ bool newStyleIsFixedPosition = style()->position() == EPosition::kFixed;
+ bool oldStyleIsFixedPosition = oldStyle->position() == EPosition::kFixed;
if (newStyleIsFixedPosition != oldStyleIsFixedPosition)
ObjectPaintInvalidator(*this)
.invalidateDisplayItemClientsIncludingNonCompositingDescendants(
@@ -378,11 +378,13 @@ void LayoutBoxModelObject::styleDidChange(StyleDifference diff,
}
if (FrameView* frameView = view()->frameView()) {
- bool newStyleIsViewportConstained = style()->position() == FixedPosition;
+ bool newStyleIsViewportConstained =
+ style()->position() == EPosition::kFixed;
bool oldStyleIsViewportConstrained =
- oldStyle && oldStyle->position() == FixedPosition;
- bool newStyleIsSticky = style()->position() == StickyPosition;
- bool oldStyleIsSticky = oldStyle && oldStyle->position() == StickyPosition;
+ oldStyle && oldStyle->position() == EPosition::kFixed;
+ bool newStyleIsSticky = style()->position() == EPosition::kSticky;
+ bool oldStyleIsSticky =
+ oldStyle && oldStyle->position() == EPosition::kSticky;
if (newStyleIsSticky != oldStyleIsSticky) {
if (newStyleIsSticky) {
@@ -1045,7 +1047,7 @@ LayoutPoint LayoutBoxModelObject::adjustedPositionRelativeTo(
if (offsetParentObject->isLayoutInline()) {
const LayoutInline* inlineParent = toLayoutInline(offsetParentObject);
- if (isBox() && style()->position() == AbsolutePosition &&
+ if (isBox() && style()->position() == EPosition::kAbsolute &&
inlineParent->isInFlowPositioned()) {
// Offset for absolute elements with inline parent is a special
// case in the CSS spec
@@ -1226,7 +1228,7 @@ const LayoutObject* LayoutBoxModelObject::pushMappingToContainer(
return nullptr;
bool isInline = isLayoutInline();
- bool isFixedPos = !isInline && style()->position() == FixedPosition;
+ bool isFixedPos = !isInline && style()->position() == EPosition::kFixed;
bool containsFixedPosition = canContainFixedPositionObjects();
LayoutSize adjustmentForSkippedAncestor;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFullScreen.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698