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

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

Issue 2022013004: Relayout if FrameView::updateViewSize() set needsLayout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 void setTransparent(bool isTransparent); 172 void setTransparent(bool isTransparent);
173 173
174 // True if the FrameView is not transparent, and the base background color i s opaque. 174 // True if the FrameView is not transparent, and the base background color i s opaque.
175 bool hasOpaqueBackground() const; 175 bool hasOpaqueBackground() const;
176 176
177 Color baseBackgroundColor() const; 177 Color baseBackgroundColor() const;
178 void setBaseBackgroundColor(const Color&); 178 void setBaseBackgroundColor(const Color&);
179 void updateBackgroundRecursively(const Color&, bool); 179 void updateBackgroundRecursively(const Color&, bool);
180 180
181 void adjustViewSize(); 181 void adjustViewSize();
182 void adjustViewSizeAndLayout();
182 183
183 // Scale used to convert incoming input events. 184 // Scale used to convert incoming input events.
184 float inputEventsScaleFactor() const; 185 float inputEventsScaleFactor() const;
185 186
186 // Offset used to convert incoming input events while emulating device metic s. 187 // Offset used to convert incoming input events while emulating device metic s.
187 IntSize inputEventsOffsetForEmulation() const; 188 IntSize inputEventsOffsetForEmulation() const;
188 void setInputEventsTransformForEmulation(const IntSize&, float); 189 void setInputEventsTransformForEmulation(const IntSize&, float);
189 190
190 void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = Scro llBehaviorInstant) override; 191 void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = Scro llBehaviorInstant) override;
191 192
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 RefPtr<TransformPaintPropertyNode> m_preTranslation; 906 RefPtr<TransformPaintPropertyNode> m_preTranslation;
906 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; 907 RefPtr<TransformPaintPropertyNode> m_scrollTranslation;
907 // The content clip clips the document (= LayoutView) but not the scrollbars . 908 // The content clip clips the document (= LayoutView) but not the scrollbars .
908 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() i s enabled. 909 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() i s enabled.
909 RefPtr<ClipPaintPropertyNode> m_contentClip; 910 RefPtr<ClipPaintPropertyNode> m_contentClip;
910 911
911 bool m_isUpdatingAllLifecyclePhases; 912 bool m_isUpdatingAllLifecyclePhases;
912 ScrollAnchor m_scrollAnchor; 913 ScrollAnchor m_scrollAnchor;
913 914
914 bool m_needsScrollbarsUpdate; 915 bool m_needsScrollbarsUpdate;
916 bool m_suppressAdjustViewSize;
915 }; 917 };
916 918
917 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) 919 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
918 { 920 {
919 if (m_isVisuallyNonEmpty) 921 if (m_isVisuallyNonEmpty)
920 return; 922 return;
921 m_visuallyNonEmptyCharacterCount += count; 923 m_visuallyNonEmptyCharacterCount += count;
922 // Use a threshold value to prevent very small amounts of visible content fr om triggering didMeaningfulLayout. 924 // Use a threshold value to prevent very small amounts of visible content fr om triggering didMeaningfulLayout.
923 // The first few hundred characters rarely contain the interesting content o f the page. 925 // The first few hundred characters rarely contain the interesting content o f the page.
924 static const unsigned visualCharacterThreshold = 200; 926 static const unsigned visualCharacterThreshold = 200;
(...skipping 11 matching lines...) Expand all
936 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 938 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
937 setIsVisuallyNonEmpty(); 939 setIsVisuallyNonEmpty();
938 } 940 }
939 941
940 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 942 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
941 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); 943 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView());
942 944
943 } // namespace blink 945 } // namespace blink
944 946
945 #endif // FrameView_h 947 #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