| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 bool didFirstLayout() const; | 89 bool didFirstLayout() const; |
| 90 void scheduleRelayout(); | 90 void scheduleRelayout(); |
| 91 void scheduleRelayoutOfSubtree(RenderObject*); | 91 void scheduleRelayoutOfSubtree(RenderObject*); |
| 92 bool layoutPending() const; | 92 bool layoutPending() const; |
| 93 bool isInPerformLayout() const; | 93 bool isInPerformLayout() const; |
| 94 | 94 |
| 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; } | |
| 100 int layoutCount() const { return m_layoutCount; } | 99 int layoutCount() const { return m_layoutCount; } |
| 100 void rendererWillBeDestroyed(RenderObject*); |
| 101 | 101 |
| 102 bool needsLayout() const; | 102 bool needsLayout() const; |
| 103 void setNeedsLayout(); | 103 void setNeedsLayout(); |
| 104 | 104 |
| 105 // Methods for getting/setting the size Blink should use to layout the conte
nts. | 105 // Methods for getting/setting the size Blink should use to layout the conte
nts. |
| 106 IntSize layoutSize(IncludeScrollbarsInRect = ExcludeScrollbars) const; | 106 IntSize layoutSize(IncludeScrollbarsInRect = ExcludeScrollbars) const; |
| 107 void setLayoutSize(const IntSize&); | 107 void setLayoutSize(const IntSize&); |
| 108 | 108 |
| 109 // If this is set to false, the layout size will need to be explicitly set b
y the owner. | 109 // 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 | 110 // E.g. WebViewImpl sets its mainFrame's layout size manually |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 virtual void paintScrollCorner(GraphicsContext*, const IntRect& cornerRect)
OVERRIDE; | 212 virtual void paintScrollCorner(GraphicsContext*, const IntRect& cornerRect)
OVERRIDE; |
| 213 virtual void paintScrollbar(GraphicsContext*, Scrollbar*, const IntRect&) OV
ERRIDE; | 213 virtual void paintScrollbar(GraphicsContext*, Scrollbar*, const IntRect&) OV
ERRIDE; |
| 214 | 214 |
| 215 Color documentBackgroundColor() const; | 215 Color documentBackgroundColor() const; |
| 216 | 216 |
| 217 static double currentFrameTimeStamp() { return s_currentFrameTimeStamp; } | 217 static double currentFrameTimeStamp() { return s_currentFrameTimeStamp; } |
| 218 | 218 |
| 219 void updateLayoutAndStyleForPainting(); | 219 void updateLayoutAndStyleForPainting(); |
| 220 void updateLayoutAndStyleIfNeededRecursive(); | 220 void updateLayoutAndStyleIfNeededRecursive(); |
| 221 | 221 |
| 222 void invalidateTreeIfNeededRecursive(); |
| 223 |
| 222 void incrementVisuallyNonEmptyCharacterCount(unsigned); | 224 void incrementVisuallyNonEmptyCharacterCount(unsigned); |
| 223 void incrementVisuallyNonEmptyPixelCount(const IntSize&); | 225 void incrementVisuallyNonEmptyPixelCount(const IntSize&); |
| 224 void setIsVisuallyNonEmpty() { m_isVisuallyNonEmpty = true; } | 226 void setIsVisuallyNonEmpty() { m_isVisuallyNonEmpty = true; } |
| 225 void enableAutoSizeMode(bool enable, const IntSize& minSize, const IntSize&
maxSize); | 227 void enableAutoSizeMode(bool enable, const IntSize& minSize, const IntSize&
maxSize); |
| 226 | 228 |
| 227 void forceLayout(bool allowSubtree = false); | 229 void forceLayout(bool allowSubtree = false); |
| 228 void forceLayoutForPagination(const FloatSize& pageSize, const FloatSize& or
iginalPageSize, float maximumShrinkFactor); | 230 void forceLayoutForPagination(const FloatSize& pageSize, const FloatSize& or
iginalPageSize, float maximumShrinkFactor); |
| 229 | 231 |
| 230 bool scrollToFragment(const KURL&); | 232 bool scrollToFragment(const KURL&); |
| 231 bool scrollToAnchor(const String&); | 233 bool scrollToAnchor(const String&); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); | 356 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); |
| 355 | 357 |
| 356 void updateCounters(); | 358 void updateCounters(); |
| 357 void autoSizeIfEnabled(); | 359 void autoSizeIfEnabled(); |
| 358 void forceLayoutParentViewIfNeeded(); | 360 void forceLayoutParentViewIfNeeded(); |
| 359 void performPreLayoutTasks(); | 361 void performPreLayoutTasks(); |
| 360 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); | 362 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); |
| 361 void scheduleOrPerformPostLayoutTasks(); | 363 void scheduleOrPerformPostLayoutTasks(); |
| 362 void performPostLayoutTasks(); | 364 void performPostLayoutTasks(); |
| 363 | 365 |
| 364 void invalidateTree(RenderObject* root); | 366 void invalidateTreeIfNeeded(); |
| 365 | 367 |
| 366 void gatherDebugLayoutRects(RenderObject* layoutRoot); | 368 void gatherDebugLayoutRects(RenderObject* layoutRoot); |
| 367 | 369 |
| 368 DocumentLifecycle& lifecycle() const; | 370 DocumentLifecycle& lifecycle() const; |
| 369 | 371 |
| 370 virtual void contentRectangleForPaintInvalidation(const IntRect&) OVERRIDE; | 372 virtual void contentRectangleForPaintInvalidation(const IntRect&) OVERRIDE; |
| 371 virtual void contentsResized() OVERRIDE; | 373 virtual void contentsResized() OVERRIDE; |
| 372 virtual void scrollbarExistenceDidChange() OVERRIDE; | 374 virtual void scrollbarExistenceDidChange() OVERRIDE; |
| 373 | 375 |
| 374 // Override ScrollView methods to do point conversion via renderers, in orde
r to | 376 // Override ScrollView methods to do point conversion via renderers, in orde
r to |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 | 431 |
| 430 bool m_canHaveScrollbars; | 432 bool m_canHaveScrollbars; |
| 431 bool m_cannotBlitToWindow; | 433 bool m_cannotBlitToWindow; |
| 432 bool m_isOverlapped; | 434 bool m_isOverlapped; |
| 433 bool m_contentIsOpaque; | 435 bool m_contentIsOpaque; |
| 434 unsigned m_slowRepaintObjectCount; | 436 unsigned m_slowRepaintObjectCount; |
| 435 | 437 |
| 436 bool m_hasPendingLayout; | 438 bool m_hasPendingLayout; |
| 437 RenderObject* m_layoutSubtreeRoot; | 439 RenderObject* m_layoutSubtreeRoot; |
| 438 | 440 |
| 441 // These are copies of the layout roots so that we can |
| 442 // generate invalidations in their own phase. While the |
| 443 // HashSet could potentially yield to unbounded memory, |
| 444 // most layouts share a limited number of layout roots |
| 445 // (6 at most in LayoutTests/fast/). |
| 446 HashSet<RenderObject*> m_paintInvalidationSubtreeRoots; |
| 447 |
| 439 bool m_layoutSchedulingEnabled; | 448 bool m_layoutSchedulingEnabled; |
| 440 bool m_inPerformLayout; | 449 bool m_inPerformLayout; |
| 441 bool m_canInvalidatePaintDuringPerformLayout; | 450 bool m_canInvalidatePaintDuringPerformLayout; |
| 442 bool m_inSynchronousPostLayout; | 451 bool m_inSynchronousPostLayout; |
| 443 int m_layoutCount; | 452 int m_layoutCount; |
| 444 unsigned m_nestedLayoutCount; | 453 unsigned m_nestedLayoutCount; |
| 445 Timer<FrameView> m_postLayoutTasksTimer; | 454 Timer<FrameView> m_postLayoutTasksTimer; |
| 446 Timer<FrameView> m_updateWidgetsTimer; | 455 Timer<FrameView> m_updateWidgetsTimer; |
| 447 bool m_firstLayoutCallbackPending; | 456 bool m_firstLayoutCallbackPending; |
| 448 | 457 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); | 565 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); |
| 557 } | 566 } |
| 558 private: | 567 private: |
| 559 FrameView* m_view; | 568 FrameView* m_view; |
| 560 bool m_originalValue; | 569 bool m_originalValue; |
| 561 }; | 570 }; |
| 562 | 571 |
| 563 } // namespace WebCore | 572 } // namespace WebCore |
| 564 | 573 |
| 565 #endif // FrameView_h | 574 #endif // FrameView_h |
| OLD | NEW |