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

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

Issue 1126883002: Change all one-off lifecycle callers to FrameView::updateLayoutAndStyleForPainting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 | « Source/core/editing/iterators/TextIteratorTest.cpp ('k') | 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 void setIsPainting(bool val) { m_isPainting = val; } 221 void setIsPainting(bool val) { m_isPainting = val; }
222 bool isPainting() const; 222 bool isPainting() const;
223 void setLastPaintTime(double val) { m_lastPaintTime = val; } 223 void setLastPaintTime(double val) { m_lastPaintTime = val; }
224 bool hasEverPainted() const { return m_lastPaintTime; } 224 bool hasEverPainted() const { return m_lastPaintTime; }
225 void setNodeToDraw(Node*); 225 void setNodeToDraw(Node*);
226 Node* nodeToDraw() { return m_nodeToDraw.get(); } 226 Node* nodeToDraw() { return m_nodeToDraw.get(); }
227 227
228 Color documentBackgroundColor() const; 228 Color documentBackgroundColor() const;
229 229
230 void updateLayoutAndStyleForPainting(); 230 void updateLayoutAndStyleForPainting();
231 void updateLayoutAndStyleIfNeededRecursive();
232 231
233 void invalidateTreeIfNeededRecursive();
234 bool invalidateViewportConstrainedObjects(); 232 bool invalidateViewportConstrainedObjects();
235 233
236 void incrementVisuallyNonEmptyCharacterCount(unsigned); 234 void incrementVisuallyNonEmptyCharacterCount(unsigned);
237 void incrementVisuallyNonEmptyPixelCount(const IntSize&); 235 void incrementVisuallyNonEmptyPixelCount(const IntSize&);
238 void setIsVisuallyNonEmpty() { m_isVisuallyNonEmpty = true; } 236 void setIsVisuallyNonEmpty() { m_isVisuallyNonEmpty = true; }
239 void enableAutoSizeMode(const IntSize& minSize, const IntSize& maxSize); 237 void enableAutoSizeMode(const IntSize& minSize, const IntSize& maxSize);
240 void disableAutoSizeMode(); 238 void disableAutoSizeMode();
241 239
242 void forceLayoutForPagination(const FloatSize& pageSize, const FloatSize& or iginalPageSize, float maximumShrinkFactor); 240 void forceLayoutForPagination(const FloatSize& pageSize, const FloatSize& or iginalPageSize, float maximumShrinkFactor);
243 241
244 bool scrollToFragment(const KURL&); 242 bool scrollToFragment(const KURL&);
245 bool scrollToAnchor(const String&); 243 bool scrollToAnchor(const String&);
246 void maintainScrollPositionAtAnchor(Node*); 244 void maintainScrollPositionAtAnchor(Node*);
247 245
248 void scrollContentsIfNeededRecursive();
249
250 // Methods to convert points and rects between the coordinate space of the l ayoutObject, and this view. 246 // Methods to convert points and rects between the coordinate space of the l ayoutObject, and this view.
251 IntRect convertFromLayoutObject(const LayoutObject&, const IntRect&) const; 247 IntRect convertFromLayoutObject(const LayoutObject&, const IntRect&) const;
252 IntRect convertToLayoutObject(const LayoutObject&, const IntRect&) const; 248 IntRect convertToLayoutObject(const LayoutObject&, const IntRect&) const;
253 IntPoint convertFromLayoutObject(const LayoutObject&, const IntPoint&) const ; 249 IntPoint convertFromLayoutObject(const LayoutObject&, const IntPoint&) const ;
254 IntPoint convertToLayoutObject(const LayoutObject&, const IntPoint&) const; 250 IntPoint convertToLayoutObject(const LayoutObject&, const IntPoint&) const;
255 251
256 bool isFrameViewScrollCorner(LayoutScrollbarPart* scrollCorner) const { retu rn m_scrollCorner == scrollCorner; } 252 bool isFrameViewScrollCorner(LayoutScrollbarPart* scrollCorner) const { retu rn m_scrollCorner == scrollCorner; }
257 253
258 enum ScrollingReasons { 254 enum ScrollingReasons {
259 Scrollable, 255 Scrollable,
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 explicit InUpdateScrollbarsScope(FrameView* view) 610 explicit InUpdateScrollbarsScope(FrameView* view)
615 : m_scope(view->m_inUpdateScrollbars, true) 611 : m_scope(view->m_inUpdateScrollbars, true)
616 { } 612 { }
617 private: 613 private:
618 TemporaryChange<bool> m_scope; 614 TemporaryChange<bool> m_scope;
619 }; 615 };
620 616
621 private: 617 private:
622 explicit FrameView(LocalFrame*); 618 explicit FrameView(LocalFrame*);
623 619
620 void updateLayoutAndStyleForPaintingInternal();
621 void invalidateTreeIfNeededRecursive();
622 void scrollContentsIfNeededRecursive();
623 void updateLayoutAndStyleIfNeededRecursive();
624
624 void reset(); 625 void reset();
625 void init(); 626 void init();
626 627
627 void clearLayoutSubtreeRootsAndMarkContainingBlocks(); 628 void clearLayoutSubtreeRootsAndMarkContainingBlocks();
628 629
629 // Called when our frame rect changes (or the rect/scroll position of an anc estor changes). 630 // Called when our frame rect changes (or the rect/scroll position of an anc estor changes).
630 virtual void frameRectsChanged() override; 631 virtual void frameRectsChanged() override;
631 632
632 friend class LayoutPart; 633 friend class LayoutPart;
633 634
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 static const unsigned visualPixelThreshold = 32 * 32; 876 static const unsigned visualPixelThreshold = 32 * 32;
876 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 877 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
877 setIsVisuallyNonEmpty(); 878 setIsVisuallyNonEmpty();
878 } 879 }
879 880
880 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 881 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
881 882
882 } // namespace blink 883 } // namespace blink
883 884
884 #endif // FrameView_h 885 #endif // FrameView_h
OLDNEW
« no previous file with comments | « Source/core/editing/iterators/TextIteratorTest.cpp ('k') | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698