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 4068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4079 | 4079 |
4080 // We only throttle the rendering pipeline in cross-origin frames. This is | 4080 // We only throttle the rendering pipeline in cross-origin frames. This is |
4081 // to avoid a situation where an ancestor frame directly depends on the | 4081 // to avoid a situation where an ancestor frame directly depends on the |
4082 // pipeline timing of a descendant and breaks as a result of throttling. | 4082 // pipeline timing of a descendant and breaks as a result of throttling. |
4083 // The rationale is that cross-origin frames must already communicate with | 4083 // The rationale is that cross-origin frames must already communicate with |
4084 // asynchronous messages, so they should be able to tolerate some delay in | 4084 // asynchronous messages, so they should be able to tolerate some delay in |
4085 // receiving replies from a throttled peer. | 4085 // receiving replies from a throttled peer. |
4086 // | 4086 // |
4087 // Check if we can access our parent's security origin. | 4087 // Check if we can access our parent's security origin. |
4088 m_crossOriginForThrottling = false; | 4088 m_crossOriginForThrottling = false; |
4089 const SecurityOrigin* origin = frame().securityContext()->securityOrigin(); | 4089 const SecurityOrigin* origin = frame().securityContext()->getSecurityOrigin(
); |
4090 for (Frame* parentFrame = m_frame->tree().parent(); parentFrame; parentFrame
= parentFrame->tree().parent()) { | 4090 for (Frame* parentFrame = m_frame->tree().parent(); parentFrame; parentFrame
= parentFrame->tree().parent()) { |
4091 const SecurityOrigin* parentOrigin = parentFrame->securityContext()->sec
urityOrigin(); | 4091 const SecurityOrigin* parentOrigin = parentFrame->securityContext()->get
SecurityOrigin(); |
4092 if (!origin->canAccess(parentOrigin)) { | 4092 if (!origin->canAccess(parentOrigin)) { |
4093 m_crossOriginForThrottling = true; | 4093 m_crossOriginForThrottling = true; |
4094 break; | 4094 break; |
4095 } | 4095 } |
4096 } | 4096 } |
4097 | 4097 |
4098 bool becameUnthrottled = wasThrottled && !canThrottleRendering(); | 4098 bool becameUnthrottled = wasThrottled && !canThrottleRendering(); |
4099 if (becameUnthrottled) { | 4099 if (becameUnthrottled) { |
4100 // Start ticking animation frames again if necessary. | 4100 // Start ticking animation frames again if necessary. |
4101 page()->animator().scheduleVisualUpdate(m_frame.get()); | 4101 page()->animator().scheduleVisualUpdate(m_frame.get()); |
(...skipping 17 matching lines...) Expand all Loading... |
4119 return m_hiddenForThrottling && m_crossOriginForThrottling; | 4119 return m_hiddenForThrottling && m_crossOriginForThrottling; |
4120 } | 4120 } |
4121 | 4121 |
4122 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4122 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
4123 { | 4123 { |
4124 ASSERT(layoutView()); | 4124 ASSERT(layoutView()); |
4125 return *layoutView(); | 4125 return *layoutView(); |
4126 } | 4126 } |
4127 | 4127 |
4128 } // namespace blink | 4128 } // namespace blink |
OLD | NEW |