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

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

Issue 1292003007: Update assertion in LayoutBox::intrinsicScrollbarLogicalWidth. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBox.cpp
diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp
index 18f1df9511b843b893c025c52bc90f1cacd0006c..12188d1a68531a28f950c0c8ee7e55dcb4ed43b5 100644
--- a/Source/core/layout/LayoutBox.cpp
+++ b/Source/core/layout/LayoutBox.cpp
@@ -699,13 +699,15 @@ int LayoutBox::intrinsicScrollbarLogicalWidth() const
return 0;
if (isHorizontalWritingMode() && style()->overflowY() == OSCROLL) {
- ASSERT(layer()->scrollableArea() && layer()->scrollableArea()->hasVerticalScrollbar());
- return verticalScrollbarWidth();
+ ASSERT(layer()->scrollableArea());
+ // Even with OSCROLL, the scrollbar may not exist (crbug.com/415031).
+ return layer()->scrollableArea()->hasVerticalScrollbar() ? verticalScrollbarWidth() : 0;
}
if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) {
- ASSERT(layer()->scrollableArea() && layer()->scrollableArea()->hasHorizontalScrollbar());
- return horizontalScrollbarHeight();
+ ASSERT(layer()->scrollableArea());
+ // Even with OSCROLL, the scrollbar may not exist (crbug.com/415031).
+ return layer()->scrollableArea()->hasHorizontalScrollbar() ? horizontalScrollbarHeight() : 0;
}
return 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698