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

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

Issue 2465363003: Improve how the column balancer handles top margins on floats. (Closed)
Patch Set: Back out some unnecessary changes that caused assertion failures in a test. Created 4 years, 1 month 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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 5aad7f755841285c46b4aeb9ace8980f0c7075c0..b83e27e00f66abd9fdddf4c0e3b385d4bb351a60 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -706,8 +706,8 @@ void LayoutBox::updateLayerTransformAfterLayout() {
layer()->updateTransformationMatrix();
}
-LayoutUnit LayoutBox::logicalHeightIncludingOverflow() const {
- if (!m_overflow)
+LayoutUnit LayoutBox::logicalHeightWithVisibleOverflow() const {
+ if (!m_overflow || hasOverflowClip())
return logicalHeight();
LayoutRect overflow = layoutOverflowRect();
if (style()->isHorizontalWritingMode())
@@ -4712,7 +4712,7 @@ void LayoutBox::updateFragmentationInfoForChild(LayoutBox& child) {
return;
LayoutUnit logicalTop = child.logicalTop();
- LayoutUnit logicalHeight = child.logicalHeightIncludingOverflow();
+ LayoutUnit logicalHeight = child.logicalHeightWithVisibleOverflow();
LayoutUnit spaceLeft =
pageRemainingLogicalHeightForOffset(logicalTop, AssociateWithLatterPage);
if (spaceLeft < logicalHeight)
@@ -4729,7 +4729,7 @@ bool LayoutBox::childNeedsRelayoutForPagination(const LayoutBox& child) const {
// to do this if there's a chance that we need to recalculate pagination
// struts inside.
if (LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalTop)) {
- LayoutUnit logicalHeight = child.logicalHeightIncludingOverflow();
+ LayoutUnit logicalHeight = child.logicalHeightWithVisibleOverflow();
LayoutUnit remainingSpace = pageRemainingLogicalHeightForOffset(
logicalTop, AssociateWithLatterPage);
if (child.offsetToNextPage()) {

Powered by Google App Engine
This is Rietveld 408576698