| OLD | NEW |
| 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 | 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights |
| 8 reserved. | 8 reserved. |
| 9 | 9 |
| 10 This library is free software; you can redistribute it and/or | 10 This library is free software; you can redistribute it and/or |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 // don't, both A and C should scroll on cc. Frame D should | 798 // don't, both A and C should scroll on cc. Frame D should |
| 799 // scrolled on main thread as its ancestor B. | 799 // scrolled on main thread as its ancestor B. |
| 800 void updateSubFrameScrollOnMainReason(const Frame&, | 800 void updateSubFrameScrollOnMainReason(const Frame&, |
| 801 MainThreadScrollingReasons); | 801 MainThreadScrollingReasons); |
| 802 String mainThreadScrollingReasonsAsText() const; | 802 String mainThreadScrollingReasonsAsText() const; |
| 803 // Main thread scrolling reasons including reasons from ancestors. | 803 // Main thread scrolling reasons including reasons from ancestors. |
| 804 MainThreadScrollingReasons mainThreadScrollingReasons() const; | 804 MainThreadScrollingReasons mainThreadScrollingReasons() const; |
| 805 // Main thread scrolling reasons for this object only. For all reasons, | 805 // Main thread scrolling reasons for this object only. For all reasons, |
| 806 // see: mainThreadScrollingReasons(). | 806 // see: mainThreadScrollingReasons(). |
| 807 MainThreadScrollingReasons mainThreadScrollingReasonsPerFrame() const; | 807 MainThreadScrollingReasons mainThreadScrollingReasonsPerFrame() const; |
| 808 void adjustStyleRelatedMainThreadScrollingReasons(const uint32_t reason, |
| 809 bool increase); |
| 810 MainThreadScrollingReasons getStyleRelatedMainThreadScrollingReasons() const; |
| 811 |
| 808 bool hasVisibleSlowRepaintViewportConstrainedObjects() const; | 812 bool hasVisibleSlowRepaintViewportConstrainedObjects() const; |
| 809 | 813 |
| 810 protected: | 814 protected: |
| 811 // Scroll the content via the compositor. | 815 // Scroll the content via the compositor. |
| 812 bool scrollContentsFastPath(const IntSize& scrollDelta); | 816 bool scrollContentsFastPath(const IntSize& scrollDelta); |
| 813 | 817 |
| 814 // Scroll the content by invalidating everything. | 818 // Scroll the content by invalidating everything. |
| 815 void scrollContentsSlowPath(); | 819 void scrollContentsSlowPath(); |
| 816 | 820 |
| 817 ScrollBehavior scrollBehaviorStyle() const override; | 821 ScrollBehavior scrollBehaviorStyle() const override; |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1169 }; | 1173 }; |
| 1170 std::unique_ptr<Vector<ObjectPaintInvalidation>> | 1174 std::unique_ptr<Vector<ObjectPaintInvalidation>> |
| 1171 m_trackedObjectPaintInvalidations; | 1175 m_trackedObjectPaintInvalidations; |
| 1172 | 1176 |
| 1173 // For Slimming Paint v2 only. | 1177 // For Slimming Paint v2 only. |
| 1174 std::unique_ptr<PaintController> m_paintController; | 1178 std::unique_ptr<PaintController> m_paintController; |
| 1175 std::unique_ptr<PaintArtifactCompositor> m_paintArtifactCompositor; | 1179 std::unique_ptr<PaintArtifactCompositor> m_paintArtifactCompositor; |
| 1176 | 1180 |
| 1177 bool m_isStoringCompositedLayerDebugInfo; | 1181 bool m_isStoringCompositedLayerDebugInfo; |
| 1178 MainThreadScrollingReasons m_mainThreadScrollingReasons; | 1182 MainThreadScrollingReasons m_mainThreadScrollingReasons; |
| 1183 // For recording main thread scrolling reasons |
| 1184 // due to layout object properties. e.g. opacity, transform. |
| 1185 // The size of the vector depends on the number of |
| 1186 // main thread scrolling reasons. |
| 1187 Vector<int> m_mainThreadScrollingReasonsCounter; |
| 1179 }; | 1188 }; |
| 1180 | 1189 |
| 1181 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) { | 1190 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) { |
| 1182 if (m_isVisuallyNonEmpty) | 1191 if (m_isVisuallyNonEmpty) |
| 1183 return; | 1192 return; |
| 1184 m_visuallyNonEmptyCharacterCount += count; | 1193 m_visuallyNonEmptyCharacterCount += count; |
| 1185 // Use a threshold value to prevent very small amounts of visible content from | 1194 // Use a threshold value to prevent very small amounts of visible content from |
| 1186 // triggering didMeaningfulLayout. The first few hundred characters rarely | 1195 // triggering didMeaningfulLayout. The first few hundred characters rarely |
| 1187 // contain the interesting content of the page. | 1196 // contain the interesting content of the page. |
| 1188 static const unsigned visualCharacterThreshold = 200; | 1197 static const unsigned visualCharacterThreshold = 200; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1209 widget.isFrameView()); | 1218 widget.isFrameView()); |
| 1210 DEFINE_TYPE_CASTS(FrameView, | 1219 DEFINE_TYPE_CASTS(FrameView, |
| 1211 ScrollableArea, | 1220 ScrollableArea, |
| 1212 scrollableArea, | 1221 scrollableArea, |
| 1213 scrollableArea->isFrameView(), | 1222 scrollableArea->isFrameView(), |
| 1214 scrollableArea.isFrameView()); | 1223 scrollableArea.isFrameView()); |
| 1215 | 1224 |
| 1216 } // namespace blink | 1225 } // namespace blink |
| 1217 | 1226 |
| 1218 #endif // FrameView_h | 1227 #endif // FrameView_h |
| OLD | NEW |