| 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 4239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4250 // If any of our parents are throttled, we must be too. | 4250 // If any of our parents are throttled, we must be too. |
| 4251 m_subtreeThrottled = false; | 4251 m_subtreeThrottled = false; |
| 4252 const SecurityOrigin* origin = frame().securityContext()->getSecurityOrigin(
); | 4252 const SecurityOrigin* origin = frame().securityContext()->getSecurityOrigin(
); |
| 4253 for (Frame* parentFrame = m_frame->tree().parent(); parentFrame; parentFrame
= parentFrame->tree().parent()) { | 4253 for (Frame* parentFrame = m_frame->tree().parent(); parentFrame; parentFrame
= parentFrame->tree().parent()) { |
| 4254 const SecurityOrigin* parentOrigin = parentFrame->securityContext()->get
SecurityOrigin(); | 4254 const SecurityOrigin* parentOrigin = parentFrame->securityContext()->get
SecurityOrigin(); |
| 4255 if (!origin->canAccess(parentOrigin)) | 4255 if (!origin->canAccess(parentOrigin)) |
| 4256 m_crossOriginForThrottling = true; | 4256 m_crossOriginForThrottling = true; |
| 4257 if (parentFrame->isLocalFrame() && toLocalFrame(parentFrame)->view() &&
toLocalFrame(parentFrame)->view()->canThrottleRendering()) | 4257 if (parentFrame->isLocalFrame() && toLocalFrame(parentFrame)->view() &&
toLocalFrame(parentFrame)->view()->canThrottleRendering()) |
| 4258 m_subtreeThrottled = true; | 4258 m_subtreeThrottled = true; |
| 4259 } | 4259 } |
| 4260 m_frame->frameScheduler()->setFrameVisible(!m_hiddenForThrottling); |
| 4261 m_frame->frameScheduler()->setCrossOrigin(m_crossOriginForThrottling); |
| 4260 } | 4262 } |
| 4261 | 4263 |
| 4262 void FrameView::notifyRenderThrottlingObserversForTesting() | 4264 void FrameView::notifyRenderThrottlingObserversForTesting() |
| 4263 { | 4265 { |
| 4264 DCHECK(m_renderThrottlingObserverNotificationFactory->isPending()); | 4266 DCHECK(m_renderThrottlingObserverNotificationFactory->isPending()); |
| 4265 notifyRenderThrottlingObservers(); | 4267 notifyRenderThrottlingObservers(); |
| 4266 } | 4268 } |
| 4267 | 4269 |
| 4268 void FrameView::notifyRenderThrottlingObservers() | 4270 void FrameView::notifyRenderThrottlingObservers() |
| 4269 { | 4271 { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4322 } | 4324 } |
| 4323 | 4325 |
| 4324 bool FrameView::canThrottleRendering() const | 4326 bool FrameView::canThrottleRendering() const |
| 4325 { | 4327 { |
| 4326 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4328 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
| 4327 return false; | 4329 return false; |
| 4328 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4330 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4329 } | 4331 } |
| 4330 | 4332 |
| 4331 } // namespace blink | 4333 } // namespace blink |
| OLD | NEW |