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

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

Issue 1980103002: Include auto vertical scrollbar in intrinsicScrollbarLogicalWidth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Restore list box height calculation, fix scrollbar width factor Created 4 years, 7 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/LayoutFlexibleBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
index 054a24e585aa5dcb4cd2a9907a61b17ef92fd4b1..f7858bf5709d610c8f1ecbe29471de3b5d911237 100644
--- a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
@@ -137,7 +137,7 @@ void LayoutFlexibleBox::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidt
minLogicalWidth = std::max(LayoutUnit(), minLogicalWidth);
maxLogicalWidth = std::max(LayoutUnit(), maxLogicalWidth);
- LayoutUnit scrollbarWidth(intrinsicScrollbarLogicalWidth());
+ LayoutUnit scrollbarWidth(scrollbarLogicalWidth());
maxLogicalWidth += scrollbarWidth;
minLogicalWidth += scrollbarWidth;
}
@@ -796,7 +796,7 @@ void LayoutFlexibleBox::cacheChildMainSize(const LayoutBox& child)
// The max preferred logical width includes the intrinsic scrollbar logical width, which is only set for
// overflow: scroll. To handle overflow: auto, we have to take scrollbarLogicalWidth() into account, and then
// subtract the intrinsic width again so as to not double-count overflow: scroll scrollbars.
- mainSize = child.maxPreferredLogicalWidth() + child.scrollbarLogicalWidth() - child.intrinsicScrollbarLogicalWidth();
+ mainSize = child.maxPreferredLogicalWidth() + child.scrollbarLogicalWidth() - child.scrollbarLogicalWidth();
}
m_intrinsicSizeAlongMainAxis.set(&child, mainSize);
m_relaidOutChildren.add(&child);
@@ -830,7 +830,7 @@ LayoutUnit LayoutFlexibleBox::computeInnerFlexBaseSizeForChild(LayoutBox& child,
mainAxisExtent = m_intrinsicSizeAlongMainAxis.get(&child);
} else {
// We don't need to add scrollbarLogicalWidth here. For overflow: scroll, the preferred width
- // already includes the scrollbar size (via intrinsicScrollbarLogicalWidth()). For overflow: auto,
+ // already includes the scrollbar size (via scrollbarLogicalWidth()). For overflow: auto,
// childFlexBaseSizeRequiresLayout returns true and we handle that via the other branch
// of this if.
mainAxisExtent = child.maxPreferredLogicalWidth();

Powered by Google App Engine
This is Rietveld 408576698