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 3681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3692 return ScrollBehaviorInstant; | 3692 return ScrollBehaviorInstant; |
3693 } | 3693 } |
3694 | 3694 |
3695 void FrameView::paint(GraphicsContext& context, const CullRect& cullRect) const | 3695 void FrameView::paint(GraphicsContext& context, const CullRect& cullRect) const |
3696 { | 3696 { |
3697 paint(context, GlobalPaintNormalPhase, cullRect); | 3697 paint(context, GlobalPaintNormalPhase, cullRect); |
3698 } | 3698 } |
3699 | 3699 |
3700 void FrameView::paint(GraphicsContext& context, const GlobalPaintFlags globalPai
ntFlags, const CullRect& cullRect) const | 3700 void FrameView::paint(GraphicsContext& context, const GlobalPaintFlags globalPai
ntFlags, const CullRect& cullRect) const |
3701 { | 3701 { |
3702 // TODO(skyostil): Remove this early-out in favor of painting cached scrollb
ars. | |
3703 if (shouldThrottleRendering()) | |
3704 return; | |
3705 FramePainter(*this).paint(context, globalPaintFlags, cullRect); | 3702 FramePainter(*this).paint(context, globalPaintFlags, cullRect); |
3706 } | 3703 } |
3707 | 3704 |
3708 void FrameView::paintContents(GraphicsContext& context, const GlobalPaintFlags g
lobalPaintFlags, const IntRect& damageRect) const | 3705 void FrameView::paintContents(GraphicsContext& context, const GlobalPaintFlags g
lobalPaintFlags, const IntRect& damageRect) const |
3709 { | 3706 { |
3710 if (shouldThrottleRendering()) | |
3711 return; | |
3712 FramePainter(*this).paintContents(context, globalPaintFlags, damageRect); | 3707 FramePainter(*this).paintContents(context, globalPaintFlags, damageRect); |
3713 } | 3708 } |
3714 | 3709 |
3715 bool FrameView::isPointInScrollbarCorner(const IntPoint& pointInRootFrame) | 3710 bool FrameView::isPointInScrollbarCorner(const IntPoint& pointInRootFrame) |
3716 { | 3711 { |
3717 if (!scrollbarCornerPresent()) | 3712 if (!scrollbarCornerPresent()) |
3718 return false; | 3713 return false; |
3719 | 3714 |
3720 IntPoint framePoint = convertFromRootFrame(pointInRootFrame); | 3715 IntPoint framePoint = convertFromRootFrame(pointInRootFrame); |
3721 | 3716 |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3997 const SecurityOrigin* origin = frame().securityContext()->securityOrigin(); | 3992 const SecurityOrigin* origin = frame().securityContext()->securityOrigin(); |
3998 for (Frame* parentFrame = m_frame->tree().parent(); parentFrame; parentFrame
= parentFrame->tree().parent()) { | 3993 for (Frame* parentFrame = m_frame->tree().parent(); parentFrame; parentFrame
= parentFrame->tree().parent()) { |
3999 const SecurityOrigin* parentOrigin = parentFrame->securityContext()->sec
urityOrigin(); | 3994 const SecurityOrigin* parentOrigin = parentFrame->securityContext()->sec
urityOrigin(); |
4000 if (!origin->canAccess(parentOrigin)) { | 3995 if (!origin->canAccess(parentOrigin)) { |
4001 m_crossOriginForThrottling = true; | 3996 m_crossOriginForThrottling = true; |
4002 break; | 3997 break; |
4003 } | 3998 } |
4004 } | 3999 } |
4005 | 4000 |
4006 bool becameUnthrottled = wasThrottled && !canThrottleRendering(); | 4001 bool becameUnthrottled = wasThrottled && !canThrottleRendering(); |
4007 if (becameUnthrottled) | 4002 if (becameUnthrottled) { |
4008 page()->animator().scheduleVisualUpdate(m_frame.get()); | 4003 page()->animator().scheduleVisualUpdate(m_frame.get()); |
| 4004 // Force a full repaint to make sure we regenerate any cached |
| 4005 // subsequences for this frame. |
| 4006 m_doFullPaintInvalidation = true; |
| 4007 } |
4009 } | 4008 } |
4010 | 4009 |
4011 bool FrameView::shouldThrottleRendering() const | 4010 bool FrameView::shouldThrottleRendering() const |
4012 { | 4011 { |
4013 return canThrottleRendering() && lifecycle().throttlingAllowed(); | 4012 return canThrottleRendering() && lifecycle().throttlingAllowed(); |
4014 } | 4013 } |
4015 | 4014 |
4016 bool FrameView::canThrottleRendering() const | 4015 bool FrameView::canThrottleRendering() const |
4017 { | 4016 { |
4018 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4017 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
4019 return false; | 4018 return false; |
4020 return m_hiddenForThrottling && m_crossOriginForThrottling; | 4019 return m_hiddenForThrottling && m_crossOriginForThrottling; |
4021 } | 4020 } |
4022 | 4021 |
4023 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4022 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
4024 { | 4023 { |
4025 ASSERT(layoutView()); | 4024 ASSERT(layoutView()); |
4026 return *layoutView(); | 4025 return *layoutView(); |
4027 } | 4026 } |
4028 | 4027 |
4029 } // namespace blink | 4028 } // namespace blink |
OLD | NEW |