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

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

Issue 1830333002: Correct visual rects for scroll corner/resizer and non-frame composited scroll bars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't create a LayoutScrollbartPart if we've no scrollable area. Created 4 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
Index: third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp b/third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp
index 75b9adbe4916ac8e7951064252e4108ce431fca7..f4459b973f2548273b57dbc2c2b21a2091d3610b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp
@@ -261,8 +261,8 @@ void LayoutScrollbar::updateScrollbarPart(ScrollbarPart partType, bool destroy)
}
LayoutScrollbarPart* partLayoutObject = m_parts.get(partType);
- if (!partLayoutObject && needLayoutObject) {
- partLayoutObject = LayoutScrollbarPart::createAnonymous(&owningLayoutObject()->document(), this, partType);
+ if (!partLayoutObject && needLayoutObject && m_scrollableArea) {
wkorman 2016/04/05 19:04:19 Also added this check, which fixes otherwise-crash
+ partLayoutObject = LayoutScrollbarPart::createAnonymous(&owningLayoutObject()->document(), m_scrollableArea, this, partType);
m_parts.set(partType, partLayoutObject);
} else if (partLayoutObject && !needLayoutObject) {
m_parts.remove(partType);

Powered by Google App Engine
This is Rietveld 408576698