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

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

Issue 146023008: Add layout states to DocumentLifecycle state machine (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Whitelist one more transition' Created 6 years, 10 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 | Annotate | Revision Log
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation) OVERRIDE ; 82 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation) OVERRIDE ;
83 83
84 virtual void setContentsSize(const IntSize&) OVERRIDE; 84 virtual void setContentsSize(const IntSize&) OVERRIDE;
85 85
86 void layout(bool allowSubtree = true); 86 void layout(bool allowSubtree = true);
87 bool didFirstLayout() const; 87 bool didFirstLayout() const;
88 void scheduleRelayout(); 88 void scheduleRelayout();
89 void scheduleRelayoutOfSubtree(RenderObject*); 89 void scheduleRelayoutOfSubtree(RenderObject*);
90 bool layoutPending() const; 90 bool layoutPending() const;
91 bool isInPerformLayout() const { return m_inPerformLayout; } 91 bool isInPerformLayout() const;
92 92
93 void setCanRepaintDuringPerformLayout(bool b) { m_canRepaintDuringPerformLay out = b; } 93 void setCanRepaintDuringPerformLayout(bool b) { m_canRepaintDuringPerformLay out = b; }
94 bool canRepaintDuringPerformLayout() const { return m_canRepaintDuringPerfor mLayout; } 94 bool canRepaintDuringPerformLayout() const { return m_canRepaintDuringPerfor mLayout; }
95 95
96 RenderObject* layoutRoot(bool onlyDuringLayout = false) const; 96 RenderObject* layoutRoot(bool onlyDuringLayout = false) const;
97 void clearLayoutSubtreeRoot() { m_layoutSubtreeRoot = 0; } 97 void clearLayoutSubtreeRoot() { m_layoutSubtreeRoot = 0; }
98 int layoutCount() const { return m_layoutCount; } 98 int layoutCount() const { return m_layoutCount; }
99 99
100 bool needsLayout() const; 100 bool needsLayout() const;
101 void setNeedsLayout(); 101 void setNeedsLayout();
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 void forceLayoutParentViewIfNeeded(); 348 void forceLayoutParentViewIfNeeded();
349 void performPreLayoutTasks(); 349 void performPreLayoutTasks();
350 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); 350 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout);
351 void scheduleOrPerformPostLayoutTasks(); 351 void scheduleOrPerformPostLayoutTasks();
352 void performPostLayoutTasks(); 352 void performPostLayoutTasks();
353 353
354 void repaintTree(RenderObject* root); 354 void repaintTree(RenderObject* root);
355 355
356 void gatherDebugLayoutRects(RenderObject* layoutRoot); 356 void gatherDebugLayoutRects(RenderObject* layoutRoot);
357 357
358 DocumentLifecycle& lifecycle() const;
359
358 virtual void repaintContentRectangle(const IntRect&) OVERRIDE; 360 virtual void repaintContentRectangle(const IntRect&) OVERRIDE;
359 virtual void contentsResized() OVERRIDE; 361 virtual void contentsResized() OVERRIDE;
360 virtual void scrollbarExistenceDidChange() OVERRIDE; 362 virtual void scrollbarExistenceDidChange() OVERRIDE;
361 363
362 // Override ScrollView methods to do point conversion via renderers, in orde r to 364 // Override ScrollView methods to do point conversion via renderers, in orde r to
363 // take transforms into account. 365 // take transforms into account.
364 virtual IntRect convertToContainingView(const IntRect&) const OVERRIDE; 366 virtual IntRect convertToContainingView(const IntRect&) const OVERRIDE;
365 virtual IntRect convertFromContainingView(const IntRect&) const OVERRIDE; 367 virtual IntRect convertFromContainingView(const IntRect&) const OVERRIDE;
366 virtual IntPoint convertToContainingView(const IntPoint&) const OVERRIDE; 368 virtual IntPoint convertToContainingView(const IntPoint&) const OVERRIDE;
367 virtual IntPoint convertFromContainingView(const IntPoint&) const OVERRIDE; 369 virtual IntPoint convertFromContainingView(const IntPoint&) const OVERRIDE;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 bool isMainFrame() const; 407 bool isMainFrame() const;
406 408
407 void setLayoutSizeInternal(const IntSize&); 409 void setLayoutSizeInternal(const IntSize&);
408 410
409 bool isSubtreeLayout() const { return !!m_layoutSubtreeRoot; } 411 bool isSubtreeLayout() const { return !!m_layoutSubtreeRoot; }
410 bool repaintAllowed() const 412 bool repaintAllowed() const
411 { 413 {
412 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) 414 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
413 return true; 415 return true;
414 416
415 return !m_inPerformLayout || canRepaintDuringPerformLayout(); 417 return !isInPerformLayout() || canRepaintDuringPerformLayout();
416 } 418 }
417 419
418 static double s_currentFrameTimeStamp; // used for detecting decoded resourc e thrash in the cache 420 static double s_currentFrameTimeStamp; // used for detecting decoded resourc e thrash in the cache
419 static bool s_inPaintContents; 421 static bool s_inPaintContents;
420 422
421 LayoutSize m_size; 423 LayoutSize m_size;
422 424
423 typedef HashSet<RefPtr<RenderEmbeddedObject> > EmbeddedObjectSet; 425 typedef HashSet<RefPtr<RenderEmbeddedObject> > EmbeddedObjectSet;
424 EmbeddedObjectSet m_widgetUpdateSet; 426 EmbeddedObjectSet m_widgetUpdateSet;
425 427
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 m_view->setCanRepaintDuringPerformLayout(m_originalValue); 563 m_view->setCanRepaintDuringPerformLayout(m_originalValue);
562 } 564 }
563 private: 565 private:
564 FrameView* m_view; 566 FrameView* m_view;
565 bool m_originalValue; 567 bool m_originalValue;
566 }; 568 };
567 569
568 } // namespace WebCore 570 } // namespace WebCore
569 571
570 #endif // FrameView_h 572 #endif // FrameView_h
OLDNEW
« no previous file with comments | « Source/core/frame/DeprecatedScheduleStyleRecalcDuringLayout.cpp ('k') | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698