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

Unified Diff: third_party/WebKit/Source/core/frame/VisualViewport.cpp

Issue 1673393002: Return early from VisualViewport::initializeScrollbars if not attached yet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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: third_party/WebKit/Source/core/frame/VisualViewport.cpp
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
index 4f8a31d369deb4a418d85e9ba9f93995e69a8c0c..bb36c38b28cf86f35aa94393c07071fa19d88ec7 100644
--- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -334,6 +334,10 @@ void VisualViewport::attachToLayerTree(GraphicsLayer* currentLayerTreeRoot, Grap
void VisualViewport::initializeScrollbars()
{
+ // Do nothing if not attached to layer tree yet - will initialize upon attach.
+ if (!m_innerViewportContainerLayer)
+ return;
+
if (visualViewportSuppliesScrollbars()) {
if (!m_overlayScrollbarHorizontal->parent())
m_innerViewportContainerLayer->addChild(m_overlayScrollbarHorizontal.get());
« 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