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

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

Issue 1217943010: Add a FrameView lifecycle method that just updates layout, style and compositing. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 PaintBehavior paintBehavior() const; 220 PaintBehavior paintBehavior() const;
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 // Run all needed lifecycle stages. After calling this method, all frames wi ll be in the lifecycle state PaintInvalidationClean.
231 void updateAllLifecyclePhases();
pdr. 2015/07/01 22:16:57 updateLifecycleToPaintInvalidationClean?
232
233 // Computes the style, layout and compositing lifecycle stages if needed. Af ter calling this method, all frames wil lbe in a lifecycle
pdr. 2015/07/01 22:16:58 "wil lbe" -> "will be"
234 // state >= CompositingClean.
235 void updateLifecycleToCompositingClean();
231 236
232 bool invalidateViewportConstrainedObjects(); 237 bool invalidateViewportConstrainedObjects();
233 238
234 void incrementVisuallyNonEmptyCharacterCount(unsigned); 239 void incrementVisuallyNonEmptyCharacterCount(unsigned);
235 void incrementVisuallyNonEmptyPixelCount(const IntSize&); 240 void incrementVisuallyNonEmptyPixelCount(const IntSize&);
236 void setIsVisuallyNonEmpty() { m_isVisuallyNonEmpty = true; } 241 void setIsVisuallyNonEmpty() { m_isVisuallyNonEmpty = true; }
237 void enableAutoSizeMode(const IntSize& minSize, const IntSize& maxSize); 242 void enableAutoSizeMode(const IntSize& minSize, const IntSize& maxSize);
238 void disableAutoSizeMode(); 243 void disableAutoSizeMode();
239 244
240 void forceLayoutForPagination(const FloatSize& pageSize, const FloatSize& or iginalPageSize, float maximumShrinkFactor); 245 void forceLayoutForPagination(const FloatSize& pageSize, const FloatSize& or iginalPageSize, float maximumShrinkFactor);
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 private: 601 private:
597 TemporaryChange<bool> m_scope; 602 TemporaryChange<bool> m_scope;
598 }; 603 };
599 604
600 private: 605 private:
601 explicit FrameView(LocalFrame*); 606 explicit FrameView(LocalFrame*);
602 607
603 virtual void setScrollOffset(const IntPoint&, ScrollType) override; 608 virtual void setScrollOffset(const IntPoint&, ScrollType) override;
604 virtual void setScrollOffset(const DoublePoint&, ScrollType) override; 609 virtual void setScrollOffset(const DoublePoint&, ScrollType) override;
605 610
606 void updateLayoutAndStyleForPaintingInternal(); 611 void updateAllLifecyclePhasesInternal();
607 void invalidateTreeIfNeededRecursive(); 612 void invalidateTreeIfNeededRecursive();
608 void scrollContentsIfNeededRecursive(); 613 void scrollContentsIfNeededRecursive();
609 void updateLayoutAndStyleIfNeededRecursive(); 614 void updateStyleAndLayoutIfNeededRecursive();
610 615
611 void reset(); 616 void reset();
612 void init(); 617 void init();
613 618
614 void clearLayoutSubtreeRootsAndMarkContainingBlocks(); 619 void clearLayoutSubtreeRootsAndMarkContainingBlocks();
615 620
616 // Called when our frame rect changes (or the rect/scroll position of an anc estor changes). 621 // Called when our frame rect changes (or the rect/scroll position of an anc estor changes).
617 virtual void frameRectsChanged() override; 622 virtual void frameRectsChanged() override;
618 623
619 friend class LayoutPart; 624 friend class LayoutPart;
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 static const unsigned visualPixelThreshold = 32 * 32; 872 static const unsigned visualPixelThreshold = 32 * 32;
868 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 873 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
869 setIsVisuallyNonEmpty(); 874 setIsVisuallyNonEmpty();
870 } 875 }
871 876
872 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 877 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
873 878
874 } // namespace blink 879 } // namespace blink
875 880
876 #endif // FrameView_h 881 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698