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

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: use position:fixed instead of sticky on the expected result Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/sticky/sticky-both-sides-top-left-constrained-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 33672ccc2d653469824876d32a0794e44c97fdf4..8edf6b0ee0477bdcbc76cdd29c61fdb6e0684476 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -1002,8 +1002,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;
}
@@ -1034,8 +1033,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;
}
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/sticky/sticky-both-sides-top-left-constrained-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698