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

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 406743002: Make PaintInvalidation a DocumentLifecyle state (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
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 2808 matching lines...) Expand 10 before | Expand all | Expand 10 after
2819 m_frame->page()->scrollingCoordinator()->updateAfterCompositingChang eIfNeeded(); 2819 m_frame->page()->scrollingCoordinator()->updateAfterCompositingChang eIfNeeded();
2820 2820
2821 updateCompositedSelectionBoundsIfNeeded(); 2821 updateCompositedSelectionBoundsIfNeeded();
2822 2822
2823 InspectorInstrumentation::didUpdateLayerTree(m_frame.get()); 2823 InspectorInstrumentation::didUpdateLayerTree(m_frame.get());
2824 2824
2825 invalidateTreeIfNeededRecursive(); 2825 invalidateTreeIfNeededRecursive();
2826 } 2826 }
2827 2827
2828 scrollContentsIfNeededRecursive(); 2828 scrollContentsIfNeededRecursive();
2829 ASSERT(lifecycle().state() == DocumentLifecycle::CompositingClean); 2829 ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationClean);
2830 } 2830 }
2831 2831
2832 void FrameView::updateLayoutAndStyleIfNeededRecursive() 2832 void FrameView::updateLayoutAndStyleIfNeededRecursive()
2833 { 2833 {
2834 // We have to crawl our entire tree looking for any FrameViews that need 2834 // We have to crawl our entire tree looking for any FrameViews that need
2835 // layout and make sure they are up to date. 2835 // layout and make sure they are up to date.
2836 // Mac actually tests for intersection with the dirty region and tries not t o 2836 // Mac actually tests for intersection with the dirty region and tries not t o
2837 // update layout for frames that are outside the dirty region. Not only doe s this seem 2837 // update layout for frames that are outside the dirty region. Not only doe s this seem
2838 // pointless (since those frames will have set a zero timer to layout anyway ), but 2838 // pointless (since those frames will have set a zero timer to layout anyway ), but
2839 // it is also incorrect, since if two frames overlap, the first could be exc luded from the dirty 2839 // it is also incorrect, since if two frames overlap, the first could be exc luded from the dirty
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2875 ASSERT(!m_frame->document()->hasSVGFilterElementsRequiringLayerUpdate()); 2875 ASSERT(!m_frame->document()->hasSVGFilterElementsRequiringLayerUpdate());
2876 #if ENABLE(ASSERT) 2876 #if ENABLE(ASSERT)
2877 m_frame->document()->renderView()->assertRendererLaidOut(); 2877 m_frame->document()->renderView()->assertRendererLaidOut();
2878 #endif 2878 #endif
2879 2879
2880 } 2880 }
2881 2881
2882 void FrameView::invalidateTreeIfNeededRecursive() 2882 void FrameView::invalidateTreeIfNeededRecursive()
2883 { 2883 {
2884 // FIXME: We should be more aggressive at cutting tree traversals. 2884 // FIXME: We should be more aggressive at cutting tree traversals.
2885 lifecycle().advanceTo(DocumentLifecycle::InPaintInvalidation);
2885 invalidateTreeIfNeeded(); 2886 invalidateTreeIfNeeded();
2887 lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean);
2886 2888
2887 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree ().nextSibling()) { 2889 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree ().nextSibling()) {
2888 if (!child->isLocalFrame()) 2890 if (!child->isLocalFrame())
2889 continue; 2891 continue;
2890 2892
2891 toLocalFrame(child)->view()->invalidateTreeIfNeededRecursive(); 2893 toLocalFrame(child)->view()->invalidateTreeIfNeededRecursive();
2892 } 2894 }
2893 } 2895 }
2894 2896
2895 void FrameView::enableAutoSizeMode(bool enable, const IntSize& minSize, const In tSize& maxSize) 2897 void FrameView::enableAutoSizeMode(bool enable, const IntSize& minSize, const In tSize& maxSize)
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
3282 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3284 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3283 { 3285 {
3284 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3286 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3285 if (AXObjectCache* cache = axObjectCache()) { 3287 if (AXObjectCache* cache = axObjectCache()) {
3286 cache->remove(scrollbar); 3288 cache->remove(scrollbar);
3287 cache->handleScrollbarUpdate(this); 3289 cache->handleScrollbarUpdate(this);
3288 } 3290 }
3289 } 3291 }
3290 3292
3291 } // namespace WebCore 3293 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentLifecycle.cpp ('k') | Source/core/rendering/compositing/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698