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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 bool isInLayout() const { return m_inLayout; } | 101 bool isInLayout() const { return m_inLayout; } |
102 | 102 |
103 RenderObject* layoutRoot(bool onlyDuringLayout = false) const; | 103 RenderObject* layoutRoot(bool onlyDuringLayout = false) const; |
104 void clearLayoutRoot() { m_layoutRoot = 0; } | 104 void clearLayoutRoot() { m_layoutRoot = 0; } |
105 int layoutCount() const { return m_layoutCount; } | 105 int layoutCount() const { return m_layoutCount; } |
106 | 106 |
107 bool needsLayout() const; | 107 bool needsLayout() const; |
108 void setNeedsLayout(); | 108 void setNeedsLayout(); |
109 void setViewportConstrainedObjectsNeedLayout(); | 109 void setViewportConstrainedObjectsNeedLayout(); |
110 | 110 |
| 111 // Methods for getting/setting the size Blink should use to layout the conte
nts. |
| 112 IntSize layoutSize(IncludeScrollbarsInRect = ExcludeScrollbars) const; |
| 113 void setLayoutSize(const IntSize&); |
| 114 |
| 115 // If this is set to false, the layout size will need to be explicitly set b
y the owner. |
| 116 // E.g. WebViewImpl sets its mainFrame's layout size manually |
| 117 void setLayoutSizeFixedToFrameSize(bool isFixed) { m_layoutSizeFixedToFrameS
ize = isFixed; } |
| 118 bool layoutSizeFixedToFrameSize() { return m_layoutSizeFixedToFrameSize; } |
| 119 |
111 bool needsFullRepaint() const { return m_doFullRepaint; } | 120 bool needsFullRepaint() const { return m_doFullRepaint; } |
112 | 121 |
113 void serviceScriptedAnimations(double monotonicAnimationStartTime); | 122 void serviceScriptedAnimations(double monotonicAnimationStartTime); |
114 | 123 |
115 void updateCompositingLayersAfterStyleChange(); | 124 void updateCompositingLayersAfterStyleChange(); |
116 void updateCompositingLayersAfterLayout(); | 125 void updateCompositingLayersAfterLayout(); |
117 | 126 |
118 bool hasCompositedContent() const; | 127 bool hasCompositedContent() const; |
119 bool isEnclosedInCompositingLayer() const; | 128 bool isEnclosedInCompositingLayer() const; |
120 | 129 |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 explicit FrameView(Frame*); | 356 explicit FrameView(Frame*); |
348 | 357 |
349 void beginDeferredRepaints(); | 358 void beginDeferredRepaints(); |
350 void endDeferredRepaints(); | 359 void endDeferredRepaints(); |
351 void flushDeferredRepaints(); | 360 void flushDeferredRepaints(); |
352 void startDeferredRepaintTimer(double delay); | 361 void startDeferredRepaintTimer(double delay); |
353 | 362 |
354 void reset(); | 363 void reset(); |
355 void init(); | 364 void init(); |
356 | 365 |
| 366 virtual void frameRectsChanged(); |
357 virtual bool isFrameView() const OVERRIDE { return true; } | 367 virtual bool isFrameView() const OVERRIDE { return true; } |
358 | 368 |
359 friend class RenderWidget; | 369 friend class RenderWidget; |
360 bool useSlowRepaints(bool considerOverlap = true) const; | 370 bool useSlowRepaints(bool considerOverlap = true) const; |
361 bool useSlowRepaintsIfNotOverlapped() const; | 371 bool useSlowRepaintsIfNotOverlapped() const; |
362 void updateCanBlitOnScrollRecursively(); | 372 void updateCanBlitOnScrollRecursively(); |
363 bool contentsInCompositedLayer() const; | 373 bool contentsInCompositedLayer() const; |
364 | 374 |
365 void applyOverflowToViewport(RenderObject*, ScrollbarMode& hMode, ScrollbarM
ode& vMode); | 375 void applyOverflowToViewport(RenderObject*, ScrollbarMode& hMode, ScrollbarM
ode& vMode); |
366 void applyPaginationToViewport(); | 376 void applyPaginationToViewport(); |
367 | 377 |
368 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); | 378 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); |
369 | 379 |
370 void paintControlTints(); | 380 void paintControlTints(); |
371 | 381 |
372 void updateCounters(); | 382 void updateCounters(); |
373 void autoSizeIfEnabled(); | 383 void autoSizeIfEnabled(); |
374 void forceLayoutParentViewIfNeeded(); | 384 void forceLayoutParentViewIfNeeded(); |
375 void performPreLayoutTasks(); | 385 void performPreLayoutTasks(); |
376 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); | 386 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); |
377 void scheduleOrPerformPostLayoutTasks(); | 387 void scheduleOrPerformPostLayoutTasks(); |
378 void performPostLayoutTasks(); | 388 void performPostLayoutTasks(); |
379 | 389 |
380 virtual void repaintContentRectangle(const IntRect&); | 390 virtual void repaintContentRectangle(const IntRect&); |
381 virtual void contentsResized() OVERRIDE; | 391 virtual void contentsResized() OVERRIDE; |
382 virtual void visibleContentsResized(); | 392 virtual void scrollbarExistenceDidChange(); |
383 | 393 |
384 // Override ScrollView methods to do point conversion via renderers, in orde
r to | 394 // Override ScrollView methods to do point conversion via renderers, in orde
r to |
385 // take transforms into account. | 395 // take transforms into account. |
386 virtual IntRect convertToContainingView(const IntRect&) const OVERRIDE; | 396 virtual IntRect convertToContainingView(const IntRect&) const OVERRIDE; |
387 virtual IntRect convertFromContainingView(const IntRect&) const OVERRIDE; | 397 virtual IntRect convertFromContainingView(const IntRect&) const OVERRIDE; |
388 virtual IntPoint convertToContainingView(const IntPoint&) const OVERRIDE; | 398 virtual IntPoint convertToContainingView(const IntPoint&) const OVERRIDE; |
389 virtual IntPoint convertFromContainingView(const IntPoint&) const OVERRIDE; | 399 virtual IntPoint convertFromContainingView(const IntPoint&) const OVERRIDE; |
390 | 400 |
391 // ScrollableArea interface | 401 // ScrollableArea interface |
392 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE; | 402 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 | 435 |
426 virtual void updateScrollCorner(); | 436 virtual void updateScrollCorner(); |
427 | 437 |
428 FrameView* parentFrameView() const; | 438 FrameView* parentFrameView() const; |
429 | 439 |
430 virtual AXObjectCache* axObjectCache() const; | 440 virtual AXObjectCache* axObjectCache() const; |
431 void removeFromAXObjectCache(); | 441 void removeFromAXObjectCache(); |
432 | 442 |
433 bool isMainFrame() const; | 443 bool isMainFrame() const; |
434 | 444 |
| 445 void setLayoutSizeInternal(const IntSize&); |
| 446 |
435 static double s_currentFrameTimeStamp; // used for detecting decoded resourc
e thrash in the cache | 447 static double s_currentFrameTimeStamp; // used for detecting decoded resourc
e thrash in the cache |
436 static bool s_inPaintContents; | 448 static bool s_inPaintContents; |
437 | 449 |
438 LayoutSize m_size; | 450 LayoutSize m_size; |
439 LayoutSize m_margins; | 451 LayoutSize m_margins; |
440 | 452 |
441 typedef HashSet<RenderObject*> RenderObjectSet; | 453 typedef HashSet<RenderObject*> RenderObjectSet; |
442 OwnPtr<RenderObjectSet> m_widgetUpdateSet; | 454 OwnPtr<RenderObjectSet> m_widgetUpdateSet; |
443 RefPtr<Frame> m_frame; | 455 RefPtr<Frame> m_frame; |
444 | 456 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 static double s_normalDeferredRepaintDelay; | 546 static double s_normalDeferredRepaintDelay; |
535 static double s_initialDeferredRepaintDelayDuringLoading; | 547 static double s_initialDeferredRepaintDelayDuringLoading; |
536 static double s_maxDeferredRepaintDelayDuringLoading; | 548 static double s_maxDeferredRepaintDelayDuringLoading; |
537 static double s_deferredRepaintDelayIncrementDuringLoading; | 549 static double s_deferredRepaintDelayIncrementDuringLoading; |
538 | 550 |
539 bool m_hasSoftwareFilters; | 551 bool m_hasSoftwareFilters; |
540 | 552 |
541 float m_visibleContentScaleFactor; | 553 float m_visibleContentScaleFactor; |
542 | 554 |
543 PartialLayoutState m_partialLayout; | 555 PartialLayoutState m_partialLayout; |
| 556 IntSize m_layoutSize; |
| 557 bool m_layoutSizeFixedToFrameSize; |
544 }; | 558 }; |
545 | 559 |
546 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) | 560 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) |
547 { | 561 { |
548 if (m_isVisuallyNonEmpty) | 562 if (m_isVisuallyNonEmpty) |
549 return; | 563 return; |
550 m_visuallyNonEmptyCharacterCount += count; | 564 m_visuallyNonEmptyCharacterCount += count; |
551 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didFirstVisuallyNonEmptyLayout. | 565 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didFirstVisuallyNonEmptyLayout. |
552 // The first few hundred characters rarely contain the interesting content o
f the page. | 566 // The first few hundred characters rarely contain the interesting content o
f the page. |
553 static const unsigned visualCharacterThreshold = 200; | 567 static const unsigned visualCharacterThreshold = 200; |
(...skipping 23 matching lines...) Expand all Loading... |
577 ASSERT(!widget || widget->isFrameView()); | 591 ASSERT(!widget || widget->isFrameView()); |
578 return static_cast<const FrameView*>(widget); | 592 return static_cast<const FrameView*>(widget); |
579 } | 593 } |
580 | 594 |
581 // This will catch anyone doing an unnecessary cast. | 595 // This will catch anyone doing an unnecessary cast. |
582 void toFrameView(const FrameView*); | 596 void toFrameView(const FrameView*); |
583 | 597 |
584 } // namespace WebCore | 598 } // namespace WebCore |
585 | 599 |
586 #endif // FrameView_h | 600 #endif // FrameView_h |
OLD | NEW |