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

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

Issue 204813002: Optimize layout/repaint on FrameView resize (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Keep FrameView::m_doFullRepaint Created 6 years, 9 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
« no previous file with comments | « no previous file | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 void setCanRepaintDuringPerformLayout(bool b) { m_canRepaintDuringPerformLay out = b; } 95 void setCanRepaintDuringPerformLayout(bool b) { m_canRepaintDuringPerformLay out = b; }
96 bool canRepaintDuringPerformLayout() const { return m_canRepaintDuringPerfor mLayout; } 96 bool canRepaintDuringPerformLayout() const { return m_canRepaintDuringPerfor mLayout; }
97 97
98 RenderObject* layoutRoot(bool onlyDuringLayout = false) const; 98 RenderObject* layoutRoot(bool onlyDuringLayout = false) const;
99 void clearLayoutSubtreeRoot() { m_layoutSubtreeRoot = 0; } 99 void clearLayoutSubtreeRoot() { m_layoutSubtreeRoot = 0; }
100 int layoutCount() const { return m_layoutCount; } 100 int layoutCount() const { return m_layoutCount; }
101 101
102 bool needsLayout() const; 102 bool needsLayout() const;
103 void setNeedsLayout(); 103 void setNeedsLayout();
104 void setNeedsResizeLayout();
104 105
105 // Methods for getting/setting the size Blink should use to layout the conte nts. 106 // Methods for getting/setting the size Blink should use to layout the conte nts.
106 IntSize layoutSize(IncludeScrollbarsInRect = ExcludeScrollbars) const; 107 IntSize layoutSize(IncludeScrollbarsInRect = ExcludeScrollbars) const;
107 void setLayoutSize(const IntSize&); 108 void setLayoutSize(const IntSize&);
108 109
109 // If this is set to false, the layout size will need to be explicitly set b y the owner. 110 // 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 111 // E.g. WebViewImpl sets its mainFrame's layout size manually
111 void setLayoutSizeFixedToFrameSize(bool isFixed) { m_layoutSizeFixedToFrameS ize = isFixed; } 112 void setLayoutSizeFixedToFrameSize(bool isFixed) { m_layoutSizeFixedToFrameS ize = isFixed; }
112 bool layoutSizeFixedToFrameSize() { return m_layoutSizeFixedToFrameSize; } 113 bool layoutSizeFixedToFrameSize() { return m_layoutSizeFixedToFrameSize; }
113 114
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 void flushAnyPendingPostLayoutTasks(); 259 void flushAnyPendingPostLayoutTasks();
259 260
260 virtual bool shouldSuspendScrollAnimations() const OVERRIDE; 261 virtual bool shouldSuspendScrollAnimations() const OVERRIDE;
261 virtual void scrollbarStyleChanged(int newStyle, bool forceUpdate) OVERRIDE; 262 virtual void scrollbarStyleChanged(int newStyle, bool forceUpdate) OVERRIDE;
262 263
263 RenderBox* embeddedContentBox() const; 264 RenderBox* embeddedContentBox() const;
264 265
265 void setTracksRepaints(bool); 266 void setTracksRepaints(bool);
266 bool isTrackingRepaints() const { return m_isTrackingRepaints; } 267 bool isTrackingRepaints() const { return m_isTrackingRepaints; }
267 void resetTrackedRepaints(); 268 void resetTrackedRepaints();
269 const Vector<IntRect>& trackedRepaintRects() const { return m_trackedRepaint Rects; }
268 String trackedRepaintRectsAsText() const; 270 String trackedRepaintRectsAsText() const;
269 271
270 typedef HashSet<ScrollableArea*> ScrollableAreaSet; 272 typedef HashSet<ScrollableArea*> ScrollableAreaSet;
271 // Returns whether the scrollable area has just been newly added. 273 // Returns whether the scrollable area has just been newly added.
272 bool addScrollableArea(ScrollableArea*); 274 bool addScrollableArea(ScrollableArea*);
273 // Returns whether the scrollable area has just been removed. 275 // Returns whether the scrollable area has just been removed.
274 bool removeScrollableArea(ScrollableArea*); 276 bool removeScrollableArea(ScrollableArea*);
275 bool containsScrollableArea(const ScrollableArea*) const; 277 bool containsScrollableArea(const ScrollableArea*) const;
276 const ScrollableAreaSet* scrollableAreas() const { return m_scrollableAreas. get(); } 278 const ScrollableAreaSet* scrollableAreas() const { return m_scrollableAreas. get(); }
277 279
(...skipping 283 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 | « no previous file | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698