Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: Source/core/page/FrameView.h

Issue 23819019: Refactor fixed layout mode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: git rebase Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
111 bool needsFullRepaint() const { return m_doFullRepaint; } 115 bool needsFullRepaint() const { return m_doFullRepaint; }
112 116
113 void serviceScriptedAnimations(double monotonicAnimationStartTime); 117 void serviceScriptedAnimations(double monotonicAnimationStartTime);
114 118
115 void updateCompositingLayersAfterStyleChange(); 119 void updateCompositingLayersAfterStyleChange();
116 void updateCompositingLayersAfterLayout(); 120 void updateCompositingLayersAfterLayout();
117 121
118 bool hasCompositedContent() const; 122 bool hasCompositedContent() const;
119 bool isEnclosedInCompositingLayer() const; 123 bool isEnclosedInCompositingLayer() const;
120 124
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 346
343 virtual bool isVerticalDocument() const; 347 virtual bool isVerticalDocument() const;
344 virtual bool isFlippedDocument() const; 348 virtual bool isFlippedDocument() const;
345 349
346 private: 350 private:
347 explicit FrameView(Frame*); 351 explicit FrameView(Frame*);
348 352
349 void reset(); 353 void reset();
350 void init(); 354 void init();
351 355
356 virtual void frameRectsChanged();
352 virtual bool isFrameView() const OVERRIDE { return true; } 357 virtual bool isFrameView() const OVERRIDE { return true; }
353 358
354 friend class RenderWidget; 359 friend class RenderWidget;
355 bool useSlowRepaints(bool considerOverlap = true) const; 360 bool useSlowRepaints(bool considerOverlap = true) const;
356 bool useSlowRepaintsIfNotOverlapped() const; 361 bool useSlowRepaintsIfNotOverlapped() const;
357 void updateCanBlitOnScrollRecursively(); 362 void updateCanBlitOnScrollRecursively();
358 bool contentsInCompositedLayer() const; 363 bool contentsInCompositedLayer() const;
359 364
360 void applyOverflowToViewport(RenderObject*, ScrollbarMode& hMode, ScrollbarM ode& vMode); 365 void applyOverflowToViewport(RenderObject*, ScrollbarMode& hMode, ScrollbarM ode& vMode);
361 void applyPaginationToViewport(); 366 void applyPaginationToViewport();
362 367
363 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); 368 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow);
364 369
365 void paintControlTints(); 370 void paintControlTints();
366 371
367 void updateCounters(); 372 void updateCounters();
368 void autoSizeIfEnabled(); 373 void autoSizeIfEnabled();
369 void forceLayoutParentViewIfNeeded(); 374 void forceLayoutParentViewIfNeeded();
370 void performPreLayoutTasks(); 375 void performPreLayoutTasks();
371 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); 376 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout);
372 void scheduleOrPerformPostLayoutTasks(); 377 void scheduleOrPerformPostLayoutTasks();
373 void performPostLayoutTasks(); 378 void performPostLayoutTasks();
374 379
375 virtual void repaintContentRectangle(const IntRect&); 380 virtual void repaintContentRectangle(const IntRect&);
376 virtual void contentsResized() OVERRIDE; 381 virtual void contentsResized() OVERRIDE;
377 virtual void visibleContentsResized(); 382 virtual void scrollbarExistenceDidChange();
378 383
379 // Override ScrollView methods to do point conversion via renderers, in orde r to 384 // Override ScrollView methods to do point conversion via renderers, in orde r to
380 // take transforms into account. 385 // take transforms into account.
381 virtual IntRect convertToContainingView(const IntRect&) const OVERRIDE; 386 virtual IntRect convertToContainingView(const IntRect&) const OVERRIDE;
382 virtual IntRect convertFromContainingView(const IntRect&) const OVERRIDE; 387 virtual IntRect convertFromContainingView(const IntRect&) const OVERRIDE;
383 virtual IntPoint convertToContainingView(const IntPoint&) const OVERRIDE; 388 virtual IntPoint convertToContainingView(const IntPoint&) const OVERRIDE;
384 virtual IntPoint convertFromContainingView(const IntPoint&) const OVERRIDE; 389 virtual IntPoint convertFromContainingView(const IntPoint&) const OVERRIDE;
385 390
386 // ScrollableArea interface 391 // ScrollableArea interface
387 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE; 392 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 static double s_normalDeferredRepaintDelay; 536 static double s_normalDeferredRepaintDelay;
532 static double s_initialDeferredRepaintDelayDuringLoading; 537 static double s_initialDeferredRepaintDelayDuringLoading;
533 static double s_maxDeferredRepaintDelayDuringLoading; 538 static double s_maxDeferredRepaintDelayDuringLoading;
534 static double s_deferredRepaintDelayIncrementDuringLoading; 539 static double s_deferredRepaintDelayIncrementDuringLoading;
535 540
536 bool m_hasSoftwareFilters; 541 bool m_hasSoftwareFilters;
537 542
538 float m_visibleContentScaleFactor; 543 float m_visibleContentScaleFactor;
539 544
540 PartialLayoutState m_partialLayout; 545 PartialLayoutState m_partialLayout;
546 IntSize m_layoutSize;
541 }; 547 };
542 548
543 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) 549 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
544 { 550 {
545 if (m_isVisuallyNonEmpty) 551 if (m_isVisuallyNonEmpty)
546 return; 552 return;
547 m_visuallyNonEmptyCharacterCount += count; 553 m_visuallyNonEmptyCharacterCount += count;
548 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout. 554 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout.
549 // The first few hundred characters rarely contain the interesting content o f the page. 555 // The first few hundred characters rarely contain the interesting content o f the page.
550 static const unsigned visualCharacterThreshold = 200; 556 static const unsigned visualCharacterThreshold = 200;
(...skipping 23 matching lines...) Expand all
574 ASSERT(!widget || widget->isFrameView()); 580 ASSERT(!widget || widget->isFrameView());
575 return static_cast<const FrameView*>(widget); 581 return static_cast<const FrameView*>(widget);
576 } 582 }
577 583
578 // This will catch anyone doing an unnecessary cast. 584 // This will catch anyone doing an unnecessary cast.
579 void toFrameView(const FrameView*); 585 void toFrameView(const FrameView*);
580 586
581 } // namespace WebCore 587 } // namespace WebCore
582 588
583 #endif // FrameView_h 589 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698