| 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 4221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4232 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree
().nextSibling()) { | 4232 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree
().nextSibling()) { |
| 4233 if (!child->isLocalFrame()) | 4233 if (!child->isLocalFrame()) |
| 4234 continue; | 4234 continue; |
| 4235 if (FrameView* view = toLocalFrame(child)->view()) | 4235 if (FrameView* view = toLocalFrame(child)->view()) |
| 4236 view->updateViewportIntersectionsForSubtree(targetState); | 4236 view->updateViewportIntersectionsForSubtree(targetState); |
| 4237 } | 4237 } |
| 4238 } | 4238 } |
| 4239 | 4239 |
| 4240 void FrameView::updateThrottlingStatus() | 4240 void FrameView::updateThrottlingStatus() |
| 4241 { | 4241 { |
| 4242 // Only offscreen frames can be throttled. | 4242 // Only offscreen frames can be throttled. Note that we disallow throttling |
| 4243 // of 0x0 frames because some sites use them to drive UI logic. |
| 4243 DCHECK(m_viewportIntersectionValid); | 4244 DCHECK(m_viewportIntersectionValid); |
| 4244 m_hiddenForThrottling = m_viewportIntersection.isEmpty(); | 4245 m_hiddenForThrottling = m_viewportIntersection.isEmpty() && !frameRect().isE
mpty(); |
| 4245 | 4246 |
| 4246 // We only throttle the rendering pipeline in cross-origin frames. This is | 4247 // We only throttle the rendering pipeline in cross-origin frames. This is |
| 4247 // to avoid a situation where an ancestor frame directly depends on the | 4248 // to avoid a situation where an ancestor frame directly depends on the |
| 4248 // pipeline timing of a descendant and breaks as a result of throttling. | 4249 // pipeline timing of a descendant and breaks as a result of throttling. |
| 4249 // The rationale is that cross-origin frames must already communicate with | 4250 // The rationale is that cross-origin frames must already communicate with |
| 4250 // asynchronous messages, so they should be able to tolerate some delay in | 4251 // asynchronous messages, so they should be able to tolerate some delay in |
| 4251 // receiving replies from a throttled peer. | 4252 // receiving replies from a throttled peer. |
| 4252 // | 4253 // |
| 4253 // Check if we can access our parent's security origin. | 4254 // Check if we can access our parent's security origin. |
| 4254 m_crossOriginForThrottling = false; | 4255 m_crossOriginForThrottling = false; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4329 } | 4330 } |
| 4330 | 4331 |
| 4331 bool FrameView::canThrottleRendering() const | 4332 bool FrameView::canThrottleRendering() const |
| 4332 { | 4333 { |
| 4333 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4334 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
| 4334 return false; | 4335 return false; |
| 4335 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4336 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4336 } | 4337 } |
| 4337 | 4338 |
| 4338 } // namespace blink | 4339 } // namespace blink |
| OLD | NEW |