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

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

Issue 1295053002: Move dispatchDidFirstVisuallyNonEmptyLayout into WebViewImpl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: simpler. 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 | « Source/core/frame/FrameView.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index c9c429ac81677e8f703528ccb03a89e71f526610..a31f45cb594a05955035813b89572a2cacc6da72 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -213,7 +213,6 @@ void FrameView::reset()
m_visuallyNonEmptyCharacterCount = 0;
m_visuallyNonEmptyPixelCount = 0;
m_isVisuallyNonEmpty = false;
- m_firstVisuallyNonEmptyLayoutCallbackPending = true;
clearScrollAnchor();
m_viewportConstrainedObjects.clear();
m_layoutSubtreeRootList.clear();
@@ -1067,6 +1066,11 @@ void FrameView::layout()
layoutView()->assertSubtreeIsLaidOut();
#endif
+ // Ensure that we become visually non-empty eventually.
+ // TODO(esprehn): This should check isRenderingReady() instead.
+ if (!frame().document()->parsing() && frame().loader().stateMachine()->committedFirstRealDocumentLoad())
+ m_isVisuallyNonEmpty = true;
+
// FIXME: It should be not possible to remove the FrameView from the frame/page during layout
// however m_inPerformLayout is not set for most of this function, so none of our RELEASE_ASSERTS
// in LocalFrame/Page will fire. One of the post-layout tasks is disconnecting the LocalFrame from
@@ -1970,19 +1974,6 @@ void FrameView::performPostLayoutTasks()
m_frame->selection().updateAppearance();
ASSERT(m_frame->document());
- if (m_nestedLayoutCount <= 1) {
- // Ensure that we always send this eventually.
- if (!m_frame->document()->parsing() && m_frame->loader().stateMachine()->committedFirstRealDocumentLoad())
- m_isVisuallyNonEmpty = true;
-
- // If the layout was done with pending sheets, we are not in fact visually non-empty yet.
- if (m_isVisuallyNonEmpty && !m_frame->document()->didLayoutWithPendingStylesheets() && m_firstVisuallyNonEmptyLayoutCallbackPending) {
- m_firstVisuallyNonEmptyLayoutCallbackPending = false;
- // FIXME: This callback is probably not needed, but is currently used
- // by android for setting the background color.
- m_frame->loader().client()->dispatchDidFirstVisuallyNonEmptyLayout();
- }
- }
FontFaceSet::didLayout(*m_frame->document());
// Cursor update scheduling is done by the local root, which is the main frame if there
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698