OLD | NEW |
---|---|
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 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
962 // FIXME: It should be not possible to remove the FrameView from the frame/p age during layout | 962 // FIXME: It should be not possible to remove the FrameView from the frame/p age during layout |
963 // however m_inPerformLayout is not set for most of this function, so none o f our RELEASE_ASSERTS | 963 // however m_inPerformLayout is not set for most of this function, so none o f our RELEASE_ASSERTS |
964 // in LocalFrame/Page will fire. One of the post-layout tasks is disconnecti ng the LocalFrame from | 964 // in LocalFrame/Page will fire. One of the post-layout tasks is disconnecti ng the LocalFrame from |
965 // the page in fast/frames/crash-remove-iframe-during-object-beforeload-2.ht ml | 965 // the page in fast/frames/crash-remove-iframe-during-object-beforeload-2.ht ml |
966 // necessitating this check here. | 966 // necessitating this check here. |
967 // ASSERT(frame()->page()); | 967 // ASSERT(frame()->page()); |
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 void FrameView::resetFirstPaintInvalidationFlag(RenderObject* layoutRoot) | |
973 { | |
974 /* | |
975 bool isTracing; | |
976 TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("blink.invalida tion"), &isTracing); | |
977 if (!isTracing) | |
kouhei (in TOK)
2014/08/21 11:20:39
FIXME: I need to limit this to only when TRACE_EVE
| |
978 return; | |
979 */ | |
980 if (!layoutRoot->enclosingLayer()->hasCompositedLayerMapping()) | |
981 return; | |
982 | |
983 if (GraphicsLayer* graphicsLayer = layoutRoot->enclosingLayer()->compositedL ayerMapping()->mainGraphicsLayer()) | |
984 graphicsLayer->resetIncludesFirstPaintInvalidationRecursive(); | |
985 } | |
986 | |
972 // The plan is to move to compositor-queried paint invalidation, in which case t his | 987 // 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 | 988 // method would setNeedsRedraw on the GraphicsLayers with invalidations and |
974 // let the compositor pick which to actually draw. | 989 // let the compositor pick which to actually draw. |
975 // See http://crbug.com/306706 | 990 // See http://crbug.com/306706 |
976 void FrameView::invalidateTreeIfNeeded() | 991 void FrameView::invalidateTreeIfNeeded() |
977 { | 992 { |
978 RenderObject* rootForPaintInvalidation = renderView(); | 993 RenderObject* rootForPaintInvalidation = renderView(); |
979 ASSERT(!rootForPaintInvalidation->needsLayout()); | 994 ASSERT(!rootForPaintInvalidation->needsLayout()); |
980 | 995 |
981 TRACE_EVENT1("blink", "FrameView::invalidateTree", "root", rootForPaintInval idation->debugName().ascii()); | 996 TRACE_EVENT1("blink", "FrameView::invalidateTree", "root", rootForPaintInval idation->debugName().ascii()); |
982 | 997 |
983 PaintInvalidationState rootPaintInvalidationState(*rootForPaintInvalidation) ; | 998 PaintInvalidationState rootPaintInvalidationState(*rootForPaintInvalidation) ; |
984 | 999 |
1000 resetFirstPaintInvalidationFlag(rootForPaintInvalidation); | |
985 rootForPaintInvalidation->invalidateTreeIfNeeded(rootPaintInvalidationState) ; | 1001 rootForPaintInvalidation->invalidateTreeIfNeeded(rootPaintInvalidationState) ; |
986 | 1002 |
987 // Invalidate the paint of the frameviews scrollbars if needed | 1003 // Invalidate the paint of the frameviews scrollbars if needed |
988 if (hasVerticalBarDamage()) | 1004 if (hasVerticalBarDamage()) |
989 invalidateRect(verticalBarDamage()); | 1005 invalidateRect(verticalBarDamage()); |
990 if (hasHorizontalBarDamage()) | 1006 if (hasHorizontalBarDamage()) |
991 invalidateRect(horizontalBarDamage()); | 1007 invalidateRect(horizontalBarDamage()); |
992 resetScrollbarDamage(); | 1008 resetScrollbarDamage(); |
993 | 1009 |
994 m_doFullPaintInvalidation = false; | 1010 m_doFullPaintInvalidation = false; |
(...skipping 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3131 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) | 3147 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) |
3132 { | 3148 { |
3133 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3149 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
3134 if (AXObjectCache* cache = axObjectCache()) { | 3150 if (AXObjectCache* cache = axObjectCache()) { |
3135 cache->remove(scrollbar); | 3151 cache->remove(scrollbar); |
3136 cache->handleScrollbarUpdate(this); | 3152 cache->handleScrollbarUpdate(this); |
3137 } | 3153 } |
3138 } | 3154 } |
3139 | 3155 |
3140 } // namespace blink | 3156 } // namespace blink |
OLD | NEW |