| 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 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 Color m_baseBackgroundColor; | 817 Color m_baseBackgroundColor; |
| 818 IntSize m_lastViewportSize; | 818 IntSize m_lastViewportSize; |
| 819 float m_lastZoomFactor; | 819 float m_lastZoomFactor; |
| 820 | 820 |
| 821 AtomicString m_mediaType; | 821 AtomicString m_mediaType; |
| 822 AtomicString m_mediaTypeWhenNotPrinting; | 822 AtomicString m_mediaTypeWhenNotPrinting; |
| 823 | 823 |
| 824 bool m_safeToPropagateScrollToParent; | 824 bool m_safeToPropagateScrollToParent; |
| 825 | 825 |
| 826 unsigned m_visuallyNonEmptyCharacterCount; | 826 unsigned m_visuallyNonEmptyCharacterCount; |
| 827 unsigned m_visuallyNonEmptyPixelCount; | 827 uint64_t m_visuallyNonEmptyPixelCount; |
| 828 bool m_isVisuallyNonEmpty; | 828 bool m_isVisuallyNonEmpty; |
| 829 | 829 |
| 830 Member<Node> m_fragmentAnchor; | 830 Member<Node> m_fragmentAnchor; |
| 831 | 831 |
| 832 // layoutObject to hold our custom scroll corner. | 832 // layoutObject to hold our custom scroll corner. |
| 833 LayoutScrollbarPart* m_scrollCorner; | 833 LayoutScrollbarPart* m_scrollCorner; |
| 834 | 834 |
| 835 Member<ScrollableAreaSet> m_scrollableAreas; | 835 Member<ScrollableAreaSet> m_scrollableAreas; |
| 836 Member<ScrollableAreaSet> m_animatingScrollableAreas; | 836 Member<ScrollableAreaSet> m_animatingScrollableAreas; |
| 837 std::unique_ptr<ResizerAreaSet> m_resizerAreas; | 837 std::unique_ptr<ResizerAreaSet> m_resizerAreas; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 // The first few hundred characters rarely contain the interesting content o
f the page. | 945 // The first few hundred characters rarely contain the interesting content o
f the page. |
| 946 static const unsigned visualCharacterThreshold = 200; | 946 static const unsigned visualCharacterThreshold = 200; |
| 947 if (m_visuallyNonEmptyCharacterCount > visualCharacterThreshold) | 947 if (m_visuallyNonEmptyCharacterCount > visualCharacterThreshold) |
| 948 setIsVisuallyNonEmpty(); | 948 setIsVisuallyNonEmpty(); |
| 949 } | 949 } |
| 950 | 950 |
| 951 inline void FrameView::incrementVisuallyNonEmptyPixelCount(const IntSize& size) | 951 inline void FrameView::incrementVisuallyNonEmptyPixelCount(const IntSize& size) |
| 952 { | 952 { |
| 953 if (m_isVisuallyNonEmpty) | 953 if (m_isVisuallyNonEmpty) |
| 954 return; | 954 return; |
| 955 m_visuallyNonEmptyPixelCount += size.width() * size.height(); | 955 m_visuallyNonEmptyPixelCount += size.area(); |
| 956 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didMeaningfulLayout. | 956 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didMeaningfulLayout. |
| 957 static const unsigned visualPixelThreshold = 32 * 32; | 957 static const unsigned visualPixelThreshold = 32 * 32; |
| 958 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 958 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
| 959 setIsVisuallyNonEmpty(); | 959 setIsVisuallyNonEmpty(); |
| 960 } | 960 } |
| 961 | 961 |
| 962 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 962 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
| 963 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); | 963 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); |
| 964 | 964 |
| 965 } // namespace blink | 965 } // namespace blink |
| 966 | 966 |
| 967 #endif // FrameView_h | 967 #endif // FrameView_h |
| OLD | NEW |