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

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: Made it work with position:fixed. 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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
1605 { 1605 {
1606 Page* page = frame().page(); 1606 Page* page = frame().page();
1607 if (!page) 1607 if (!page)
1608 return 0; 1608 return 0;
1609 return &page->chrome(); 1609 return &page->chrome();
1610 } 1610 }
1611 1611
1612 void FrameView::contentRectangleForPaintInvalidation(const IntRect& r) 1612 void FrameView::contentRectangleForPaintInvalidation(const IntRect& r)
1613 { 1613 {
1614 ASSERT(paintInvalidationIsAllowed()); 1614 ASSERT(paintInvalidationIsAllowed());
1615 ASSERT(!m_frame->owner()); 1615 ASSERT(!m_frame->ownerRenderer());
1616 1616
1617 if (m_isTrackingPaintInvalidations) { 1617 if (m_isTrackingPaintInvalidations) {
1618 IntRect paintInvalidationRect = r; 1618 IntRect paintInvalidationRect = r;
1619 paintInvalidationRect.move(-scrollOffset()); 1619 paintInvalidationRect.move(-scrollOffset());
1620 m_trackedPaintInvalidationRects.append(paintInvalidationRect); 1620 m_trackedPaintInvalidationRects.append(paintInvalidationRect);
1621 // FIXME: http://crbug.com/368518. Eventually, invalidateContentRectangl eForPaint 1621 // FIXME: http://crbug.com/368518. Eventually, invalidateContentRectangl eForPaint
1622 // is going away entirely once all layout tests are FCM. In the short 1622 // is going away entirely once all layout tests are FCM. In the short
1623 // term, no code should be tracking non-composited FrameView paint inval idations. 1623 // term, no code should be tracking non-composited FrameView paint inval idations.
1624 RELEASE_ASSERT_NOT_REACHED(); 1624 RELEASE_ASSERT_NOT_REACHED();
1625 } 1625 }
(...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after
3129 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3129 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3130 { 3130 {
3131 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3131 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3132 if (AXObjectCache* cache = axObjectCache()) { 3132 if (AXObjectCache* cache = axObjectCache()) {
3133 cache->remove(scrollbar); 3133 cache->remove(scrollbar);
3134 cache->handleScrollbarUpdate(this); 3134 cache->handleScrollbarUpdate(this);
3135 } 3135 }
3136 } 3136 }
3137 3137
3138 } // namespace blink 3138 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698