| 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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 | 569 |
| 570 DECLARE_VIRTUAL_TRACE(); | 570 DECLARE_VIRTUAL_TRACE(); |
| 571 void notifyPageThatContentAreaWillPaint() const; | 571 void notifyPageThatContentAreaWillPaint() const; |
| 572 FrameView* parentFrameView() const; | 572 FrameView* parentFrameView() const; |
| 573 | 573 |
| 574 // Returns the scrollable area for the frame. | 574 // Returns the scrollable area for the frame. |
| 575 ScrollableArea* scrollableArea(); | 575 ScrollableArea* scrollableArea(); |
| 576 | 576 |
| 577 int viewportWidth() const; | 577 int viewportWidth() const; |
| 578 | 578 |
| 579 LayoutAnalyzer* layoutAnalyzer() { return m_analyzer.get(); } | 579 LayoutAnalyzer& layoutAnalyzer() { return m_analyzer; } |
| 580 | 580 |
| 581 protected: | 581 protected: |
| 582 // Scroll the content via the compositor. | 582 // Scroll the content via the compositor. |
| 583 bool scrollContentsFastPath(const IntSize& scrollDelta); | 583 bool scrollContentsFastPath(const IntSize& scrollDelta); |
| 584 | 584 |
| 585 // Scroll the content by invalidating everything. | 585 // Scroll the content by invalidating everything. |
| 586 void scrollContentsSlowPath(const IntRect& updateRect); | 586 void scrollContentsSlowPath(const IntRect& updateRect); |
| 587 | 587 |
| 588 bool isVerticalDocument() const; | 588 bool isVerticalDocument() const; |
| 589 bool isFlippedDocument() const; | 589 bool isFlippedDocument() const; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 // notifyScrollPositionChanged...there's too many ways to scroll this class.
This needs | 710 // notifyScrollPositionChanged...there's too many ways to scroll this class.
This needs |
| 711 // some cleanup. | 711 // some cleanup. |
| 712 void setScrollOffsetFromUpdateScrollbars(const DoubleSize&); | 712 void setScrollOffsetFromUpdateScrollbars(const DoubleSize&); |
| 713 | 713 |
| 714 IntRect rectToCopyOnScroll() const; | 714 IntRect rectToCopyOnScroll() const; |
| 715 | 715 |
| 716 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro
llbar() == child || verticalScrollbar() == child; } | 716 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro
llbar() == child || verticalScrollbar() == child; } |
| 717 | 717 |
| 718 ScrollingCoordinator* scrollingCoordinator(); | 718 ScrollingCoordinator* scrollingCoordinator(); |
| 719 | 719 |
| 720 void prepareLayoutAnalyzer(); | |
| 721 PassRefPtr<TracedValue> analyzerCounters(); | 720 PassRefPtr<TracedValue> analyzerCounters(); |
| 722 | 721 |
| 723 // LayoutObject for the viewport-defining element (see Document::viewportDef
iningElement). | 722 // LayoutObject for the viewport-defining element (see Document::viewportDef
iningElement). |
| 724 LayoutObject* viewportLayoutObject(); | 723 LayoutObject* viewportLayoutObject(); |
| 725 | 724 |
| 726 LayoutSize m_size; | 725 LayoutSize m_size; |
| 727 | 726 |
| 728 typedef HashSet<RefPtr<LayoutEmbeddedObject>> EmbeddedObjectSet; | 727 typedef HashSet<RefPtr<LayoutEmbeddedObject>> EmbeddedObjectSet; |
| 729 EmbeddedObjectSet m_partUpdateSet; | 728 EmbeddedObjectSet m_partUpdateSet; |
| 730 | 729 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 | 843 |
| 845 FloatSize m_elasticOverscroll; | 844 FloatSize m_elasticOverscroll; |
| 846 | 845 |
| 847 bool m_inUpdateScrollbars; | 846 bool m_inUpdateScrollbars; |
| 848 | 847 |
| 849 IntPoint m_panScrollIconPoint; | 848 IntPoint m_panScrollIconPoint; |
| 850 bool m_shouldDrawPanScrollIcon; | 849 bool m_shouldDrawPanScrollIcon; |
| 851 | 850 |
| 852 bool m_clipsRepaints; | 851 bool m_clipsRepaints; |
| 853 | 852 |
| 854 OwnPtr<LayoutAnalyzer> m_analyzer; | 853 LayoutAnalyzer m_analyzer; |
| 855 }; | 854 }; |
| 856 | 855 |
| 857 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) | 856 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) |
| 858 { | 857 { |
| 859 if (m_isVisuallyNonEmpty) | 858 if (m_isVisuallyNonEmpty) |
| 860 return; | 859 return; |
| 861 m_visuallyNonEmptyCharacterCount += count; | 860 m_visuallyNonEmptyCharacterCount += count; |
| 862 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didFirstVisuallyNonEmptyLayout. | 861 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didFirstVisuallyNonEmptyLayout. |
| 863 // The first few hundred characters rarely contain the interesting content o
f the page. | 862 // The first few hundred characters rarely contain the interesting content o
f the page. |
| 864 static const unsigned visualCharacterThreshold = 200; | 863 static const unsigned visualCharacterThreshold = 200; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 875 static const unsigned visualPixelThreshold = 32 * 32; | 874 static const unsigned visualPixelThreshold = 32 * 32; |
| 876 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 875 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
| 877 setIsVisuallyNonEmpty(); | 876 setIsVisuallyNonEmpty(); |
| 878 } | 877 } |
| 879 | 878 |
| 880 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 879 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
| 881 | 880 |
| 882 } // namespace blink | 881 } // namespace blink |
| 883 | 882 |
| 884 #endif // FrameView_h | 883 #endif // FrameView_h |
| OLD | NEW |