| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 void setCanInvalidatePaintDuringPerformLayout(bool b) { m_canInvalidatePaint
DuringPerformLayout = b; } | 95 void setCanInvalidatePaintDuringPerformLayout(bool b) { m_canInvalidatePaint
DuringPerformLayout = b; } |
| 96 bool canInvalidatePaintDuringPerformLayout() const { return m_canInvalidateP
aintDuringPerformLayout; } | 96 bool canInvalidatePaintDuringPerformLayout() const { return m_canInvalidateP
aintDuringPerformLayout; } |
| 97 | 97 |
| 98 RenderObject* layoutRoot(bool onlyDuringLayout = false) const; | 98 RenderObject* layoutRoot(bool onlyDuringLayout = false) const; |
| 99 void clearLayoutSubtreeRoot() { m_layoutSubtreeRoot = 0; } | 99 void clearLayoutSubtreeRoot() { m_layoutSubtreeRoot = 0; } |
| 100 int layoutCount() const { return m_layoutCount; } | 100 int layoutCount() const { return m_layoutCount; } |
| 101 | 101 |
| 102 bool needsLayout() const; | 102 bool needsLayout() const; |
| 103 void setNeedsLayout(); | 103 void setNeedsLayout(); |
| 104 | 104 |
| 105 void setNeedsUpdateWidgetPositions() { m_needsUpdateWidgetPositions = true;
} |
| 106 |
| 105 // Methods for getting/setting the size Blink should use to layout the conte
nts. | 107 // Methods for getting/setting the size Blink should use to layout the conte
nts. |
| 106 IntSize layoutSize(IncludeScrollbarsInRect = ExcludeScrollbars) const; | 108 IntSize layoutSize(IncludeScrollbarsInRect = ExcludeScrollbars) const; |
| 107 void setLayoutSize(const IntSize&); | 109 void setLayoutSize(const IntSize&); |
| 108 | 110 |
| 109 // If this is set to false, the layout size will need to be explicitly set b
y the owner. | 111 // If this is set to false, the layout size will need to be explicitly set b
y the owner. |
| 110 // E.g. WebViewImpl sets its mainFrame's layout size manually | 112 // E.g. WebViewImpl sets its mainFrame's layout size manually |
| 111 void setLayoutSizeFixedToFrameSize(bool isFixed) { m_layoutSizeFixedToFrameS
ize = isFixed; } | 113 void setLayoutSizeFixedToFrameSize(bool isFixed) { m_layoutSizeFixedToFrameS
ize = isFixed; } |
| 112 bool layoutSizeFixedToFrameSize() { return m_layoutSizeFixedToFrameSize; } | 114 bool layoutSizeFixedToFrameSize() { return m_layoutSizeFixedToFrameSize; } |
| 113 | 115 |
| 114 bool needsFullPaintInvalidation() const { return m_doFullPaintInvalidation;
} | 116 bool needsFullPaintInvalidation() const { return m_doFullPaintInvalidation;
} |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 virtual void contentsResized() OVERRIDE; | 364 virtual void contentsResized() OVERRIDE; |
| 363 virtual void scrollbarExistenceDidChange() OVERRIDE; | 365 virtual void scrollbarExistenceDidChange() OVERRIDE; |
| 364 | 366 |
| 365 // Override ScrollView methods to do point conversion via renderers, in orde
r to | 367 // Override ScrollView methods to do point conversion via renderers, in orde
r to |
| 366 // take transforms into account. | 368 // take transforms into account. |
| 367 virtual IntRect convertToContainingView(const IntRect&) const OVERRIDE; | 369 virtual IntRect convertToContainingView(const IntRect&) const OVERRIDE; |
| 368 virtual IntRect convertFromContainingView(const IntRect&) const OVERRIDE; | 370 virtual IntRect convertFromContainingView(const IntRect&) const OVERRIDE; |
| 369 virtual IntPoint convertToContainingView(const IntPoint&) const OVERRIDE; | 371 virtual IntPoint convertToContainingView(const IntPoint&) const OVERRIDE; |
| 370 virtual IntPoint convertFromContainingView(const IntPoint&) const OVERRIDE; | 372 virtual IntPoint convertFromContainingView(const IntPoint&) const OVERRIDE; |
| 371 | 373 |
| 374 void updateWidgetPositionsIfNeeded(); |
| 375 |
| 372 void sendResizeEventIfNeeded(); | 376 void sendResizeEventIfNeeded(); |
| 373 | 377 |
| 374 void updateScrollableAreaSet(); | 378 void updateScrollableAreaSet(); |
| 375 | 379 |
| 376 virtual void notifyPageThatContentAreaWillPaint() const OVERRIDE; | 380 virtual void notifyPageThatContentAreaWillPaint() const OVERRIDE; |
| 377 | 381 |
| 378 void scheduleUpdateWidgetsIfNecessary(); | 382 void scheduleUpdateWidgetsIfNecessary(); |
| 379 void updateWidgetsTimerFired(Timer<FrameView>*); | 383 void updateWidgetsTimerFired(Timer<FrameView>*); |
| 380 bool updateWidgets(); | 384 bool updateWidgets(); |
| 381 | 385 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 float m_visibleContentScaleFactor; | 495 float m_visibleContentScaleFactor; |
| 492 IntSize m_inputEventsOffsetForEmulation; | 496 IntSize m_inputEventsOffsetForEmulation; |
| 493 float m_inputEventsScaleFactorForEmulation; | 497 float m_inputEventsScaleFactorForEmulation; |
| 494 | 498 |
| 495 IntSize m_layoutSize; | 499 IntSize m_layoutSize; |
| 496 bool m_layoutSizeFixedToFrameSize; | 500 bool m_layoutSizeFixedToFrameSize; |
| 497 | 501 |
| 498 Timer<FrameView> m_didScrollTimer; | 502 Timer<FrameView> m_didScrollTimer; |
| 499 | 503 |
| 500 Vector<IntRect> m_tickmarks; | 504 Vector<IntRect> m_tickmarks; |
| 505 |
| 506 bool m_needsUpdateWidgetPositions; |
| 501 }; | 507 }; |
| 502 | 508 |
| 503 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) | 509 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) |
| 504 { | 510 { |
| 505 if (m_isVisuallyNonEmpty) | 511 if (m_isVisuallyNonEmpty) |
| 506 return; | 512 return; |
| 507 m_visuallyNonEmptyCharacterCount += count; | 513 m_visuallyNonEmptyCharacterCount += count; |
| 508 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didFirstVisuallyNonEmptyLayout. | 514 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didFirstVisuallyNonEmptyLayout. |
| 509 // The first few hundred characters rarely contain the interesting content o
f the page. | 515 // The first few hundred characters rarely contain the interesting content o
f the page. |
| 510 static const unsigned visualCharacterThreshold = 200; | 516 static const unsigned visualCharacterThreshold = 200; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); | 551 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); |
| 546 } | 552 } |
| 547 private: | 553 private: |
| 548 FrameView* m_view; | 554 FrameView* m_view; |
| 549 bool m_originalValue; | 555 bool m_originalValue; |
| 550 }; | 556 }; |
| 551 | 557 |
| 552 } // namespace blink | 558 } // namespace blink |
| 553 | 559 |
| 554 #endif // FrameView_h | 560 #endif // FrameView_h |
| OLD | NEW |