| 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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 ClipPaintPropertyNode* contentClip() const { return m_contentClip.get(); } | 596 ClipPaintPropertyNode* contentClip() const { return m_contentClip.get(); } |
| 597 | 597 |
| 598 // TODO(ojan): Merge this with IntersectionObserver once it lands. | 598 // TODO(ojan): Merge this with IntersectionObserver once it lands. |
| 599 IntRect computeVisibleArea(); | 599 IntRect computeVisibleArea(); |
| 600 | 600 |
| 601 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). | 601 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). |
| 602 FloatSize viewportSizeForViewportUnits() const; | 602 FloatSize viewportSizeForViewportUnits() const; |
| 603 | 603 |
| 604 ScrollAnchor& scrollAnchor() { return m_scrollAnchor; } | 604 ScrollAnchor& scrollAnchor() { return m_scrollAnchor; } |
| 605 | 605 |
| 606 // For PaintInvalidator temporarily. TODO(wangxianzhu): Move into PaintInval
idator. |
| 607 void invalidatePaintIfNeeded(const PaintInvalidationState&); |
| 608 |
| 606 protected: | 609 protected: |
| 607 // Scroll the content via the compositor. | 610 // Scroll the content via the compositor. |
| 608 bool scrollContentsFastPath(const IntSize& scrollDelta); | 611 bool scrollContentsFastPath(const IntSize& scrollDelta); |
| 609 | 612 |
| 610 // Scroll the content by invalidating everything. | 613 // Scroll the content by invalidating everything. |
| 611 void scrollContentsSlowPath(const IntRect& updateRect); | 614 void scrollContentsSlowPath(const IntRect& updateRect); |
| 612 | 615 |
| 613 // These functions are used to create/destroy scrollbars. | 616 // These functions are used to create/destroy scrollbars. |
| 614 void setHasHorizontalScrollbar(bool); | 617 void setHasHorizontalScrollbar(bool); |
| 615 void setHasVerticalScrollbar(bool); | 618 void setHasVerticalScrollbar(bool); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 634 STACK_ALLOCATED(); | 637 STACK_ALLOCATED(); |
| 635 public: | 638 public: |
| 636 explicit InUpdateScrollbarsScope(FrameView* view) | 639 explicit InUpdateScrollbarsScope(FrameView* view) |
| 637 : m_scope(view->m_inUpdateScrollbars, true) | 640 : m_scope(view->m_inUpdateScrollbars, true) |
| 638 { } | 641 { } |
| 639 private: | 642 private: |
| 640 TemporaryChange<bool> m_scope; | 643 TemporaryChange<bool> m_scope; |
| 641 }; | 644 }; |
| 642 | 645 |
| 643 // Only for LayoutPart to traverse into sub frames during paint invalidation
. | 646 // Only for LayoutPart to traverse into sub frames during paint invalidation
. |
| 644 void invalidateTreeIfNeeded(PaintInvalidationState&); | 647 void invalidateTreeIfNeeded(const PaintInvalidationState&); |
| 645 | 648 |
| 646 private: | 649 private: |
| 647 explicit FrameView(LocalFrame*); | 650 explicit FrameView(LocalFrame*); |
| 648 | 651 |
| 649 void setScrollOffset(const DoublePoint&, ScrollType) override; | 652 void setScrollOffset(const DoublePoint&, ScrollType) override; |
| 650 | 653 |
| 651 enum LifeCycleUpdateOption { | 654 enum LifeCycleUpdateOption { |
| 652 OnlyUpToLayoutClean, | 655 OnlyUpToLayoutClean, |
| 653 OnlyUpToCompositingCleanPlusScrolling, | 656 OnlyUpToCompositingCleanPlusScrolling, |
| 654 AllPhasesExceptPaint, | 657 AllPhasesExceptPaint, |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 938 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 941 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
| 939 setIsVisuallyNonEmpty(); | 942 setIsVisuallyNonEmpty(); |
| 940 } | 943 } |
| 941 | 944 |
| 942 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 945 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
| 943 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); | 946 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); |
| 944 | 947 |
| 945 } // namespace blink | 948 } // namespace blink |
| 946 | 949 |
| 947 #endif // FrameView_h | 950 #endif // FrameView_h |
| OLD | NEW |