| 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 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2511 // This must be called from the root frame, since it recurses down, not up. | 2511 // This must be called from the root frame, since it recurses down, not up. |
| 2512 // Otherwise the lifecycles of the frames might be out of sync. | 2512 // Otherwise the lifecycles of the frames might be out of sync. |
| 2513 DCHECK(m_frame->isLocalRoot()); | 2513 DCHECK(m_frame->isLocalRoot()); |
| 2514 | 2514 |
| 2515 // Only the following target states are supported. | 2515 // Only the following target states are supported. |
| 2516 DCHECK(targetState == DocumentLifecycle::LayoutClean | 2516 DCHECK(targetState == DocumentLifecycle::LayoutClean |
| 2517 || targetState == DocumentLifecycle::CompositingClean | 2517 || targetState == DocumentLifecycle::CompositingClean |
| 2518 || targetState == DocumentLifecycle::PrePaintClean | 2518 || targetState == DocumentLifecycle::PrePaintClean |
| 2519 || targetState == DocumentLifecycle::PaintClean); | 2519 || targetState == DocumentLifecycle::PaintClean); |
| 2520 | 2520 |
| 2521 if (!m_frame->document()->isActive()) |
| 2522 return; |
| 2523 |
| 2521 TemporaryChange<DocumentLifecycle::LifecycleState> targetStateScope(m_curren
tUpdateLifecyclePhasesTargetState, targetState); | 2524 TemporaryChange<DocumentLifecycle::LifecycleState> targetStateScope(m_curren
tUpdateLifecyclePhasesTargetState, targetState); |
| 2522 | 2525 |
| 2523 if (shouldThrottleRendering()) { | 2526 if (shouldThrottleRendering()) { |
| 2524 updateViewportIntersectionsForSubtree(std::min(targetState, DocumentLife
cycle::CompositingClean)); | 2527 updateViewportIntersectionsForSubtree(std::min(targetState, DocumentLife
cycle::CompositingClean)); |
| 2525 return; | 2528 return; |
| 2526 } | 2529 } |
| 2527 | 2530 |
| 2528 updateStyleAndLayoutIfNeededRecursive(); | 2531 updateStyleAndLayoutIfNeededRecursive(); |
| 2529 DCHECK(lifecycle().state() >= DocumentLifecycle::LayoutClean); | 2532 DCHECK(lifecycle().state() >= DocumentLifecycle::LayoutClean); |
| 2530 | 2533 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2676 } | 2679 } |
| 2677 | 2680 |
| 2678 void FrameView::updateStyleAndLayoutIfNeededRecursive() | 2681 void FrameView::updateStyleAndLayoutIfNeededRecursive() |
| 2679 { | 2682 { |
| 2680 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.StyleAndLayout.UpdateTime"); | 2683 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.StyleAndLayout.UpdateTime"); |
| 2681 updateStyleAndLayoutIfNeededRecursiveInternal(); | 2684 updateStyleAndLayoutIfNeededRecursiveInternal(); |
| 2682 } | 2685 } |
| 2683 | 2686 |
| 2684 void FrameView::updateStyleAndLayoutIfNeededRecursiveInternal() | 2687 void FrameView::updateStyleAndLayoutIfNeededRecursiveInternal() |
| 2685 { | 2688 { |
| 2686 if (shouldThrottleRendering()) | 2689 if (shouldThrottleRendering() || !m_frame->document()->isActive()) |
| 2687 return; | 2690 return; |
| 2688 | 2691 |
| 2689 ScopedFrameBlamer frameBlamer(m_frame); | 2692 ScopedFrameBlamer frameBlamer(m_frame); |
| 2690 TRACE_EVENT0("blink", "FrameView::updateStyleAndLayoutIfNeededRecursive"); | 2693 TRACE_EVENT0("blink", "FrameView::updateStyleAndLayoutIfNeededRecursive"); |
| 2691 | 2694 |
| 2692 // We have to crawl our entire subtree looking for any FrameViews that need | 2695 // We have to crawl our entire subtree looking for any FrameViews that need |
| 2693 // layout and make sure they are up to date. | 2696 // layout and make sure they are up to date. |
| 2694 // Mac actually tests for intersection with the dirty region and tries not t
o | 2697 // Mac actually tests for intersection with the dirty region and tries not t
o |
| 2695 // update layout for frames that are outside the dirty region. Not only doe
s this seem | 2698 // update layout for frames that are outside the dirty region. Not only doe
s this seem |
| 2696 // pointless (since those frames will have set a zero timer to layout anyway
), but | 2699 // pointless (since those frames will have set a zero timer to layout anyway
), but |
| (...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4264 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4267 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4265 } | 4268 } |
| 4266 | 4269 |
| 4267 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4270 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
| 4268 { | 4271 { |
| 4269 ASSERT(!layoutViewItem().isNull()); | 4272 ASSERT(!layoutViewItem().isNull()); |
| 4270 return *layoutView(); | 4273 return *layoutView(); |
| 4271 } | 4274 } |
| 4272 | 4275 |
| 4273 } // namespace blink | 4276 } // namespace blink |
| OLD | NEW |