| 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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the | 832 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the |
| 833 // main frame. | 833 // main frame. |
| 834 OwnPtrWillBeMember<ScrollableArea> m_viewportScrollableArea; | 834 OwnPtrWillBeMember<ScrollableArea> m_viewportScrollableArea; |
| 835 }; | 835 }; |
| 836 | 836 |
| 837 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) | 837 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) |
| 838 { | 838 { |
| 839 if (m_isVisuallyNonEmpty) | 839 if (m_isVisuallyNonEmpty) |
| 840 return; | 840 return; |
| 841 m_visuallyNonEmptyCharacterCount += count; | 841 m_visuallyNonEmptyCharacterCount += count; |
| 842 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didFirstVisuallyNonEmptyLayout. | 842 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didMeaningfulLayout. |
| 843 // The first few hundred characters rarely contain the interesting content o
f the page. | 843 // The first few hundred characters rarely contain the interesting content o
f the page. |
| 844 static const unsigned visualCharacterThreshold = 200; | 844 static const unsigned visualCharacterThreshold = 200; |
| 845 if (m_visuallyNonEmptyCharacterCount > visualCharacterThreshold) | 845 if (m_visuallyNonEmptyCharacterCount > visualCharacterThreshold) |
| 846 setIsVisuallyNonEmpty(); | 846 setIsVisuallyNonEmpty(); |
| 847 } | 847 } |
| 848 | 848 |
| 849 inline void FrameView::incrementVisuallyNonEmptyPixelCount(const IntSize& size) | 849 inline void FrameView::incrementVisuallyNonEmptyPixelCount(const IntSize& size) |
| 850 { | 850 { |
| 851 if (m_isVisuallyNonEmpty) | 851 if (m_isVisuallyNonEmpty) |
| 852 return; | 852 return; |
| 853 m_visuallyNonEmptyPixelCount += size.width() * size.height(); | 853 m_visuallyNonEmptyPixelCount += size.width() * size.height(); |
| 854 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didFirstVisuallyNonEmptyLayout | 854 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didMeaningfulLayout. |
| 855 static const unsigned visualPixelThreshold = 32 * 32; | 855 static const unsigned visualPixelThreshold = 32 * 32; |
| 856 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 856 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
| 857 setIsVisuallyNonEmpty(); | 857 setIsVisuallyNonEmpty(); |
| 858 } | 858 } |
| 859 | 859 |
| 860 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 860 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
| 861 | 861 |
| 862 } // namespace blink | 862 } // namespace blink |
| 863 | 863 |
| 864 #endif // FrameView_h | 864 #endif // FrameView_h |
| OLD | NEW |