| 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 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 19 matching lines...) Expand all Loading... |
| 30 #include "core/frame/FrameViewAutoSizeInfo.h" | 30 #include "core/frame/FrameViewAutoSizeInfo.h" |
| 31 #include "core/frame/LayoutSubtreeRootList.h" | 31 #include "core/frame/LayoutSubtreeRootList.h" |
| 32 #include "core/frame/RootFrameViewport.h" | 32 #include "core/frame/RootFrameViewport.h" |
| 33 #include "core/layout/LayoutAnalyzer.h" | 33 #include "core/layout/LayoutAnalyzer.h" |
| 34 #include "core/paint/PaintPhase.h" | 34 #include "core/paint/PaintPhase.h" |
| 35 #include "platform/RuntimeEnabledFeatures.h" | 35 #include "platform/RuntimeEnabledFeatures.h" |
| 36 #include "platform/Widget.h" | 36 #include "platform/Widget.h" |
| 37 #include "platform/geometry/IntRect.h" | 37 #include "platform/geometry/IntRect.h" |
| 38 #include "platform/geometry/LayoutRect.h" | 38 #include "platform/geometry/LayoutRect.h" |
| 39 #include "platform/graphics/Color.h" | 39 #include "platform/graphics/Color.h" |
| 40 #include "platform/graphics/paint/TransformPaintPropertyNode.h" |
| 40 #include "platform/scroll/ScrollTypes.h" | 41 #include "platform/scroll/ScrollTypes.h" |
| 41 #include "platform/scroll/ScrollableArea.h" | 42 #include "platform/scroll/ScrollableArea.h" |
| 42 #include "platform/scroll/Scrollbar.h" | 43 #include "platform/scroll/Scrollbar.h" |
| 43 #include "public/platform/WebDisplayMode.h" | 44 #include "public/platform/WebDisplayMode.h" |
| 44 #include "public/platform/WebRect.h" | 45 #include "public/platform/WebRect.h" |
| 45 #include "wtf/Allocator.h" | 46 #include "wtf/Allocator.h" |
| 46 #include "wtf/Forward.h" | 47 #include "wtf/Forward.h" |
| 47 #include "wtf/HashSet.h" | 48 #include "wtf/HashSet.h" |
| 48 #include "wtf/ListHashSet.h" | 49 #include "wtf/ListHashSet.h" |
| 49 #include "wtf/OwnPtr.h" | 50 #include "wtf/OwnPtr.h" |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 bool frameTimingRequestsDirty() { return m_frameTimingRequestsDirty; } | 562 bool frameTimingRequestsDirty() { return m_frameTimingRequestsDirty; } |
| 562 | 563 |
| 563 // Returns true if this frame should not render or schedule visual updates. | 564 // Returns true if this frame should not render or schedule visual updates. |
| 564 bool shouldThrottleRendering() const; | 565 bool shouldThrottleRendering() const; |
| 565 | 566 |
| 566 // Returns true if this frame could potentially skip rendering and avoid | 567 // Returns true if this frame could potentially skip rendering and avoid |
| 567 // scheduling visual updates. | 568 // scheduling visual updates. |
| 568 bool canThrottleRendering() const; | 569 bool canThrottleRendering() const; |
| 569 bool isHiddenForThrottling() const { return m_hiddenForThrottling; } | 570 bool isHiddenForThrottling() const { return m_hiddenForThrottling; } |
| 570 | 571 |
| 572 // Paint properties for SPv2 Only. |
| 573 void setPreTranslation(PassRefPtr<TransformPaintPropertyNode> preTranslation
) { m_preTranslation = preTranslation; } |
| 574 const TransformPaintPropertyNode* preTranslation() const { return m_preTrans
lation.get(); } |
| 575 |
| 576 void setScrollTranslation(PassRefPtr<TransformPaintPropertyNode> scrollTrans
lation) { m_scrollTranslation = scrollTranslation; } |
| 577 const TransformPaintPropertyNode* scrollTranslation() const { return m_scrol
lTranslation.get(); } |
| 578 |
| 571 protected: | 579 protected: |
| 572 // Scroll the content via the compositor. | 580 // Scroll the content via the compositor. |
| 573 bool scrollContentsFastPath(const IntSize& scrollDelta); | 581 bool scrollContentsFastPath(const IntSize& scrollDelta); |
| 574 | 582 |
| 575 // Scroll the content by invalidating everything. | 583 // Scroll the content by invalidating everything. |
| 576 void scrollContentsSlowPath(const IntRect& updateRect); | 584 void scrollContentsSlowPath(const IntRect& updateRect); |
| 577 | 585 |
| 578 // These functions are used to create/destroy scrollbars. | 586 // These functions are used to create/destroy scrollbars. |
| 579 void setHasHorizontalScrollbar(bool); | 587 void setHasHorizontalScrollbar(bool); |
| 580 void setHasVerticalScrollbar(bool); | 588 void setHasVerticalScrollbar(bool); |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 // This frame's bounds in the root frame's content coordinates, clipped | 866 // This frame's bounds in the root frame's content coordinates, clipped |
| 859 // recursively through every ancestor view. | 867 // recursively through every ancestor view. |
| 860 IntRect m_viewportIntersection; | 868 IntRect m_viewportIntersection; |
| 861 bool m_viewportIntersectionValid; | 869 bool m_viewportIntersectionValid; |
| 862 | 870 |
| 863 // The following members control rendering pipeline throttling for this | 871 // The following members control rendering pipeline throttling for this |
| 864 // frame. They are only updated in response to intersection observer | 872 // frame. They are only updated in response to intersection observer |
| 865 // notifications, i.e., not in the middle of the lifecycle. | 873 // notifications, i.e., not in the middle of the lifecycle. |
| 866 bool m_hiddenForThrottling; | 874 bool m_hiddenForThrottling; |
| 867 bool m_crossOriginForThrottling; | 875 bool m_crossOriginForThrottling; |
| 876 |
| 877 // Paint properties for SPv2 Only. |
| 878 // The hierarchy of transform subtree created by a FrameView. |
| 879 // [ preTranslation ] The offset from Widget::frameRect. Estab
lishes viewport. |
| 880 // +---[ scrollTranslation ] Frame scrolling. This is going away in f
avor of Settings::rootLayerScrolls. |
| 881 RefPtr<TransformPaintPropertyNode> m_preTranslation; |
| 882 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; |
| 868 }; | 883 }; |
| 869 | 884 |
| 870 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) | 885 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) |
| 871 { | 886 { |
| 872 if (m_isVisuallyNonEmpty) | 887 if (m_isVisuallyNonEmpty) |
| 873 return; | 888 return; |
| 874 m_visuallyNonEmptyCharacterCount += count; | 889 m_visuallyNonEmptyCharacterCount += count; |
| 875 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didMeaningfulLayout. | 890 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didMeaningfulLayout. |
| 876 // The first few hundred characters rarely contain the interesting content o
f the page. | 891 // The first few hundred characters rarely contain the interesting content o
f the page. |
| 877 static const unsigned visualCharacterThreshold = 200; | 892 static const unsigned visualCharacterThreshold = 200; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 888 static const unsigned visualPixelThreshold = 32 * 32; | 903 static const unsigned visualPixelThreshold = 32 * 32; |
| 889 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 904 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
| 890 setIsVisuallyNonEmpty(); | 905 setIsVisuallyNonEmpty(); |
| 891 } | 906 } |
| 892 | 907 |
| 893 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 908 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
| 894 | 909 |
| 895 } // namespace blink | 910 } // namespace blink |
| 896 | 911 |
| 897 #endif // FrameView_h | 912 #endif // FrameView_h |
| OLD | NEW |