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 15 matching lines...) Expand all Loading... |
26 #define FrameView_h | 26 #define FrameView_h |
27 | 27 |
28 #include "core/CoreExport.h" | 28 #include "core/CoreExport.h" |
29 #include "core/dom/DocumentLifecycle.h" | 29 #include "core/dom/DocumentLifecycle.h" |
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/PaintInvalidationCapableScrollableArea.h" | 34 #include "core/paint/PaintInvalidationCapableScrollableArea.h" |
35 #include "core/paint/PaintPhase.h" | 35 #include "core/paint/PaintPhase.h" |
| 36 #include "platform/MemoryPurgeController.h" |
36 #include "platform/RuntimeEnabledFeatures.h" | 37 #include "platform/RuntimeEnabledFeatures.h" |
37 #include "platform/Widget.h" | 38 #include "platform/Widget.h" |
38 #include "platform/geometry/IntRect.h" | 39 #include "platform/geometry/IntRect.h" |
39 #include "platform/geometry/LayoutRect.h" | 40 #include "platform/geometry/LayoutRect.h" |
40 #include "platform/graphics/Color.h" | 41 #include "platform/graphics/Color.h" |
41 #include "platform/graphics/paint/ClipPaintPropertyNode.h" | 42 #include "platform/graphics/paint/ClipPaintPropertyNode.h" |
42 #include "platform/graphics/paint/TransformPaintPropertyNode.h" | 43 #include "platform/graphics/paint/TransformPaintPropertyNode.h" |
43 #include "platform/scroll/ScrollTypes.h" | 44 #include "platform/scroll/ScrollTypes.h" |
44 #include "platform/scroll/Scrollbar.h" | 45 #include "platform/scroll/Scrollbar.h" |
45 #include "public/platform/WebDisplayMode.h" | 46 #include "public/platform/WebDisplayMode.h" |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 | 584 |
584 void setContentClip(PassRefPtr<ClipPaintPropertyNode> contentClip) { m_conte
ntClip = contentClip; } | 585 void setContentClip(PassRefPtr<ClipPaintPropertyNode> contentClip) { m_conte
ntClip = contentClip; } |
585 ClipPaintPropertyNode* contentClip() const { return m_contentClip.get(); } | 586 ClipPaintPropertyNode* contentClip() const { return m_contentClip.get(); } |
586 | 587 |
587 // TODO(ojan): Merge this with IntersectionObserver once it lands. | 588 // TODO(ojan): Merge this with IntersectionObserver once it lands. |
588 IntRect computeVisibleArea(); | 589 IntRect computeVisibleArea(); |
589 | 590 |
590 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). | 591 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). |
591 FloatSize viewportSizeForViewportUnits() const; | 592 FloatSize viewportSizeForViewportUnits() const; |
592 | 593 |
| 594 void purgeMemory(DeviceKind); |
| 595 |
593 protected: | 596 protected: |
594 // Scroll the content via the compositor. | 597 // Scroll the content via the compositor. |
595 bool scrollContentsFastPath(const IntSize& scrollDelta); | 598 bool scrollContentsFastPath(const IntSize& scrollDelta); |
596 | 599 |
597 // Scroll the content by invalidating everything. | 600 // Scroll the content by invalidating everything. |
598 void scrollContentsSlowPath(const IntRect& updateRect); | 601 void scrollContentsSlowPath(const IntRect& updateRect); |
599 | 602 |
600 // These functions are used to create/destroy scrollbars. | 603 // These functions are used to create/destroy scrollbars. |
601 void setHasHorizontalScrollbar(bool); | 604 void setHasHorizontalScrollbar(bool); |
602 void setHasVerticalScrollbar(bool); | 605 void setHasVerticalScrollbar(bool); |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 928 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
926 setIsVisuallyNonEmpty(); | 929 setIsVisuallyNonEmpty(); |
927 } | 930 } |
928 | 931 |
929 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 932 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
930 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); | 933 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); |
931 | 934 |
932 } // namespace blink | 935 } // namespace blink |
933 | 936 |
934 #endif // FrameView_h | 937 #endif // FrameView_h |
OLD | NEW |