| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 111 void setLayoutSizeFixedToFrameSize(bool isFixed) { m_layoutSizeFixedToFrameS
ize = isFixed; } | 111 void setLayoutSizeFixedToFrameSize(bool isFixed) { m_layoutSizeFixedToFrameS
ize = isFixed; } |
| 112 bool layoutSizeFixedToFrameSize() { return m_layoutSizeFixedToFrameSize; } | 112 bool layoutSizeFixedToFrameSize() { return m_layoutSizeFixedToFrameSize; } |
| 113 | 113 |
| 114 bool needsFullRepaint() const { return m_doFullRepaint; } | 114 bool needsFullPaintInvalidation() const { return m_doFullPaintInvalidation;
} |
| 115 | 115 |
| 116 void updateAcceleratedCompositingSettings(); | 116 void updateAcceleratedCompositingSettings(); |
| 117 | 117 |
| 118 void recalcOverflowAfterStyleChange(); | 118 void recalcOverflowAfterStyleChange(); |
| 119 void updateCompositingLayersAfterStyleChange(); | 119 void updateCompositingLayersAfterStyleChange(); |
| 120 | 120 |
| 121 bool hasCompositedContent() const; | 121 bool hasCompositedContent() const; |
| 122 bool isEnclosedInCompositingLayer() const; | 122 bool isEnclosedInCompositingLayer() const; |
| 123 | 123 |
| 124 void resetScrollbars(); | 124 void resetScrollbars(); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 virtual bool scrollbarsCanBeActive() const OVERRIDE; | 256 virtual bool scrollbarsCanBeActive() const OVERRIDE; |
| 257 | 257 |
| 258 // FIXME: Remove this method once plugin loading is decoupled from layout. | 258 // FIXME: Remove this method once plugin loading is decoupled from layout. |
| 259 void flushAnyPendingPostLayoutTasks(); | 259 void flushAnyPendingPostLayoutTasks(); |
| 260 | 260 |
| 261 virtual bool shouldSuspendScrollAnimations() const OVERRIDE; | 261 virtual bool shouldSuspendScrollAnimations() const OVERRIDE; |
| 262 virtual void scrollbarStyleChanged() OVERRIDE; | 262 virtual void scrollbarStyleChanged() OVERRIDE; |
| 263 | 263 |
| 264 RenderBox* embeddedContentBox() const; | 264 RenderBox* embeddedContentBox() const; |
| 265 | 265 |
| 266 void setTracksRepaints(bool); | 266 void setTracksPaintInvalidations(bool); |
| 267 bool isTrackingRepaints() const { return m_isTrackingRepaints; } | 267 bool isTrackingPaintInvalidations() const { return m_isTrackingPaintInvalida
tions; } |
| 268 void resetTrackedRepaints(); | 268 void resetTrackedPaintInvalidations(); |
| 269 String trackedRepaintRectsAsText() const; | 269 String trackedPaintInvalidationRectsAsText() const; |
| 270 | 270 |
| 271 typedef HashSet<ScrollableArea*> ScrollableAreaSet; | 271 typedef HashSet<ScrollableArea*> ScrollableAreaSet; |
| 272 void addScrollableArea(ScrollableArea*); | 272 void addScrollableArea(ScrollableArea*); |
| 273 void removeScrollableArea(ScrollableArea*); | 273 void removeScrollableArea(ScrollableArea*); |
| 274 const ScrollableAreaSet* scrollableAreas() const { return m_scrollableAreas.
get(); } | 274 const ScrollableAreaSet* scrollableAreas() const { return m_scrollableAreas.
get(); } |
| 275 | 275 |
| 276 // With CSS style "resize:" enabled, a little resizer handle will appear at
the bottom | 276 // With CSS style "resize:" enabled, a little resizer handle will appear at
the bottom |
| 277 // right of the object. We keep track of these resizer areas for checking if
touches | 277 // right of the object. We keep track of these resizer areas for checking if
touches |
| 278 // (implemented using Scroll gesture) are targeting the resizer. | 278 // (implemented using Scroll gesture) are targeting the resizer. |
| 279 typedef HashSet<RenderBox*> ResizerAreaSet; | 279 typedef HashSet<RenderBox*> ResizerAreaSet; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); | 361 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); |
| 362 void scheduleOrPerformPostLayoutTasks(); | 362 void scheduleOrPerformPostLayoutTasks(); |
| 363 void performPostLayoutTasks(); | 363 void performPostLayoutTasks(); |
| 364 | 364 |
| 365 void invalidateTree(RenderObject* root); | 365 void invalidateTree(RenderObject* root); |
| 366 | 366 |
| 367 void gatherDebugLayoutRects(RenderObject* layoutRoot); | 367 void gatherDebugLayoutRects(RenderObject* layoutRoot); |
| 368 | 368 |
| 369 DocumentLifecycle& lifecycle() const; | 369 DocumentLifecycle& lifecycle() const; |
| 370 | 370 |
| 371 virtual void repaintContentRectangle(const IntRect&) OVERRIDE; | 371 virtual void invalidatedContentRectangleForPaint(const IntRect&) OVERRIDE; |
| 372 virtual void contentsResized() OVERRIDE; | 372 virtual void contentsResized() OVERRIDE; |
| 373 virtual void scrollbarExistenceDidChange() OVERRIDE; | 373 virtual void scrollbarExistenceDidChange() OVERRIDE; |
| 374 | 374 |
| 375 // Override ScrollView methods to do point conversion via renderers, in orde
r to | 375 // Override ScrollView methods to do point conversion via renderers, in orde
r to |
| 376 // take transforms into account. | 376 // take transforms into account. |
| 377 virtual IntRect convertToContainingView(const IntRect&) const OVERRIDE; | 377 virtual IntRect convertToContainingView(const IntRect&) const OVERRIDE; |
| 378 virtual IntRect convertFromContainingView(const IntRect&) const OVERRIDE; | 378 virtual IntRect convertFromContainingView(const IntRect&) const OVERRIDE; |
| 379 virtual IntPoint convertToContainingView(const IntPoint&) const OVERRIDE; | 379 virtual IntPoint convertToContainingView(const IntPoint&) const OVERRIDE; |
| 380 virtual IntPoint convertFromContainingView(const IntPoint&) const OVERRIDE; | 380 virtual IntPoint convertFromContainingView(const IntPoint&) const OVERRIDE; |
| 381 | 381 |
| 382 void sendResizeEventIfNeeded(); | 382 void sendResizeEventIfNeeded(); |
| 383 | 383 |
| 384 void updateScrollableAreaSet(); | 384 void updateScrollableAreaSet(); |
| 385 | 385 |
| 386 virtual void notifyPageThatContentAreaWillPaint() const OVERRIDE; | 386 virtual void notifyPageThatContentAreaWillPaint() const OVERRIDE; |
| 387 | 387 |
| 388 void scheduleUpdateWidgetsIfNecessary(); | 388 void scheduleUpdateWidgetsIfNecessary(); |
| 389 void updateWidgetsTimerFired(Timer<FrameView>*); | 389 void updateWidgetsTimerFired(Timer<FrameView>*); |
| 390 bool updateWidgets(); | 390 bool updateWidgets(); |
| 391 | 391 |
| 392 void scrollToAnchor(); | 392 void scrollToAnchor(); |
| 393 void scrollPositionChanged(); | 393 void scrollPositionChanged(); |
| 394 void didScrollTimerFired(Timer<FrameView>*); | 394 void didScrollTimerFired(Timer<FrameView>*); |
| 395 | 395 |
| 396 void updateLayersAndCompositingAfterScrollIfNeeded(); | 396 void updateLayersAndCompositingAfterScrollIfNeeded(); |
| 397 void updateFixedElementRepaintRectsAfterScroll(); | 397 void updateFixedElementPaintInvalidationRectsAfterScroll(); |
| 398 | 398 |
| 399 bool hasCustomScrollbars() const; | 399 bool hasCustomScrollbars() const; |
| 400 bool shouldUseCustomScrollbars(Element*& customScrollbarElement, LocalFrame*
& customScrollbarFrame); | 400 bool shouldUseCustomScrollbars(Element*& customScrollbarElement, LocalFrame*
& customScrollbarFrame); |
| 401 | 401 |
| 402 virtual void updateScrollCorner() OVERRIDE; | 402 virtual void updateScrollCorner() OVERRIDE; |
| 403 | 403 |
| 404 FrameView* parentFrameView() const; | 404 FrameView* parentFrameView() const; |
| 405 | 405 |
| 406 AXObjectCache* axObjectCache() const; | 406 AXObjectCache* axObjectCache() const; |
| 407 void removeFromAXObjectCache(); | 407 void removeFromAXObjectCache(); |
| 408 | 408 |
| 409 void setLayoutSizeInternal(const IntSize&); | 409 void setLayoutSizeInternal(const IntSize&); |
| 410 | 410 |
| 411 bool repaintAllowed() const | 411 bool paintInvalidationAllowed() const |
| 412 { | 412 { |
| 413 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) | 413 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| 414 return true; | 414 return true; |
| 415 | 415 |
| 416 return !isInPerformLayout() || canInvalidatePaintDuringPerformLayout(); | 416 return !isInPerformLayout() || canInvalidatePaintDuringPerformLayout(); |
| 417 } | 417 } |
| 418 | 418 |
| 419 static double s_currentFrameTimeStamp; // used for detecting decoded resourc
e thrash in the cache | 419 static double s_currentFrameTimeStamp; // used for detecting decoded resourc
e thrash in the cache |
| 420 static bool s_inPaintContents; | 420 static bool s_inPaintContents; |
| 421 | 421 |
| 422 LayoutSize m_size; | 422 LayoutSize m_size; |
| 423 | 423 |
| 424 typedef HashSet<RefPtr<RenderEmbeddedObject> > EmbeddedObjectSet; | 424 typedef HashSet<RefPtr<RenderEmbeddedObject> > EmbeddedObjectSet; |
| 425 EmbeddedObjectSet m_widgetUpdateSet; | 425 EmbeddedObjectSet m_widgetUpdateSet; |
| 426 | 426 |
| 427 // FIXME: These are just "children" of the FrameView and should be RefPtr<Wi
dget> instead. | 427 // FIXME: These are just "children" of the FrameView and should be RefPtr<Wi
dget> instead. |
| 428 HashSet<RefPtr<RenderWidget> > m_widgets; | 428 HashSet<RefPtr<RenderWidget> > m_widgets; |
| 429 | 429 |
| 430 RefPtr<LocalFrame> m_frame; | 430 RefPtr<LocalFrame> m_frame; |
| 431 | 431 |
| 432 bool m_doFullRepaint; | 432 bool m_doFullPaintInvalidation; |
| 433 | 433 |
| 434 bool m_canHaveScrollbars; | 434 bool m_canHaveScrollbars; |
| 435 bool m_cannotBlitToWindow; | 435 bool m_cannotBlitToWindow; |
| 436 bool m_isOverlapped; | 436 bool m_isOverlapped; |
| 437 bool m_contentIsOpaque; | 437 bool m_contentIsOpaque; |
| 438 unsigned m_slowRepaintObjectCount; | 438 unsigned m_slowRepaintObjectCount; |
| 439 | 439 |
| 440 bool m_hasPendingLayout; | 440 bool m_hasPendingLayout; |
| 441 RenderObject* m_layoutSubtreeRoot; | 441 RenderObject* m_layoutSubtreeRoot; |
| 442 | 442 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 463 bool m_horizontalOverflow; | 463 bool m_horizontalOverflow; |
| 464 bool m_verticalOverflow; | 464 bool m_verticalOverflow; |
| 465 RenderObject* m_viewportRenderer; | 465 RenderObject* m_viewportRenderer; |
| 466 | 466 |
| 467 bool m_wasScrolledByUser; | 467 bool m_wasScrolledByUser; |
| 468 bool m_inProgrammaticScroll; | 468 bool m_inProgrammaticScroll; |
| 469 bool m_safeToPropagateScrollToParent; | 469 bool m_safeToPropagateScrollToParent; |
| 470 | 470 |
| 471 double m_lastPaintTime; | 471 double m_lastPaintTime; |
| 472 | 472 |
| 473 bool m_isTrackingRepaints; // Used for testing. | 473 bool m_isTrackingPaintInvalidations; // Used for testing. |
| 474 Vector<IntRect> m_trackedRepaintRects; | 474 Vector<IntRect> m_trackedPaintInvalidationRects; |
| 475 | 475 |
| 476 RefPtr<Node> m_nodeToDraw; | 476 RefPtr<Node> m_nodeToDraw; |
| 477 PaintBehavior m_paintBehavior; | 477 PaintBehavior m_paintBehavior; |
| 478 bool m_isPainting; | 478 bool m_isPainting; |
| 479 | 479 |
| 480 unsigned m_visuallyNonEmptyCharacterCount; | 480 unsigned m_visuallyNonEmptyCharacterCount; |
| 481 unsigned m_visuallyNonEmptyPixelCount; | 481 unsigned m_visuallyNonEmptyPixelCount; |
| 482 bool m_isVisuallyNonEmpty; | 482 bool m_isVisuallyNonEmpty; |
| 483 bool m_firstVisuallyNonEmptyLayoutCallbackPending; | 483 bool m_firstVisuallyNonEmptyLayoutCallbackPending; |
| 484 | 484 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); | 560 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); |
| 561 } | 561 } |
| 562 private: | 562 private: |
| 563 FrameView* m_view; | 563 FrameView* m_view; |
| 564 bool m_originalValue; | 564 bool m_originalValue; |
| 565 }; | 565 }; |
| 566 | 566 |
| 567 } // namespace WebCore | 567 } // namespace WebCore |
| 568 | 568 |
| 569 #endif // FrameView_h | 569 #endif // FrameView_h |
| OLD | NEW |