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 f4a4733c6ad98815ab18d8e8fff720c60f15100a..b14965cd8942153e182585d74d747d5b054ab45a 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
@@ -74,7 +74,7 @@ |
LayoutObject* to) { |
LayoutObject* maybe_sticky_ancestor = from; |
while (maybe_sticky_ancestor && maybe_sticky_ancestor != to) { |
- if (maybe_sticky_ancestor->Style()->HasStickyConstrainedPosition()) { |
+ if (maybe_sticky_ancestor->IsStickyPositioned()) { |
return ToLayoutBoxModelObject(maybe_sticky_ancestor); |
} |
@@ -249,8 +249,7 @@ |
// 0 during destruction. |
if (LocalFrame* frame = this->GetFrame()) { |
if (FrameView* frame_view = frame->View()) { |
- if (Style()->HasViewportConstrainedPosition() || |
- Style()->HasStickyConstrainedPosition()) |
+ if (Style()->HasViewportConstrainedPosition()) |
frame_view->RemoveViewportConstrainedObject(*this); |
} |
} |
@@ -434,9 +433,9 @@ |
Style()->GetPosition() == EPosition::kFixed; |
bool old_style_is_viewport_constrained = |
old_style && old_style->GetPosition() == EPosition::kFixed; |
- bool new_style_is_sticky = Style()->HasStickyConstrainedPosition(); |
+ bool new_style_is_sticky = Style()->GetPosition() == EPosition::kSticky; |
bool old_style_is_sticky = |
- old_style && old_style->HasStickyConstrainedPosition(); |
+ old_style && old_style->GetPosition() == EPosition::kSticky; |
if (new_style_is_sticky != old_style_is_sticky) { |
if (new_style_is_sticky) { |
@@ -1062,8 +1061,6 @@ |
constraints.AddAnchorEdge( |
StickyPositionScrollingConstraints::kAnchorEdgeBottom); |
} |
- // At least one edge should be anchored if we are calculating constraints. |
- DCHECK(constraints.GetAnchorEdges()); |
scrollable_area->GetStickyConstraintsMap().Set(Layer(), constraints); |
} |