| 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 3137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3148 m_paintController = PaintController::create(); | 3148 m_paintController = PaintController::create(); |
| 3149 | 3149 |
| 3150 forAllNonThrottledFrameViews([](FrameView& frameView) { | 3150 forAllNonThrottledFrameViews([](FrameView& frameView) { |
| 3151 frameView.lifecycle().advanceTo(DocumentLifecycle::InPrePaint); | 3151 frameView.lifecycle().advanceTo(DocumentLifecycle::InPrePaint); |
| 3152 if (frameView.canThrottleRendering()) { | 3152 if (frameView.canThrottleRendering()) { |
| 3153 // This frame can be throttled but not throttled, meaning we are not in an | 3153 // This frame can be throttled but not throttled, meaning we are not in an |
| 3154 // AllowThrottlingScope. Now this frame may contain dirty paint flags, and | 3154 // AllowThrottlingScope. Now this frame may contain dirty paint flags, and |
| 3155 // we need to propagate the flags into the ancestor chain so that | 3155 // we need to propagate the flags into the ancestor chain so that |
| 3156 // PrePaintTreeWalk can reach this frame. | 3156 // PrePaintTreeWalk can reach this frame. |
| 3157 frameView.setNeedsPaintPropertyUpdate(); | 3157 frameView.setNeedsPaintPropertyUpdate(); |
| 3158 if (auto owner = frameView.frame().ownerLayoutItem()) |
| 3159 owner.setMayNeedPaintInvalidation(); |
| 3158 } | 3160 } |
| 3159 }); | 3161 }); |
| 3160 | 3162 |
| 3161 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { | 3163 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { |
| 3162 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.PrePaint.UpdateTime"); | 3164 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.PrePaint.UpdateTime"); |
| 3163 PrePaintTreeWalk(geometryMapper()).walk(*this); | 3165 PrePaintTreeWalk(geometryMapper()).walk(*this); |
| 3164 } | 3166 } |
| 3165 | 3167 |
| 3166 forAllNonThrottledFrameViews([](FrameView& frameView) { | 3168 forAllNonThrottledFrameViews([](FrameView& frameView) { |
| 3167 frameView.lifecycle().advanceTo(DocumentLifecycle::PrePaintClean); | 3169 frameView.lifecycle().advanceTo(DocumentLifecycle::PrePaintClean); |
| (...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4972 // so they should be able to tolerate some delay in receiving replies from a | 4974 // so they should be able to tolerate some delay in receiving replies from a |
| 4973 // throttled peer. | 4975 // throttled peer. |
| 4974 return m_hiddenForThrottling && m_frame->isCrossOriginSubframe(); | 4976 return m_hiddenForThrottling && m_frame->isCrossOriginSubframe(); |
| 4975 } | 4977 } |
| 4976 | 4978 |
| 4977 void FrameView::beginLifecycleUpdates() { | 4979 void FrameView::beginLifecycleUpdates() { |
| 4978 // Avoid pumping frames for the initially empty document. | 4980 // Avoid pumping frames for the initially empty document. |
| 4979 if (!frame().loader().stateMachine()->committedFirstRealDocumentLoad()) | 4981 if (!frame().loader().stateMachine()->committedFirstRealDocumentLoad()) |
| 4980 return; | 4982 return; |
| 4981 m_lifecycleUpdatesThrottled = false; | 4983 m_lifecycleUpdatesThrottled = false; |
| 4984 if (auto owner = frame().ownerLayoutItem()) |
| 4985 owner.setMayNeedPaintInvalidation(); |
| 4982 setupRenderThrottling(); | 4986 setupRenderThrottling(); |
| 4983 updateRenderThrottlingStatus(m_hiddenForThrottling, m_subtreeThrottled); | 4987 updateRenderThrottlingStatus(m_hiddenForThrottling, m_subtreeThrottled); |
| 4984 // The compositor will "defer commits" for the main frame until we | 4988 // The compositor will "defer commits" for the main frame until we |
| 4985 // explicitly request them. | 4989 // explicitly request them. |
| 4986 if (frame().isMainFrame()) | 4990 if (frame().isMainFrame()) |
| 4987 frame().page()->chromeClient().beginLifecycleUpdates(); | 4991 frame().page()->chromeClient().beginLifecycleUpdates(); |
| 4988 } | 4992 } |
| 4989 | 4993 |
| 4990 void FrameView::setInitialViewportSize(const IntSize& viewportSize) { | 4994 void FrameView::setInitialViewportSize(const IntSize& viewportSize) { |
| 4991 if (viewportSize == m_initialViewportSize) | 4995 if (viewportSize == m_initialViewportSize) |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5260 void FrameView::setAnimationHost( | 5264 void FrameView::setAnimationHost( |
| 5261 std::unique_ptr<CompositorAnimationHost> host) { | 5265 std::unique_ptr<CompositorAnimationHost> host) { |
| 5262 m_animationHost = std::move(host); | 5266 m_animationHost = std::move(host); |
| 5263 } | 5267 } |
| 5264 | 5268 |
| 5265 LayoutUnit FrameView::caretWidth() const { | 5269 LayoutUnit FrameView::caretWidth() const { |
| 5266 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); | 5270 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); |
| 5267 } | 5271 } |
| 5268 | 5272 |
| 5269 } // namespace blink | 5273 } // namespace blink |
| OLD | NEW |