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

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

Issue 482063005: Allow paint invalidation containers to cross frame boundaries. (re-land #2) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix. Created 6 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
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 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 if (frame().page()) 968 if (frame().page())
969 frame().page()->chrome().client().layoutUpdated(m_frame.get()); 969 frame().page()->chrome().client().layoutUpdated(m_frame.get());
970 } 970 }
971 971
972 // The plan is to move to compositor-queried paint invalidation, in which case t his 972 // The plan is to move to compositor-queried paint invalidation, in which case t his
973 // method would setNeedsRedraw on the GraphicsLayers with invalidations and 973 // method would setNeedsRedraw on the GraphicsLayers with invalidations and
974 // let the compositor pick which to actually draw. 974 // let the compositor pick which to actually draw.
975 // See http://crbug.com/306706 975 // See http://crbug.com/306706
976 void FrameView::invalidateTreeIfNeeded() 976 void FrameView::invalidateTreeIfNeeded()
977 { 977 {
978 RenderObject* rootForPaintInvalidation = renderView(); 978 RenderView& rootForPaintInvalidation = *renderView();
979 ASSERT(!rootForPaintInvalidation->needsLayout()); 979 ASSERT(!rootForPaintInvalidation.needsLayout());
980 980
981 TRACE_EVENT1("blink", "FrameView::invalidateTree", "root", rootForPaintInval idation->debugName().ascii()); 981 TRACE_EVENT1("blink", "FrameView::invalidateTree", "root", rootForPaintInval idation.debugName().ascii());
982 982
983 PaintInvalidationState rootPaintInvalidationState(*rootForPaintInvalidation) ; 983 PaintInvalidationState rootPaintInvalidationState(rootForPaintInvalidation);
984 984
985 rootForPaintInvalidation->invalidateTreeIfNeeded(rootPaintInvalidationState) ; 985 rootForPaintInvalidation.invalidateTreeIfNeeded(rootPaintInvalidationState);
986 986
987 // Invalidate the paint of the frameviews scrollbars if needed 987 // Invalidate the paint of the frameviews scrollbars if needed
988 if (hasVerticalBarDamage()) 988 if (hasVerticalBarDamage())
989 invalidateRect(verticalBarDamage()); 989 invalidateRect(verticalBarDamage());
990 if (hasHorizontalBarDamage()) 990 if (hasHorizontalBarDamage())
991 invalidateRect(horizontalBarDamage()); 991 invalidateRect(horizontalBarDamage());
992 resetScrollbarDamage(); 992 resetScrollbarDamage();
993 993
994 m_doFullPaintInvalidation = false; 994 m_doFullPaintInvalidation = false;
995 #ifndef NDEBUG 995 #ifndef NDEBUG
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1607 { 1607 {
1608 Page* page = frame().page(); 1608 Page* page = frame().page();
1609 if (!page) 1609 if (!page)
1610 return 0; 1610 return 0;
1611 return &page->chrome(); 1611 return &page->chrome();
1612 } 1612 }
1613 1613
1614 void FrameView::contentRectangleForPaintInvalidation(const IntRect& r) 1614 void FrameView::contentRectangleForPaintInvalidation(const IntRect& r)
1615 { 1615 {
1616 ASSERT(paintInvalidationIsAllowed()); 1616 ASSERT(paintInvalidationIsAllowed());
1617 ASSERT(!m_frame->owner()); 1617 ASSERT(!m_frame->ownerRenderer());
1618 1618
1619 if (m_isTrackingPaintInvalidations) { 1619 if (m_isTrackingPaintInvalidations) {
1620 IntRect paintInvalidationRect = r; 1620 IntRect paintInvalidationRect = r;
1621 paintInvalidationRect.move(-scrollOffset()); 1621 paintInvalidationRect.move(-scrollOffset());
1622 m_trackedPaintInvalidationRects.append(paintInvalidationRect); 1622 m_trackedPaintInvalidationRects.append(paintInvalidationRect);
1623 // FIXME: http://crbug.com/368518. Eventually, invalidateContentRectangl eForPaint 1623 // FIXME: http://crbug.com/368518. Eventually, invalidateContentRectangl eForPaint
1624 // is going away entirely once all layout tests are FCM. In the short 1624 // is going away entirely once all layout tests are FCM. In the short
1625 // term, no code should be tracking non-composited FrameView paint inval idations. 1625 // term, no code should be tracking non-composited FrameView paint inval idations.
1626 RELEASE_ASSERT_NOT_REACHED(); 1626 RELEASE_ASSERT_NOT_REACHED();
1627 } 1627 }
(...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after
3131 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3131 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3132 { 3132 {
3133 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3133 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3134 if (AXObjectCache* cache = axObjectCache()) { 3134 if (AXObjectCache* cache = axObjectCache()) {
3135 cache->remove(scrollbar); 3135 cache->remove(scrollbar);
3136 cache->handleScrollbarUpdate(this); 3136 cache->handleScrollbarUpdate(this);
3137 } 3137 }
3138 } 3138 }
3139 3139
3140 } // namespace blink 3140 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/repaint/repaint-in-iframe-expected.txt ('k') | Source/core/rendering/PaintInvalidationState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698