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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 m_safeToPropagateScrollToParent = true; 206 m_safeToPropagateScrollToParent = true;
207 m_lastViewportSize = IntSize(); 207 m_lastViewportSize = IntSize();
208 m_lastZoomFactor = 1.0f; 208 m_lastZoomFactor = 1.0f;
209 m_isTrackingPaintInvalidations = false; 209 m_isTrackingPaintInvalidations = false;
210 m_trackedPaintInvalidationRects.clear(); 210 m_trackedPaintInvalidationRects.clear();
211 m_lastPaintTime = 0; 211 m_lastPaintTime = 0;
212 m_isPainting = false; 212 m_isPainting = false;
213 m_visuallyNonEmptyCharacterCount = 0; 213 m_visuallyNonEmptyCharacterCount = 0;
214 m_visuallyNonEmptyPixelCount = 0; 214 m_visuallyNonEmptyPixelCount = 0;
215 m_isVisuallyNonEmpty = false; 215 m_isVisuallyNonEmpty = false;
216 m_firstVisuallyNonEmptyLayoutCallbackPending = true;
217 clearScrollAnchor(); 216 clearScrollAnchor();
218 m_viewportConstrainedObjects.clear(); 217 m_viewportConstrainedObjects.clear();
219 m_layoutSubtreeRootList.clear(); 218 m_layoutSubtreeRootList.clear();
220 } 219 }
221 220
222 void FrameView::removeFromAXObjectCache() 221 void FrameView::removeFromAXObjectCache()
223 { 222 {
224 if (AXObjectCache* cache = axObjectCache()) { 223 if (AXObjectCache* cache = axObjectCache()) {
225 cache->remove(this); 224 cache->remove(this);
226 cache->childrenChanged(m_frame->pagePopupOwner()); 225 cache->childrenChanged(m_frame->pagePopupOwner());
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 1059
1061 m_nestedLayoutCount--; 1060 m_nestedLayoutCount--;
1062 if (m_nestedLayoutCount) 1061 if (m_nestedLayoutCount)
1063 return; 1062 return;
1064 1063
1065 #if ENABLE(ASSERT) 1064 #if ENABLE(ASSERT)
1066 // Post-layout assert that nobody was re-marked as needing layout during lay out. 1065 // Post-layout assert that nobody was re-marked as needing layout during lay out.
1067 layoutView()->assertSubtreeIsLaidOut(); 1066 layoutView()->assertSubtreeIsLaidOut();
1068 #endif 1067 #endif
1069 1068
1069 // Ensure that we become visually non-empty eventually.
1070 // TODO(esprehn): This should check isRenderingReady() instead.
1071 if (!frame().document()->parsing() && frame().loader().stateMachine()->commi ttedFirstRealDocumentLoad())
1072 m_isVisuallyNonEmpty = true;
1073
1070 // FIXME: It should be not possible to remove the FrameView from the frame/p age during layout 1074 // FIXME: It should be not possible to remove the FrameView from the frame/p age during layout
1071 // however m_inPerformLayout is not set for most of this function, so none o f our RELEASE_ASSERTS 1075 // however m_inPerformLayout is not set for most of this function, so none o f our RELEASE_ASSERTS
1072 // in LocalFrame/Page will fire. One of the post-layout tasks is disconnecti ng the LocalFrame from 1076 // in LocalFrame/Page will fire. One of the post-layout tasks is disconnecti ng the LocalFrame from
1073 // the page in fast/frames/crash-remove-iframe-during-object-beforeload-2.ht ml 1077 // the page in fast/frames/crash-remove-iframe-during-object-beforeload-2.ht ml
1074 // necessitating this check here. 1078 // necessitating this check here.
1075 // ASSERT(frame()->page()); 1079 // ASSERT(frame()->page());
1076 if (frame().page()) 1080 if (frame().page())
1077 frame().page()->chromeClient().layoutUpdated(m_frame.get()); 1081 frame().page()->chromeClient().layoutUpdated(m_frame.get());
1078 1082
1079 frame().document()->layoutUpdated(); 1083 frame().document()->layoutUpdated();
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
1963 ASSERT(!isInPerformLayout()); // Always before or after performLayout(), par t of the highest-level layout() call. 1967 ASSERT(!isInPerformLayout()); // Always before or after performLayout(), par t of the highest-level layout() call.
1964 TRACE_EVENT0("blink,benchmark", "FrameView::performPostLayoutTasks"); 1968 TRACE_EVENT0("blink,benchmark", "FrameView::performPostLayoutTasks");
1965 RefPtrWillBeRawPtr<FrameView> protect(this); 1969 RefPtrWillBeRawPtr<FrameView> protect(this);
1966 1970
1967 m_postLayoutTasksTimer.stop(); 1971 m_postLayoutTasksTimer.stop();
1968 1972
1969 m_frame->selection().setCaretRectNeedsUpdate(); 1973 m_frame->selection().setCaretRectNeedsUpdate();
1970 m_frame->selection().updateAppearance(); 1974 m_frame->selection().updateAppearance();
1971 1975
1972 ASSERT(m_frame->document()); 1976 ASSERT(m_frame->document());
1973 if (m_nestedLayoutCount <= 1) {
1974 // Ensure that we always send this eventually.
1975 if (!m_frame->document()->parsing() && m_frame->loader().stateMachine()- >committedFirstRealDocumentLoad())
1976 m_isVisuallyNonEmpty = true;
1977
1978 // If the layout was done with pending sheets, we are not in fact visual ly non-empty yet.
1979 if (m_isVisuallyNonEmpty && !m_frame->document()->didLayoutWithPendingSt ylesheets() && m_firstVisuallyNonEmptyLayoutCallbackPending) {
1980 m_firstVisuallyNonEmptyLayoutCallbackPending = false;
1981 // FIXME: This callback is probably not needed, but is currently use d
1982 // by android for setting the background color.
1983 m_frame->loader().client()->dispatchDidFirstVisuallyNonEmptyLayout() ;
1984 }
1985 }
1986 1977
1987 FontFaceSet::didLayout(*m_frame->document()); 1978 FontFaceSet::didLayout(*m_frame->document());
1988 // Cursor update scheduling is done by the local root, which is the main fra me if there 1979 // Cursor update scheduling is done by the local root, which is the main fra me if there
1989 // are no RemoteFrame ancestors in the frame tree. Use of localFrameRoot() i s 1980 // are no RemoteFrame ancestors in the frame tree. Use of localFrameRoot() i s
1990 // discouraged but will change when cursor update scheduling is moved from E ventHandler 1981 // discouraged but will change when cursor update scheduling is moved from E ventHandler
1991 // to PageEventHandler. 1982 // to PageEventHandler.
1992 frame().localFrameRoot()->eventHandler().scheduleCursorUpdate(); 1983 frame().localFrameRoot()->eventHandler().scheduleCursorUpdate();
1993 1984
1994 updateWidgetPositions(); 1985 updateWidgetPositions();
1995 1986
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after
3978 3969
3979 if (!graphicsLayer) 3970 if (!graphicsLayer)
3980 return; 3971 return;
3981 3972
3982 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect); 3973 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect);
3983 3974
3984 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect))); 3975 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect)));
3985 } 3976 }
3986 3977
3987 } // namespace blink 3978 } // namespace blink
OLDNEW
« 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