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

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

Issue 698743002: [WIP] Adding support for <iframe>s to slimming paint. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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) 1997 Martin Jones (mjones@kde.org) 2 Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 (C) 1998 Waldo Bastian (bastian@kde.org) 3 (C) 1998 Waldo Bastian (bastian@kde.org)
4 (C) 1998, 1999 Torben Weis (weis@kde.org) 4 (C) 1998, 1999 Torben Weis (weis@kde.org)
5 (C) 1999 Lars Knoll (knoll@kde.org) 5 (C) 1999 Lars Knoll (knoll@kde.org)
6 (C) 1999 Antti Koivisto (koivisto@kde.org) 6 (C) 1999 Antti Koivisto (koivisto@kde.org)
7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
11 License as published by the Free Software Foundation; either 11 License as published by the Free Software Foundation; either
12 version 2 of the License, or (at your option) any later version. 12 version 2 of the License, or (at your option) any later version.
13 13
14 This library is distributed in the hope that it will be useful, 14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Library General Public License for more details. 17 Library General Public License for more details.
18 18
19 You should have received a copy of the GNU Library General Public License 19 You should have received a copy of the GNU Library General Public License
20 along with this library; see the file COPYING.LIB. If not, write to 20 along with this library; see the file COPYING.LIB. If not, write to
21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110-1301, USA. 22 Boston, MA 02110-1301, USA.
23 */ 23 */
24 24
25 #ifndef FrameView_h 25 #ifndef FrameView_h
26 #define FrameView_h 26 #define FrameView_h
27 27
28 #include "core/frame/FrameViewAutoSizeInfo.h" 28 #include "core/frame/FrameViewAutoSizeInfo.h"
29 #include "core/paint/ViewDisplayList.h"
29 #include "core/rendering/PaintPhase.h" 30 #include "core/rendering/PaintPhase.h"
30 #include "platform/RuntimeEnabledFeatures.h" 31 #include "platform/RuntimeEnabledFeatures.h"
31 #include "platform/Widget.h" 32 #include "platform/Widget.h"
32 #include "platform/geometry/IntRect.h" 33 #include "platform/geometry/IntRect.h"
33 #include "platform/geometry/LayoutRect.h" 34 #include "platform/geometry/LayoutRect.h"
34 #include "platform/graphics/Color.h" 35 #include "platform/graphics/Color.h"
35 #include "platform/scroll/ScrollTypes.h" 36 #include "platform/scroll/ScrollTypes.h"
36 #include "platform/scroll/ScrollableArea.h" 37 #include "platform/scroll/ScrollableArea.h"
37 #include "platform/scroll/Scrollbar.h" 38 #include "platform/scroll/Scrollbar.h"
38 #include "wtf/Forward.h" 39 #include "wtf/Forward.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, cons t IntPoint&) const override; 511 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, cons t IntPoint&) const override;
511 512
512 virtual bool isFrameView() const override { return true; } 513 virtual bool isFrameView() const override { return true; }
513 514
514 virtual void trace(Visitor*) override; 515 virtual void trace(Visitor*) override;
515 void notifyPageThatContentAreaWillPaint() const; 516 void notifyPageThatContentAreaWillPaint() const;
516 FrameView* parentFrameView() const; 517 FrameView* parentFrameView() const;
517 518
518 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR ect& verticalOverhangRect); 519 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR ect& verticalOverhangRect);
519 520
521 ViewDisplayList& viewDisplayList()
chrishtr 2014/11/01 23:44:10 Don't inline this.
trchen 2014/11/02 10:36:46 Acknowledged.
522 {
523 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
524 ASSERT(frame().isLocalRoot());
525 if (!m_viewDisplayList)
526 m_viewDisplayList = adoptPtr(new ViewDisplayList());
527 return *m_viewDisplayList;
528 }
529
520 protected: 530 protected:
521 // Scroll the content via the compositor. 531 // Scroll the content via the compositor.
522 bool scrollContentsFastPath(const IntSize& scrollDelta); 532 bool scrollContentsFastPath(const IntSize& scrollDelta);
523 533
524 // Scroll the content by invalidating everything. 534 // Scroll the content by invalidating everything.
525 void scrollContentsSlowPath(const IntRect& updateRect); 535 void scrollContentsSlowPath(const IntRect& updateRect);
526 536
527 bool isVerticalDocument() const; 537 bool isVerticalDocument() const;
528 bool isFlippedDocument() const; 538 bool isFlippedDocument() const;
529 539
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 781
772 int m_scrollbarsAvoidingResizer; 782 int m_scrollbarsAvoidingResizer;
773 bool m_scrollbarsSuppressed; 783 bool m_scrollbarsSuppressed;
774 784
775 bool m_inUpdateScrollbars; 785 bool m_inUpdateScrollbars;
776 786
777 IntPoint m_panScrollIconPoint; 787 IntPoint m_panScrollIconPoint;
778 bool m_shouldDrawPanScrollIcon; 788 bool m_shouldDrawPanScrollIcon;
779 789
780 bool m_clipsRepaints; 790 bool m_clipsRepaints;
791
792 OwnPtr<ViewDisplayList> m_viewDisplayList;
781 }; 793 };
782 794
783 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) 795 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
784 { 796 {
785 if (m_isVisuallyNonEmpty) 797 if (m_isVisuallyNonEmpty)
786 return; 798 return;
787 m_visuallyNonEmptyCharacterCount += count; 799 m_visuallyNonEmptyCharacterCount += count;
788 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout. 800 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout.
789 // The first few hundred characters rarely contain the interesting content o f the page. 801 // The first few hundred characters rarely contain the interesting content o f the page.
790 static const unsigned visualCharacterThreshold = 200; 802 static const unsigned visualCharacterThreshold = 200;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 } 839 }
828 840
829 private: 841 private:
830 RawPtrWillBeMember<FrameView> m_view; 842 RawPtrWillBeMember<FrameView> m_view;
831 bool m_originalValue; 843 bool m_originalValue;
832 }; 844 };
833 845
834 } // namespace blink 846 } // namespace blink
835 847
836 #endif // FrameView_h 848 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698