Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 1026823002: [S.P.] Don't draw frames of animated images that are offscreen (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 1129
1130 rootForPaintInvalidation.invalidateTreeIfNeeded(rootPaintInvalidationState); 1130 rootForPaintInvalidation.invalidateTreeIfNeeded(rootPaintInvalidationState);
1131 1131
1132 // Invalidate the paint of the frameviews scrollbars if needed 1132 // Invalidate the paint of the frameviews scrollbars if needed
1133 if (hasVerticalBarDamage()) 1133 if (hasVerticalBarDamage())
1134 invalidateRect(verticalBarDamage()); 1134 invalidateRect(verticalBarDamage());
1135 if (hasHorizontalBarDamage()) 1135 if (hasHorizontalBarDamage())
1136 invalidateRect(horizontalBarDamage()); 1136 invalidateRect(horizontalBarDamage());
1137 resetScrollbarDamage(); 1137 resetScrollbarDamage();
1138 1138
1139
1140 #if ENABLE(ASSERT) 1139 #if ENABLE(ASSERT)
1141 layoutView()->assertSubtreeClearedPaintInvalidationState(); 1140 layoutView()->assertSubtreeClearedPaintInvalidationState();
1142 #endif 1141 #endif
1143 1142
1144 if (m_frame->selection().isCaretBoundsDirty()) 1143 if (m_frame->selection().isCaretBoundsDirty())
1145 m_frame->selection().invalidateCaretRect(); 1144 m_frame->selection().invalidateCaretRect();
1146 } 1145 }
1147 1146
1147 void FrameView::invalidatePaintForDelayedTargets()
1148 {
1149 layoutView()->invalidatePaintForDelayedTargets();
1150 }
1151
1148 DocumentLifecycle& FrameView::lifecycle() const 1152 DocumentLifecycle& FrameView::lifecycle() const
1149 { 1153 {
1150 return m_frame->document()->lifecycle(); 1154 return m_frame->document()->lifecycle();
1151 } 1155 }
1152 1156
1153 LayoutBox* FrameView::embeddedContentBox() const 1157 LayoutBox* FrameView::embeddedContentBox() const
1154 { 1158 {
1155 LayoutView* layoutView = this->layoutView(); 1159 LayoutView* layoutView = this->layoutView();
1156 if (!layoutView) 1160 if (!layoutView)
1157 return nullptr; 1161 return nullptr;
(...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after
2611 2615
2612 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree ().nextSibling()) { 2616 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree ().nextSibling()) {
2613 if (!child->isLocalFrame()) 2617 if (!child->isLocalFrame())
2614 continue; 2618 continue;
2615 2619
2616 toLocalFrame(child)->view()->invalidateTreeIfNeededRecursive(); 2620 toLocalFrame(child)->view()->invalidateTreeIfNeededRecursive();
2617 } 2621 }
2618 2622
2619 m_doFullPaintInvalidation = false; 2623 m_doFullPaintInvalidation = false;
2620 lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean); 2624 lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean);
2625
2626 layoutView()->invalidatePaintForDelayedTargets();
2627 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree ().nextSibling()) {
2628 if (!child->isLocalFrame())
2629 continue;
2630
2631 toLocalFrame(child)->view()->invalidatePaintForDelayedTargets();
2632 }
2621 } 2633 }
2622 2634
2623 void FrameView::enableAutoSizeMode(const IntSize& minSize, const IntSize& maxSiz e) 2635 void FrameView::enableAutoSizeMode(const IntSize& minSize, const IntSize& maxSiz e)
2624 { 2636 {
2625 if (!m_autoSizeInfo) 2637 if (!m_autoSizeInfo)
2626 m_autoSizeInfo = FrameViewAutoSizeInfo::create(this); 2638 m_autoSizeInfo = FrameViewAutoSizeInfo::create(this);
2627 2639
2628 m_autoSizeInfo->configureAutoSizeMode(minSize, maxSize); 2640 m_autoSizeInfo->configureAutoSizeMode(minSize, maxSize);
2629 setLayoutSizeFixedToFrameSize(true); 2641 setLayoutSizeFixedToFrameSize(true);
2630 setNeedsLayout(); 2642 setNeedsLayout();
(...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after
4048 { 4060 {
4049 Settings* settings = frame().settings(); 4061 Settings* settings = frame().settings();
4050 if (!settings || !settings->rootLayerScrolls()) 4062 if (!settings || !settings->rootLayerScrolls())
4051 return this; 4063 return this;
4052 4064
4053 LayoutView* layoutView = this->layoutView(); 4065 LayoutView* layoutView = this->layoutView();
4054 return layoutView ? layoutView->scrollableArea() : nullptr; 4066 return layoutView ? layoutView->scrollableArea() : nullptr;
4055 } 4067 }
4056 4068
4057 } // namespace blink 4069 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698