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

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

Issue 1513573013: Don't call LayoutPart::widgetPositionsUpdated unnecessarily. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | third_party/WebKit/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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 bool isInPerformLayout() const; 120 bool isInPerformLayout() const;
121 121
122 void clearLayoutSubtreeRoot(const LayoutObject&); 122 void clearLayoutSubtreeRoot(const LayoutObject&);
123 int layoutCount() const { return m_layoutCount; } 123 int layoutCount() const { return m_layoutCount; }
124 124
125 void countObjectsNeedingLayout(unsigned& needsLayoutObjects, unsigned& total Objects, bool& isPartial); 125 void countObjectsNeedingLayout(unsigned& needsLayoutObjects, unsigned& total Objects, bool& isPartial);
126 126
127 bool needsLayout() const; 127 bool needsLayout() const;
128 void setNeedsLayout(); 128 void setNeedsLayout();
129 129
130 void setNeedsUpdateWidgetPositions() { m_needsUpdateWidgetPositions = true; } 130 void setNeedsUpdateWidgetGeometries() { m_needsUpdateWidgetGeometries = true ; }
131 131
132 // Methods for getting/setting the size Blink should use to layout the conte nts. 132 // Methods for getting/setting the size Blink should use to layout the conte nts.
133 // NOTE: Scrollbar exclusion is based on the FrameView's scrollbars. To excl ude 133 // NOTE: Scrollbar exclusion is based on the FrameView's scrollbars. To excl ude
134 // scrollbars on the root PaintLayer, use LayoutView::layoutSize. 134 // scrollbars on the root PaintLayer, use LayoutView::layoutSize.
135 IntSize layoutSize(IncludeScrollbarsInRect = ExcludeScrollbars) const; 135 IntSize layoutSize(IncludeScrollbarsInRect = ExcludeScrollbars) const;
136 void setLayoutSize(const IntSize&); 136 void setLayoutSize(const IntSize&);
137 137
138 // If this is set to false, the layout size will need to be explicitly set b y the owner. 138 // If this is set to false, the layout size will need to be explicitly set b y the owner.
139 // E.g. WebViewImpl sets its mainFrame's layout size manually 139 // E.g. WebViewImpl sets its mainFrame's layout size manually
140 void setLayoutSizeFixedToFrameSize(bool isFixed) { m_layoutSizeFixedToFrameS ize = isFixed; } 140 void setLayoutSizeFixedToFrameSize(bool isFixed) { m_layoutSizeFixedToFrameS ize = isFixed; }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 void restoreScrollbar(); 208 void restoreScrollbar();
209 209
210 void postLayoutTimerFired(Timer<FrameView>*); 210 void postLayoutTimerFired(Timer<FrameView>*);
211 211
212 bool safeToPropagateScrollToParent() const { return m_safeToPropagateScrollT oParent; } 212 bool safeToPropagateScrollToParent() const { return m_safeToPropagateScrollT oParent; }
213 void setSafeToPropagateScrollToParent(bool isSafe) { m_safeToPropagateScroll ToParent = isSafe; } 213 void setSafeToPropagateScrollToParent(bool isSafe) { m_safeToPropagateScroll ToParent = isSafe; }
214 214
215 void addPart(LayoutPart*); 215 void addPart(LayoutPart*);
216 void removePart(LayoutPart*); 216 void removePart(LayoutPart*);
217 217
218 void updateWidgetPositions(); 218 void updateWidgetGeometries();
219 219
220 void addPartToUpdate(LayoutEmbeddedObject&); 220 void addPartToUpdate(LayoutEmbeddedObject&);
221 221
222 void setIsPainting(bool val) const { m_isPainting = val; } 222 void setIsPainting(bool val) const { m_isPainting = val; }
223 bool isPainting() const; 223 bool isPainting() const;
224 224
225 void setNodeToDraw(Node*); 225 void setNodeToDraw(Node*);
226 Node* nodeToDraw() const { return m_nodeToDraw.get(); } 226 Node* nodeToDraw() const { return m_nodeToDraw.get(); }
227 227
228 Color documentBackgroundColor() const; 228 Color documentBackgroundColor() const;
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 void contentsResized() override; 672 void contentsResized() override;
673 void scrollbarExistenceDidChange(); 673 void scrollbarExistenceDidChange();
674 674
675 // Override Widget methods to do point conversion via layoutObjects, in orde r to 675 // Override Widget methods to do point conversion via layoutObjects, in orde r to
676 // take transforms into account. 676 // take transforms into account.
677 IntRect convertToContainingWidget(const IntRect&) const override; 677 IntRect convertToContainingWidget(const IntRect&) const override;
678 IntRect convertFromContainingWidget(const IntRect&) const override; 678 IntRect convertFromContainingWidget(const IntRect&) const override;
679 IntPoint convertToContainingWidget(const IntPoint&) const override; 679 IntPoint convertToContainingWidget(const IntPoint&) const override;
680 IntPoint convertFromContainingWidget(const IntPoint&) const override; 680 IntPoint convertFromContainingWidget(const IntPoint&) const override;
681 681
682 void updateWidgetPositionsIfNeeded(); 682 void updateWidgetGeometriesIfNeeded();
683 683
684 bool wasViewportResized(); 684 bool wasViewportResized();
685 void sendResizeEventIfNeeded(); 685 void sendResizeEventIfNeeded();
686 686
687 void updateScrollableAreaSet(); 687 void updateScrollableAreaSet();
688 688
689 void scheduleUpdateWidgetsIfNecessary(); 689 void scheduleUpdateWidgetsIfNecessary();
690 void updateWidgetsTimerFired(Timer<FrameView>*); 690 void updateWidgetsTimerFired(Timer<FrameView>*);
691 bool updateWidgets(); 691 bool updateWidgets();
692 692
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 830
831 IntSize m_layoutSize; 831 IntSize m_layoutSize;
832 bool m_layoutSizeFixedToFrameSize; 832 bool m_layoutSizeFixedToFrameSize;
833 833
834 Timer<FrameView> m_didScrollTimer; 834 Timer<FrameView> m_didScrollTimer;
835 835
836 Vector<IntRect> m_tickmarks; 836 Vector<IntRect> m_tickmarks;
837 837
838 float m_topControlsViewportAdjustment; 838 float m_topControlsViewportAdjustment;
839 839
840 bool m_needsUpdateWidgetPositions; 840 bool m_needsUpdateWidgetGeometries;
841 bool m_needsUpdateViewportIntersection; 841 bool m_needsUpdateViewportIntersection;
842 bool m_needsUpdateViewportIntersectionInSubtree; 842 bool m_needsUpdateViewportIntersectionInSubtree;
843 843
844 #if ENABLE(ASSERT) 844 #if ENABLE(ASSERT)
845 // Verified when finalizing. 845 // Verified when finalizing.
846 bool m_hasBeenDisposed; 846 bool m_hasBeenDisposed;
847 #endif 847 #endif
848 848
849 RefPtrWillBeMember<Scrollbar> m_horizontalScrollbar; 849 RefPtrWillBeMember<Scrollbar> m_horizontalScrollbar;
850 RefPtrWillBeMember<Scrollbar> m_verticalScrollbar; 850 RefPtrWillBeMember<Scrollbar> m_verticalScrollbar;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 static const unsigned visualPixelThreshold = 32 * 32; 922 static const unsigned visualPixelThreshold = 32 * 32;
923 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 923 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
924 setIsVisuallyNonEmpty(); 924 setIsVisuallyNonEmpty();
925 } 925 }
926 926
927 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 927 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
928 928
929 } // namespace blink 929 } // namespace blink
930 930
931 #endif // FrameView_h 931 #endif // FrameView_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698