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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 // FIXME: This should probably be renamed as the 'inSubtreeLayout' parameter | 306 // FIXME: This should probably be renamed as the 'inSubtreeLayout' parameter |
307 // passed around the FrameView layout methods can be true while this returns | 307 // passed around the FrameView layout methods can be true while this returns |
308 // false. | 308 // false. |
309 bool isSubtreeLayout() const { return !!m_layoutSubtreeRoot; } | 309 bool isSubtreeLayout() const { return !!m_layoutSubtreeRoot; } |
310 | 310 |
311 // Sets the tickmarks for the FrameView, overriding the default behavior | 311 // Sets the tickmarks for the FrameView, overriding the default behavior |
312 // which is to display the tickmarks corresponding to find results. | 312 // which is to display the tickmarks corresponding to find results. |
313 // If |m_tickmarks| is empty, the default behavior is restored. | 313 // If |m_tickmarks| is empty, the default behavior is restored. |
314 void setTickmarks(const Vector<IntRect>& tickmarks) { m_tickmarks = tickmark
s; } | 314 void setTickmarks(const Vector<IntRect>& tickmarks) { m_tickmarks = tickmark
s; } |
315 | 315 |
| 316 // Since the compositor can resize the viewport due to top controls and |
| 317 // commit scroll offsets before a WebView::resize occurs, we need to adjust |
| 318 // our scroll extents to prevent clamping the scroll offsets. |
| 319 void setTopControlsViewportAdjustment(float); |
| 320 |
| 321 virtual IntPoint maximumScrollPosition() const OVERRIDE; |
| 322 |
316 // ScrollableArea interface | 323 // ScrollableArea interface |
317 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE; | 324 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE; |
318 virtual void getTickmarks(Vector<IntRect>&) const OVERRIDE; | 325 virtual void getTickmarks(Vector<IntRect>&) const OVERRIDE; |
319 virtual void scrollTo(const IntSize&) OVERRIDE; | 326 virtual void scrollTo(const IntSize&) OVERRIDE; |
320 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE; | 327 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE; |
321 virtual bool scrollAnimatorEnabled() const OVERRIDE; | 328 virtual bool scrollAnimatorEnabled() const OVERRIDE; |
322 virtual bool usesCompositedScrolling() const OVERRIDE; | 329 virtual bool usesCompositedScrolling() const OVERRIDE; |
323 virtual GraphicsLayer* layerForScrolling() const OVERRIDE; | 330 virtual GraphicsLayer* layerForScrolling() const OVERRIDE; |
324 virtual GraphicsLayer* layerForHorizontalScrollbar() const OVERRIDE; | 331 virtual GraphicsLayer* layerForHorizontalScrollbar() const OVERRIDE; |
325 virtual GraphicsLayer* layerForVerticalScrollbar() const OVERRIDE; | 332 virtual GraphicsLayer* layerForVerticalScrollbar() const OVERRIDE; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 float m_inputEventsScaleFactorForEmulation; | 506 float m_inputEventsScaleFactorForEmulation; |
500 | 507 |
501 IntSize m_layoutSize; | 508 IntSize m_layoutSize; |
502 bool m_layoutSizeFixedToFrameSize; | 509 bool m_layoutSizeFixedToFrameSize; |
503 | 510 |
504 Timer<FrameView> m_didScrollTimer; | 511 Timer<FrameView> m_didScrollTimer; |
505 | 512 |
506 Vector<IntRect> m_tickmarks; | 513 Vector<IntRect> m_tickmarks; |
507 | 514 |
508 bool m_needsUpdateWidgetPositions; | 515 bool m_needsUpdateWidgetPositions; |
| 516 float m_topControlsViewportAdjustment; |
509 }; | 517 }; |
510 | 518 |
511 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) | 519 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) |
512 { | 520 { |
513 if (m_isVisuallyNonEmpty) | 521 if (m_isVisuallyNonEmpty) |
514 return; | 522 return; |
515 m_visuallyNonEmptyCharacterCount += count; | 523 m_visuallyNonEmptyCharacterCount += count; |
516 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didFirstVisuallyNonEmptyLayout. | 524 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didFirstVisuallyNonEmptyLayout. |
517 // The first few hundred characters rarely contain the interesting content o
f the page. | 525 // The first few hundred characters rarely contain the interesting content o
f the page. |
518 static const unsigned visualCharacterThreshold = 200; | 526 static const unsigned visualCharacterThreshold = 200; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); | 561 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); |
554 } | 562 } |
555 private: | 563 private: |
556 FrameView* m_view; | 564 FrameView* m_view; |
557 bool m_originalValue; | 565 bool m_originalValue; |
558 }; | 566 }; |
559 | 567 |
560 } // namespace blink | 568 } // namespace blink |
561 | 569 |
562 #endif // FrameView_h | 570 #endif // FrameView_h |
OLD | NEW |