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

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

Issue 2788053002: Fix sticky bottom is not applied with both sticky position (Closed)
Patch Set: Created 3 years, 9 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 54951eb17f9f976c2ef257245e5792797d1e35e7..1542d1952fe83ff4ae9161193e5e9adba930ad0e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -999,8 +999,7 @@ void LayoutBoxModelObject::updateStickyPositionConstraints() const {
if (!style()->left().isAuto() && !style()->right().isAuto()) {
if (horizontalOffsets >
scrollContainerRelativeContainingBlockRect.width() ||
- horizontalOffsets + scrollContainerRelativeContainingBlockRect.width() >
- constrainingSize.width()) {
+ horizontalOffsets + stickyBoxRect.width() > constrainingSize.width()) {
skipRight = style()->isLeftToRightDirection();
skipLeft = !skipRight;
}
@@ -1031,8 +1030,7 @@ void LayoutBoxModelObject::updateStickyPositionConstraints() const {
LayoutUnit(constrainingSize.height()));
if (!style()->top().isAuto() && !style()->bottom().isAuto()) {
if (verticalOffsets > scrollContainerRelativeContainingBlockRect.height() ||
- verticalOffsets + scrollContainerRelativeContainingBlockRect.height() >
- constrainingSize.height()) {
+ verticalOffsets + stickyBoxRect.height() > constrainingSize.height()) {
skipBottom = true;
}
}

Powered by Google App Engine
This is Rietveld 408576698