| 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 2421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2432 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF
rame())); | 2432 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF
rame())); |
| 2433 | 2433 |
| 2434 LayoutView* view = layoutView(); | 2434 LayoutView* view = layoutView(); |
| 2435 ASSERT(view); | 2435 ASSERT(view); |
| 2436 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle(
).advanceTo(DocumentLifecycle::InPaint); }); | 2436 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle(
).advanceTo(DocumentLifecycle::InPaint); }); |
| 2437 | 2437 |
| 2438 // A null graphics layer can occur for painting of SVG images that are not p
arented into the main frame tree, | 2438 // A null graphics layer can occur for painting of SVG images that are not p
arented into the main frame tree, |
| 2439 // or when the FrameView is the main frame view of a page overlay. The page
overlay is in the layer tree of | 2439 // or when the FrameView is the main frame view of a page overlay. The page
overlay is in the layer tree of |
| 2440 // the host page and will be painted during synchronized painting of the hos
t page. | 2440 // the host page and will be painted during synchronized painting of the hos
t page. |
| 2441 if (GraphicsLayer* rootGraphicsLayer = view->compositor()->rootGraphicsLayer
()) { | 2441 if (GraphicsLayer* rootGraphicsLayer = view->compositor()->rootGraphicsLayer
()) { |
| 2442 // Find the real root GraphicsLayer because we also need to paint layers
not under the root graphics layer of | |
| 2443 // the LayoutView, e.g. scrollbar layers created by PaintLayerCompositor
and VisualViewport. | |
| 2444 // We could ask PaintLayerCompositor and VisualViewport for the real roo
t GraphicsLayer, but the following loop | |
| 2445 // has the least dependency to those things which might change for slimm
ing paint v2. | |
| 2446 while (GraphicsLayer* parent = rootGraphicsLayer->parent()) | |
| 2447 rootGraphicsLayer = parent; | |
| 2448 synchronizedPaintRecursively(rootGraphicsLayer); | 2442 synchronizedPaintRecursively(rootGraphicsLayer); |
| 2449 } | 2443 } |
| 2444 if (GraphicsLayer* layerForHorizontalScrollbar = view->compositor()->layerFo
rHorizontalScrollbar()) { |
| 2445 synchronizedPaintRecursively(layerForHorizontalScrollbar); |
| 2446 } |
| 2447 if (GraphicsLayer* layerForVerticalScrollbar = view->compositor()->layerForV
erticalScrollbar()) { |
| 2448 synchronizedPaintRecursively(layerForVerticalScrollbar); |
| 2449 } |
| 2450 if (GraphicsLayer* layerForScrollCorner = view->compositor()->layerForScroll
Corner()) { |
| 2451 synchronizedPaintRecursively(layerForScrollCorner); |
| 2452 } |
| 2450 | 2453 |
| 2451 forAllNonThrottledFrameViews([](FrameView& frameView) { | 2454 forAllNonThrottledFrameViews([](FrameView& frameView) { |
| 2452 frameView.lifecycle().advanceTo(DocumentLifecycle::PaintClean); | 2455 frameView.lifecycle().advanceTo(DocumentLifecycle::PaintClean); |
| 2453 frameView.layoutView()->layer()->clearNeedsRepaintRecursively(); | 2456 frameView.layoutView()->layer()->clearNeedsRepaintRecursively(); |
| 2454 }); | 2457 }); |
| 2455 } | 2458 } |
| 2456 | 2459 |
| 2457 void FrameView::synchronizedPaintRecursively(GraphicsLayer* graphicsLayer) | 2460 void FrameView::synchronizedPaintRecursively(GraphicsLayer* graphicsLayer) |
| 2458 { | 2461 { |
| 2459 if (graphicsLayer->drawsContent()) | 2462 if (graphicsLayer->drawsContent()) |
| (...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4006 return m_hiddenForThrottling && m_crossOriginForThrottling; | 4009 return m_hiddenForThrottling && m_crossOriginForThrottling; |
| 4007 } | 4010 } |
| 4008 | 4011 |
| 4009 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4012 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
| 4010 { | 4013 { |
| 4011 ASSERT(layoutView()); | 4014 ASSERT(layoutView()); |
| 4012 return *layoutView(); | 4015 return *layoutView(); |
| 4013 } | 4016 } |
| 4014 | 4017 |
| 4015 } // namespace blink | 4018 } // namespace blink |
| OLD | NEW |