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

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

Issue 1224893004: Turn FrameView's paintBehavior into a real global (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Improved change after the reviews. Still fails on Android. Created 5 years, 5 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
« no previous file with comments | « no previous file | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
(...skipping 11 matching lines...) Expand all
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/CoreExport.h" 28 #include "core/CoreExport.h"
29 #include "core/frame/FrameViewAutoSizeInfo.h" 29 #include "core/frame/FrameViewAutoSizeInfo.h"
30 #include "core/frame/RootFrameViewport.h" 30 #include "core/frame/RootFrameViewport.h"
31 #include "core/layout/LayoutAnalyzer.h" 31 #include "core/layout/LayoutAnalyzer.h"
32 #include "core/paint/PaintPhase.h"
33 #include "platform/RuntimeEnabledFeatures.h" 32 #include "platform/RuntimeEnabledFeatures.h"
34 #include "platform/Widget.h" 33 #include "platform/Widget.h"
35 #include "platform/geometry/IntRect.h" 34 #include "platform/geometry/IntRect.h"
36 #include "platform/geometry/LayoutRect.h" 35 #include "platform/geometry/LayoutRect.h"
37 #include "platform/graphics/Color.h" 36 #include "platform/graphics/Color.h"
38 #include "platform/scroll/ScrollTypes.h" 37 #include "platform/scroll/ScrollTypes.h"
39 #include "platform/scroll/ScrollableArea.h" 38 #include "platform/scroll/ScrollableArea.h"
40 #include "platform/scroll/Scrollbar.h" 39 #include "platform/scroll/Scrollbar.h"
41 #include "public/platform/WebDisplayMode.h" 40 #include "public/platform/WebDisplayMode.h"
42 #include "public/platform/WebRect.h" 41 #include "public/platform/WebRect.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 bool safeToPropagateScrollToParent() const { return m_safeToPropagateScrollT oParent; } 209 bool safeToPropagateScrollToParent() const { return m_safeToPropagateScrollT oParent; }
211 void setSafeToPropagateScrollToParent(bool isSafe) { m_safeToPropagateScroll ToParent = isSafe; } 210 void setSafeToPropagateScrollToParent(bool isSafe) { m_safeToPropagateScroll ToParent = isSafe; }
212 211
213 void addPart(LayoutPart*); 212 void addPart(LayoutPart*);
214 void removePart(LayoutPart*); 213 void removePart(LayoutPart*);
215 214
216 void updateWidgetPositions(); 215 void updateWidgetPositions();
217 216
218 void addPartToUpdate(LayoutEmbeddedObject&); 217 void addPartToUpdate(LayoutEmbeddedObject&);
219 218
220 void setPaintBehavior(PaintBehavior);
221 PaintBehavior paintBehavior() const;
222 void setIsPainting(bool val) { m_isPainting = val; } 219 void setIsPainting(bool val) { m_isPainting = val; }
223 bool isPainting() const; 220 bool isPainting() const;
224 void setLastPaintTime(double val) { m_lastPaintTime = val; } 221 void setLastPaintTime(double val) { m_lastPaintTime = val; }
225 bool hasEverPainted() const { return m_lastPaintTime; } 222 bool hasEverPainted() const { return m_lastPaintTime; }
226 void setNodeToDraw(Node*); 223 void setNodeToDraw(Node*);
227 Node* nodeToDraw() { return m_nodeToDraw.get(); } 224 Node* nodeToDraw() { return m_nodeToDraw.get(); }
228 225
229 Color documentBackgroundColor() const; 226 Color documentBackgroundColor() const;
230 227
231 // Run all needed lifecycle stages. After calling this method, all frames wi ll be in the lifecycle state PaintInvalidationClean. 228 // Run all needed lifecycle stages. After calling this method, all frames wi ll be in the lifecycle state PaintInvalidationClean.
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 bool m_safeToPropagateScrollToParent; 771 bool m_safeToPropagateScrollToParent;
775 772
776 double m_lastPaintTime; 773 double m_lastPaintTime;
777 774
778 bool m_isTrackingPaintInvalidations; // Used for testing. 775 bool m_isTrackingPaintInvalidations; // Used for testing.
779 776
780 // In frame coordinates. 777 // In frame coordinates.
781 Vector<IntRect> m_trackedPaintInvalidationRects; 778 Vector<IntRect> m_trackedPaintInvalidationRects;
782 779
783 RefPtrWillBeMember<Node> m_nodeToDraw; 780 RefPtrWillBeMember<Node> m_nodeToDraw;
784 PaintBehavior m_paintBehavior;
785 bool m_isPainting; 781 bool m_isPainting;
786 782
787 unsigned m_visuallyNonEmptyCharacterCount; 783 unsigned m_visuallyNonEmptyCharacterCount;
788 unsigned m_visuallyNonEmptyPixelCount; 784 unsigned m_visuallyNonEmptyPixelCount;
789 bool m_isVisuallyNonEmpty; 785 bool m_isVisuallyNonEmpty;
790 bool m_firstVisuallyNonEmptyLayoutCallbackPending; 786 bool m_firstVisuallyNonEmptyLayoutCallbackPending;
791 787
792 RefPtrWillBeMember<Node> m_maintainScrollPositionAnchor; 788 RefPtrWillBeMember<Node> m_maintainScrollPositionAnchor;
793 789
794 // layoutObject to hold our custom scroll corner. 790 // layoutObject to hold our custom scroll corner.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 static const unsigned visualPixelThreshold = 32 * 32; 871 static const unsigned visualPixelThreshold = 32 * 32;
876 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 872 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
877 setIsVisuallyNonEmpty(); 873 setIsVisuallyNonEmpty();
878 } 874 }
879 875
880 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 876 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
881 877
882 } // namespace blink 878 } // namespace blink
883 879
884 #endif // FrameView_h 880 #endif // FrameView_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698