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

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
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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 void contentsResized() override; 670 void contentsResized() override;
671 void scrollbarExistenceDidChange(); 671 void scrollbarExistenceDidChange();
672 672
673 // Override Widget methods to do point conversion via layoutObjects, in orde r to 673 // Override Widget methods to do point conversion via layoutObjects, in orde r to
674 // take transforms into account. 674 // take transforms into account.
675 IntRect convertToContainingWidget(const IntRect&) const override; 675 IntRect convertToContainingWidget(const IntRect&) const override;
676 IntRect convertFromContainingWidget(const IntRect&) const override; 676 IntRect convertFromContainingWidget(const IntRect&) const override;
677 IntPoint convertToContainingWidget(const IntPoint&) const override; 677 IntPoint convertToContainingWidget(const IntPoint&) const override;
678 IntPoint convertFromContainingWidget(const IntPoint&) const override; 678 IntPoint convertFromContainingWidget(const IntPoint&) const override;
679 679
680 void updateWidgetPositionsIfNeeded(); 680 void updateWidgetGeometriesIfNeeded();
681 681
682 bool wasViewportResized(); 682 bool wasViewportResized();
683 void sendResizeEventIfNeeded(); 683 void sendResizeEventIfNeeded();
684 684
685 void updateScrollableAreaSet(); 685 void updateScrollableAreaSet();
686 686
687 void scheduleUpdateWidgetsIfNecessary(); 687 void scheduleUpdateWidgetsIfNecessary();
688 void updateWidgetsTimerFired(Timer<FrameView>*); 688 void updateWidgetsTimerFired(Timer<FrameView>*);
689 bool updateWidgets(); 689 bool updateWidgets();
690 690
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 828
829 IntSize m_layoutSize; 829 IntSize m_layoutSize;
830 bool m_layoutSizeFixedToFrameSize; 830 bool m_layoutSizeFixedToFrameSize;
831 831
832 Timer<FrameView> m_didScrollTimer; 832 Timer<FrameView> m_didScrollTimer;
833 833
834 Vector<IntRect> m_tickmarks; 834 Vector<IntRect> m_tickmarks;
835 835
836 float m_topControlsViewportAdjustment; 836 float m_topControlsViewportAdjustment;
837 837
838 bool m_needsUpdateWidgetPositions; 838 bool m_needsUpdateWidgetGeometries;
839 bool m_needsUpdateViewportIntersection; 839 bool m_needsUpdateViewportIntersection;
840 bool m_needsUpdateViewportIntersectionInSubtree; 840 bool m_needsUpdateViewportIntersectionInSubtree;
841 841
842 #if ENABLE(ASSERT) 842 #if ENABLE(ASSERT)
843 // Verified when finalizing. 843 // Verified when finalizing.
844 bool m_hasBeenDisposed; 844 bool m_hasBeenDisposed;
845 #endif 845 #endif
846 846
847 RefPtrWillBeMember<Scrollbar> m_horizontalScrollbar; 847 RefPtrWillBeMember<Scrollbar> m_horizontalScrollbar;
848 RefPtrWillBeMember<Scrollbar> m_verticalScrollbar; 848 RefPtrWillBeMember<Scrollbar> m_verticalScrollbar;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 static const unsigned visualPixelThreshold = 32 * 32; 918 static const unsigned visualPixelThreshold = 32 * 32;
919 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 919 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
920 setIsVisuallyNonEmpty(); 920 setIsVisuallyNonEmpty();
921 } 921 }
922 922
923 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 923 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
924 924
925 } // namespace blink 925 } // namespace blink
926 926
927 #endif // FrameView_h 927 #endif // FrameView_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698