| 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 4235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4246 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree
().nextSibling()) { | 4246 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree
().nextSibling()) { |
| 4247 if (!child->isLocalFrame()) | 4247 if (!child->isLocalFrame()) |
| 4248 continue; | 4248 continue; |
| 4249 if (FrameView* view = toLocalFrame(child)->view()) | 4249 if (FrameView* view = toLocalFrame(child)->view()) |
| 4250 view->updateViewportIntersectionsForSubtree(targetState); | 4250 view->updateViewportIntersectionsForSubtree(targetState); |
| 4251 } | 4251 } |
| 4252 } | 4252 } |
| 4253 | 4253 |
| 4254 void FrameView::updateThrottlingStatus() | 4254 void FrameView::updateThrottlingStatus() |
| 4255 { | 4255 { |
| 4256 // Only offscreen frames can be throttled. | 4256 // Only offscreen frames can be throttled. Note that we disallow throttling |
| 4257 // of 0x0 frames because some sites use them to drive UI logic. |
| 4257 DCHECK(m_viewportIntersectionValid); | 4258 DCHECK(m_viewportIntersectionValid); |
| 4258 m_hiddenForThrottling = m_viewportIntersection.isEmpty(); | 4259 m_hiddenForThrottling = m_viewportIntersection.isEmpty() && !frameRect().isE
mpty(); |
| 4259 | 4260 |
| 4260 // We only throttle the rendering pipeline in cross-origin frames. This is | 4261 // We only throttle the rendering pipeline in cross-origin frames. This is |
| 4261 // to avoid a situation where an ancestor frame directly depends on the | 4262 // to avoid a situation where an ancestor frame directly depends on the |
| 4262 // pipeline timing of a descendant and breaks as a result of throttling. | 4263 // pipeline timing of a descendant and breaks as a result of throttling. |
| 4263 // The rationale is that cross-origin frames must already communicate with | 4264 // The rationale is that cross-origin frames must already communicate with |
| 4264 // asynchronous messages, so they should be able to tolerate some delay in | 4265 // asynchronous messages, so they should be able to tolerate some delay in |
| 4265 // receiving replies from a throttled peer. | 4266 // receiving replies from a throttled peer. |
| 4266 // | 4267 // |
| 4267 // Check if we can access our parent's security origin. | 4268 // Check if we can access our parent's security origin. |
| 4268 m_crossOriginForThrottling = false; | 4269 m_crossOriginForThrottling = false; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4346 } | 4347 } |
| 4347 | 4348 |
| 4348 bool FrameView::canThrottleRendering() const | 4349 bool FrameView::canThrottleRendering() const |
| 4349 { | 4350 { |
| 4350 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4351 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
| 4351 return false; | 4352 return false; |
| 4352 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4353 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4353 } | 4354 } |
| 4354 | 4355 |
| 4355 } // namespace blink | 4356 } // namespace blink |
| OLD | NEW |