| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 #include "platform/ScriptForbiddenScope.h" | 85 #include "platform/ScriptForbiddenScope.h" |
| 86 #include "platform/TraceEvent.h" | 86 #include "platform/TraceEvent.h" |
| 87 #include "platform/TracedValue.h" | 87 #include "platform/TracedValue.h" |
| 88 #include "platform/fonts/FontCache.h" | 88 #include "platform/fonts/FontCache.h" |
| 89 #include "platform/geometry/DoubleRect.h" | 89 #include "platform/geometry/DoubleRect.h" |
| 90 #include "platform/geometry/FloatRect.h" | 90 #include "platform/geometry/FloatRect.h" |
| 91 #include "platform/geometry/LayoutRect.h" | 91 #include "platform/geometry/LayoutRect.h" |
| 92 #include "platform/graphics/GraphicsContext.h" | 92 #include "platform/graphics/GraphicsContext.h" |
| 93 #include "platform/graphics/GraphicsLayer.h" | 93 #include "platform/graphics/GraphicsLayer.h" |
| 94 #include "platform/graphics/GraphicsLayerDebugInfo.h" | 94 #include "platform/graphics/GraphicsLayerDebugInfo.h" |
| 95 #include "platform/graphics/paint/CullRect.h" |
| 95 #include "platform/graphics/paint/PaintController.h" | 96 #include "platform/graphics/paint/PaintController.h" |
| 96 #include "platform/scheduler/CancellableTaskFactory.h" | 97 #include "platform/scheduler/CancellableTaskFactory.h" |
| 97 #include "platform/scroll/ScrollAnimator.h" | 98 #include "platform/scroll/ScrollAnimator.h" |
| 98 #include "platform/text/TextStream.h" | 99 #include "platform/text/TextStream.h" |
| 99 #include "public/platform/WebDisplayItemList.h" | 100 #include "public/platform/WebDisplayItemList.h" |
| 100 #include "public/platform/WebFrameScheduler.h" | 101 #include "public/platform/WebFrameScheduler.h" |
| 101 #include "wtf/CurrentTime.h" | 102 #include "wtf/CurrentTime.h" |
| 102 #include "wtf/StdLibExtras.h" | 103 #include "wtf/StdLibExtras.h" |
| 103 #include "wtf/TemporaryChange.h" | 104 #include "wtf/TemporaryChange.h" |
| 104 | 105 |
| (...skipping 3648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3753 ScrollBehavior FrameView::scrollBehaviorStyle() const | 3754 ScrollBehavior FrameView::scrollBehaviorStyle() const |
| 3754 { | 3755 { |
| 3755 Element* scrollElement = m_frame->document()->scrollingElement(); | 3756 Element* scrollElement = m_frame->document()->scrollingElement(); |
| 3756 LayoutObject* layoutObject = scrollElement ? scrollElement->layoutObject() :
nullptr; | 3757 LayoutObject* layoutObject = scrollElement ? scrollElement->layoutObject() :
nullptr; |
| 3757 if (layoutObject && layoutObject->style()->scrollBehavior() == ScrollBehavio
rSmooth) | 3758 if (layoutObject && layoutObject->style()->scrollBehavior() == ScrollBehavio
rSmooth) |
| 3758 return ScrollBehaviorSmooth; | 3759 return ScrollBehaviorSmooth; |
| 3759 | 3760 |
| 3760 return ScrollBehaviorInstant; | 3761 return ScrollBehaviorInstant; |
| 3761 } | 3762 } |
| 3762 | 3763 |
| 3763 void FrameView::paint(GraphicsContext* context, const IntRect& rect) const | 3764 void FrameView::paint(GraphicsContext* context, const CullRect& cullRect) const |
| 3764 { | 3765 { |
| 3765 paint(context, GlobalPaintNormalPhase, rect); | 3766 paint(context, GlobalPaintNormalPhase, cullRect); |
| 3766 } | 3767 } |
| 3767 | 3768 |
| 3768 void FrameView::paint(GraphicsContext* context, const GlobalPaintFlags globalPai
ntFlags, const IntRect& rect) const | 3769 void FrameView::paint(GraphicsContext* context, const GlobalPaintFlags globalPai
ntFlags, const CullRect& cullRect) const |
| 3769 { | 3770 { |
| 3770 // TODO(skyostil): Remove this early-out in favor of painting cached scrollb
ars. | 3771 // TODO(skyostil): Remove this early-out in favor of painting cached scrollb
ars. |
| 3771 if (shouldThrottleRendering()) | 3772 if (shouldThrottleRendering()) |
| 3772 return; | 3773 return; |
| 3773 FramePainter(*this).paint(context, globalPaintFlags, rect); | 3774 FramePainter(*this).paint(context, globalPaintFlags, cullRect); |
| 3774 } | 3775 } |
| 3775 | 3776 |
| 3776 void FrameView::paintContents(GraphicsContext* context, const GlobalPaintFlags g
lobalPaintFlags, const IntRect& damageRect) const | 3777 void FrameView::paintContents(GraphicsContext* context, const GlobalPaintFlags g
lobalPaintFlags, const IntRect& damageRect) const |
| 3777 { | 3778 { |
| 3778 if (shouldThrottleRendering()) | 3779 if (shouldThrottleRendering()) |
| 3779 return; | 3780 return; |
| 3780 FramePainter(*this).paintContents(context, globalPaintFlags, damageRect); | 3781 FramePainter(*this).paintContents(context, globalPaintFlags, damageRect); |
| 3781 } | 3782 } |
| 3782 | 3783 |
| 3783 bool FrameView::isPointInScrollbarCorner(const IntPoint& windowPoint) | 3784 bool FrameView::isPointInScrollbarCorner(const IntPoint& windowPoint) |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4078 } | 4079 } |
| 4079 | 4080 |
| 4080 bool FrameView::canThrottleRendering() const | 4081 bool FrameView::canThrottleRendering() const |
| 4081 { | 4082 { |
| 4082 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4083 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
| 4083 return false; | 4084 return false; |
| 4084 return m_hiddenForThrottling && m_crossOriginForThrottling; | 4085 return m_hiddenForThrottling && m_crossOriginForThrottling; |
| 4085 } | 4086 } |
| 4086 | 4087 |
| 4087 } // namespace blink | 4088 } // namespace blink |
| OLD | NEW |