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

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

Issue 2123663003: Moved RootFrameViewport creation to happen after document attachment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved RootFrameViewport creation to happen after document attachment Created 4 years, 5 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 | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | 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/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 8ff445e12fb425194478fef4894e3037d6f85bb5..921b854f22b0037ef43cc99a0c105a8577fe9457 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -814,13 +814,6 @@ void FrameView::performPreLayoutTasks()
document->updateStyleAndLayoutTree();
lifecycle().advanceTo(DocumentLifecycle::StyleClean);
- if (m_frame->isMainFrame() && !m_viewportScrollableArea) {
- ScrollableArea& visualViewport = m_frame->host()->visualViewport();
- ScrollableArea* layoutViewport = layoutViewportScrollableArea();
- ASSERT(layoutViewport);
- m_viewportScrollableArea = RootFrameViewport::create(visualViewport, *layoutViewport);
- }
-
if (RuntimeEnabledFeatures::scrollAnchoringEnabled())
m_scrollAnchor.save();
}
@@ -2393,6 +2386,17 @@ void FrameView::updateDocumentAnnotatedRegions() const
page->chromeClient().annotatedRegionsChanged();
}
+void FrameView::didAttachDocument()
+{
+ if (m_frame->isMainFrame()) {
+ DCHECK(m_frame->host());
+ ScrollableArea& visualViewport = m_frame->host()->visualViewport();
+ ScrollableArea* layoutViewport = layoutViewportScrollableArea();
+ DCHECK(layoutViewport);
+ m_viewportScrollableArea = RootFrameViewport::create(visualViewport, *layoutViewport);
+ }
+}
+
void FrameView::updateScrollCorner()
{
RefPtr<ComputedStyle> cornerStyle;
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698