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

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

Issue 603193005: Move the Widget hierarchy to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switch LocalFrame::m_pluginElements rep to HashSet<HTMLPlugInElement*> Created 6 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 class RenderBox; 56 class RenderBox;
57 class RenderEmbeddedObject; 57 class RenderEmbeddedObject;
58 class RenderObject; 58 class RenderObject;
59 class RenderPart; 59 class RenderPart;
60 class RenderScrollbarPart; 60 class RenderScrollbarPart;
61 class RenderView; 61 class RenderView;
62 struct CompositedSelectionBound; 62 struct CompositedSelectionBound;
63 63
64 typedef unsigned long long DOMTimeStamp; 64 typedef unsigned long long DOMTimeStamp;
65 65
66 // FIXME: Oilpan: move Widget (and thereby FrameView) to the heap.
67 class FrameView final : public Widget, public ScrollableArea { 66 class FrameView final : public Widget, public ScrollableArea {
68 public: 67 public:
69 friend class RenderView; 68 friend class RenderView;
70 friend class Internals; 69 friend class Internals;
71 70
72 static PassRefPtr<FrameView> create(LocalFrame*); 71 static PassRefPtrWillBeRawPtr<FrameView> create(LocalFrame*);
73 static PassRefPtr<FrameView> create(LocalFrame*, const IntSize& initialSize) ; 72 static PassRefPtrWillBeRawPtr<FrameView> create(LocalFrame*, const IntSize& initialSize);
74 73
75 virtual ~FrameView(); 74 virtual ~FrameView();
76 75
77 virtual void invalidateRect(const IntRect&) override; 76 virtual void invalidateRect(const IntRect&) override;
78 virtual void setFrameRect(const IntRect&) override; 77 virtual void setFrameRect(const IntRect&) override;
79 78
80 LocalFrame& frame() const 79 LocalFrame& frame() const
81 { 80 {
82 ASSERT(m_frame); 81 ASSERT(m_frame);
83 return *m_frame; 82 return *m_frame;
84 } 83 }
85 84
86 Page* page() const; 85 Page* page() const;
87 86
88 RenderView* renderView() const; 87 RenderView* renderView() const;
89 88
90 void setCanHaveScrollbars(bool); 89 void setCanHaveScrollbars(bool);
91 90
92 PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation); 91 PassRefPtrWillBeRawPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
93 92
94 void setContentsSize(const IntSize&); 93 void setContentsSize(const IntSize&);
95 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale) const; 94 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale) const;
96 95
97 void layout(bool allowSubtree = true); 96 void layout(bool allowSubtree = true);
98 bool didFirstLayout() const; 97 bool didFirstLayout() const;
99 void scheduleRelayout(); 98 void scheduleRelayout();
100 void scheduleRelayoutOfSubtree(RenderObject*); 99 void scheduleRelayoutOfSubtree(RenderObject*);
101 bool layoutPending() const; 100 bool layoutPending() const;
102 bool isInPerformLayout() const; 101 bool isInPerformLayout() const;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 221
223 void updateLayoutAndStyleForPainting(); 222 void updateLayoutAndStyleForPainting();
224 void updateLayoutAndStyleIfNeededRecursive(); 223 void updateLayoutAndStyleIfNeededRecursive();
225 224
226 void invalidateTreeIfNeededRecursive(); 225 void invalidateTreeIfNeededRecursive();
227 226
228 void incrementVisuallyNonEmptyCharacterCount(unsigned); 227 void incrementVisuallyNonEmptyCharacterCount(unsigned);
229 void incrementVisuallyNonEmptyPixelCount(const IntSize&); 228 void incrementVisuallyNonEmptyPixelCount(const IntSize&);
230 void setIsVisuallyNonEmpty() { m_isVisuallyNonEmpty = true; } 229 void setIsVisuallyNonEmpty() { m_isVisuallyNonEmpty = true; }
231 void enableAutoSizeMode(const IntSize& minSize, const IntSize& maxSize); 230 void enableAutoSizeMode(const IntSize& minSize, const IntSize& maxSize);
232 void disableAutoSizeMode() { m_autoSizeInfo.clear(); } 231 void disableAutoSizeMode() { disposeAutoSizeInfo(); }
233 232
234 void forceLayout(bool allowSubtree = false); 233 void forceLayout(bool allowSubtree = false);
235 void forceLayoutForPagination(const FloatSize& pageSize, const FloatSize& or iginalPageSize, float maximumShrinkFactor); 234 void forceLayoutForPagination(const FloatSize& pageSize, const FloatSize& or iginalPageSize, float maximumShrinkFactor);
236 235
237 bool scrollToFragment(const KURL&); 236 bool scrollToFragment(const KURL&);
238 bool scrollToAnchor(const String&); 237 bool scrollToAnchor(const String&);
239 void maintainScrollPositionAtAnchor(Node*); 238 void maintainScrollPositionAtAnchor(Node*);
240 void scrollElementToRect(Element*, const IntRect&); 239 void scrollElementToRect(Element*, const IntRect&);
241 void scrollContentsIfNeededRecursive(); 240 void scrollContentsIfNeededRecursive();
242 241
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 void scrollbarStyleChangedInternal(); 344 void scrollbarStyleChangedInternal();
346 void notifyPageThatContentAreaWillPaintInternal() const; 345 void notifyPageThatContentAreaWillPaintInternal() const;
347 346
348 // The window that hosts the FrameView. The FrameView will communicate scrol ls and repaints to the 347 // The window that hosts the FrameView. The FrameView will communicate scrol ls and repaints to the
349 // host window in the window's coordinate space. 348 // host window in the window's coordinate space.
350 HostWindow* hostWindow() const; 349 HostWindow* hostWindow() const;
351 350
352 // Returns a clip rect in host window coordinates. Used to clip the blit on a scroll. 351 // Returns a clip rect in host window coordinates. Used to clip the blit on a scroll.
353 IntRect windowClipRect(IncludeScrollbarsInRect = ExcludeScrollbars) const; 352 IntRect windowClipRect(IncludeScrollbarsInRect = ExcludeScrollbars) const;
354 353
354 typedef WillBeHeapHashSet<RefPtrWillBeMember<Widget> > ChildrenWidgetSet;
355
355 // Functions for child manipulation and inspection. 356 // Functions for child manipulation and inspection.
356 const HashSet<RefPtr<Widget> >* children() const { return &m_children; } 357 const ChildrenWidgetSet* children() const { return &m_children; }
357 void addChild(PassRefPtr<Widget>); 358 void addChild(PassRefPtrWillBeRawPtr<Widget>);
358 void removeChildInternal(Widget*); 359 void removeChildInternal(Widget*);
359 360
360 // If the scroll view does not use a native widget, then it will have cross- platform Scrollbars. These functions 361 // If the scroll view does not use a native widget, then it will have cross- platform Scrollbars. These functions
361 // can be used to obtain those scrollbars. 362 // can be used to obtain those scrollbars.
362 virtual Scrollbar* horizontalScrollbar() const override { return m_horizonta lScrollbar.get(); } 363 virtual Scrollbar* horizontalScrollbar() const override { return m_horizonta lScrollbar.get(); }
363 virtual Scrollbar* verticalScrollbar() const override { return m_verticalScr ollbar.get(); } 364 virtual Scrollbar* verticalScrollbar() const override { return m_verticalScr ollbar.get(); }
364 365
365 void positionScrollbarLayers(); 366 void positionScrollbarLayers();
366 367
367 // Functions for setting and retrieving the scrolling mode in each axis (hor izontal/vertical). The mode has values of 368 // Functions for setting and retrieving the scrolling mode in each axis (hor izontal/vertical). The mode has values of
(...skipping 17 matching lines...) Expand all
385 386
386 void setCanHaveScrollbarsInternal(bool); 387 void setCanHaveScrollbarsInternal(bool);
387 bool canHaveScrollbars() const { return horizontalScrollbarMode() != Scrollb arAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; } 388 bool canHaveScrollbars() const { return horizontalScrollbarMode() != Scrollb arAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; }
388 389
389 // By default, paint events are clipped to the visible area. If set to 390 // By default, paint events are clipped to the visible area. If set to
390 // false, paint events are no longer clipped. 391 // false, paint events are no longer clipped.
391 bool clipsPaintInvalidations() const { return m_clipsRepaints; } 392 bool clipsPaintInvalidations() const { return m_clipsRepaints; }
392 void setClipsRepaints(bool); 393 void setClipsRepaints(bool);
393 394
394 // Overridden by FrameView to create custom CSS scrollbars if applicable. 395 // Overridden by FrameView to create custom CSS scrollbars if applicable.
395 PassRefPtr<Scrollbar> createScrollbarInternal(ScrollbarOrientation); 396 PassRefPtrWillBeRawPtr<Scrollbar> createScrollbarInternal(ScrollbarOrientati on);
396 397
397 // The visible content rect has a location that is the scrolled offset of th e document. The width and height are the viewport width 398 // The visible content rect has a location that is the scrolled offset of th e document. The width and height are the viewport width
398 // and height. By default the scrollbars themselves are excluded from this r ectangle, but an optional boolean argument allows them to be 399 // and height. By default the scrollbars themselves are excluded from this r ectangle, but an optional boolean argument allows them to be
399 // included. 400 // included.
400 virtual IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollba rs) const override; 401 virtual IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollba rs) const override;
401 IntSize visibleSize() const { return visibleContentRect().size(); } 402 IntSize visibleSize() const { return visibleContentRect().size(); }
402 403
403 // visibleContentRect().size() is computed from unscaledVisibleContentSize() divided by the value of visibleContentScaleFactor. 404 // visibleContentRect().size() is computed from unscaledVisibleContentSize() divided by the value of visibleContentScaleFactor.
404 // For the main frame, visibleContentScaleFactor is equal to the page's page ScaleFactor; it's 1 otherwise. 405 // For the main frame, visibleContentScaleFactor is equal to the page's page ScaleFactor; it's 1 otherwise.
405 IntSize unscaledVisibleContentSize(IncludeScrollbarsInRect = ExcludeScrollba rs) const; 406 IntSize unscaledVisibleContentSize(IncludeScrollbarsInRect = ExcludeScrollba rs) const;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 virtual IntRect convertFromScrollbarToContainingView(const Scrollbar*, const IntRect&) const override; 533 virtual IntRect convertFromScrollbarToContainingView(const Scrollbar*, const IntRect&) const override;
533 virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar*, const IntRect&) const override; 534 virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar*, const IntRect&) const override;
534 virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar*, cons t IntPoint&) const override; 535 virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar*, cons t IntPoint&) const override;
535 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, cons t IntPoint&) const override; 536 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, cons t IntPoint&) const override;
536 537
537 void calculateAndPaintOverhangAreas(GraphicsContext*, const IntRect& dirtyRe ct); 538 void calculateAndPaintOverhangAreas(GraphicsContext*, const IntRect& dirtyRe ct);
538 void calculateAndPaintOverhangBackground(GraphicsContext*, const IntRect& di rtyRect); 539 void calculateAndPaintOverhangBackground(GraphicsContext*, const IntRect& di rtyRect);
539 540
540 virtual bool isFrameView() const override { return true; } 541 virtual bool isFrameView() const override { return true; }
541 542
543 virtual void trace(Visitor*) override;
544
542 protected: 545 protected:
543 bool scrollContentsFastPath(const IntSize& scrollDelta); 546 bool scrollContentsFastPath(const IntSize& scrollDelta);
544 void scrollContentsSlowPath(const IntRect& updateRect); 547 void scrollContentsSlowPath(const IntRect& updateRect);
545 548
546 bool isVerticalDocument() const; 549 bool isVerticalDocument() const;
547 bool isFlippedDocument() const; 550 bool isFlippedDocument() const;
548 551
549 // Prevents creation of scrollbars. Used to prevent drawing two sets of 552 // Prevents creation of scrollbars. Used to prevent drawing two sets of
550 // overlay scrollbars in the case of the pinch viewport. 553 // overlay scrollbars in the case of the pinch viewport.
551 bool scrollbarsDisabled() const; 554 bool scrollbarsDisabled() const;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 { } 599 { }
597 private: 600 private:
598 TemporaryChange<bool> m_scope; 601 TemporaryChange<bool> m_scope;
599 }; 602 };
600 603
601 bool scrollbarsDisabledInternal() const { return false; } 604 bool scrollbarsDisabledInternal() const { return false; }
602 605
603 private: 606 private:
604 explicit FrameView(LocalFrame*); 607 explicit FrameView(LocalFrame*);
605 608
609 void dispose();
606 void reset(); 610 void reset();
607 void init(); 611 void init();
608 612
609 virtual void frameRectsChanged() override; 613 virtual void frameRectsChanged() override;
610 614
611 friend class RenderPart; 615 friend class RenderPart;
612 616
613 bool contentsInCompositedLayer() const; 617 bool contentsInCompositedLayer() const;
614 618
615 void applyOverflowToViewportAndSetRenderer(RenderObject*, ScrollbarMode& hMo de, ScrollbarMode& vMode); 619 void applyOverflowToViewportAndSetRenderer(RenderObject*, ScrollbarMode& hMo de, ScrollbarMode& vMode);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 670
667 void updateScrollCorner(); 671 void updateScrollCorner();
668 672
669 FrameView* parentFrameView() const; 673 FrameView* parentFrameView() const;
670 674
671 AXObjectCache* axObjectCache() const; 675 AXObjectCache* axObjectCache() const;
672 void removeFromAXObjectCache(); 676 void removeFromAXObjectCache();
673 677
674 void setLayoutSizeInternal(const IntSize&); 678 void setLayoutSizeInternal(const IntSize&);
675 679
680 void disposeAutoSizeInfo();
681
676 bool paintInvalidationIsAllowed() const 682 bool paintInvalidationIsAllowed() const
677 { 683 {
678 return !isInPerformLayout() || canInvalidatePaintDuringPerformLayout(); 684 return !isInPerformLayout() || canInvalidatePaintDuringPerformLayout();
679 } 685 }
680 686
681 bool adjustScrollbarExistence(ComputeScrollbarExistenceOption = FirstPass); 687 bool adjustScrollbarExistence(ComputeScrollbarExistenceOption = FirstPass);
682 void adjustScrollbarOpacity(); 688 void adjustScrollbarOpacity();
683 // FIXME(bokan): setScrollOffset, setScrollPosition, scrollTo, scrollToOffse tWithoutAnimation, 689 // FIXME(bokan): setScrollOffset, setScrollPosition, scrollTo, scrollToOffse tWithoutAnimation,
684 // notifyScrollPositionChanged...there's too many ways to scroll this class. This needs 690 // notifyScrollPositionChanged...there's too many ways to scroll this class. This needs
685 // some cleanup. 691 // some cleanup.
686 void setScrollOffsetFromUpdateScrollbars(const DoubleSize&); 692 void setScrollOffsetFromUpdateScrollbars(const DoubleSize&);
687 693
688 IntRect rectToCopyOnScroll() const; 694 IntRect rectToCopyOnScroll() const;
689 695
690 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR ect& verticalOverhangRect); 696 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR ect& verticalOverhangRect);
691 void updateOverhangAreas(); 697 void updateOverhangAreas();
692 698
693 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro llbar() == child || verticalScrollbar() == child; } 699 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro llbar() == child || verticalScrollbar() == child; }
694 700
695 static double s_currentFrameTimeStamp; // used for detecting decoded resourc e thrash in the cache 701 static double s_currentFrameTimeStamp; // used for detecting decoded resourc e thrash in the cache
696 static bool s_inPaintContents; 702 static bool s_inPaintContents;
697 703
698 LayoutSize m_size; 704 LayoutSize m_size;
699 705
700 typedef WillBeHeapHashSet<RefPtrWillBeMember<RenderEmbeddedObject> > Embedde dObjectSet; 706 typedef WillBeHeapHashSet<RefPtrWillBeMember<RenderEmbeddedObject> > Embedde dObjectSet;
701 WillBePersistentHeapHashSet<RefPtrWillBeMember<RenderEmbeddedObject> > m_par tUpdateSet; 707 WillBeHeapHashSet<RefPtrWillBeMember<RenderEmbeddedObject> > m_partUpdateSet ;
702 708
703 // FIXME: These are just "children" of the FrameView and should be RefPtr<Wi dget> instead. 709 // FIXME: These are just "children" of the FrameView and should be RefPtrWil lBeMember<Widget> instead.
704 WillBePersistentHeapHashSet<RefPtrWillBeMember<RenderPart> > m_parts; 710 WillBeHeapHashSet<RefPtrWillBeMember<RenderPart> > m_parts;
705 711
706 // Oilpan: the use of a persistent back reference 'emulates' the 712 // The RefPtr cycle between LocalFrame and FrameView is broken
707 // RefPtr-cycle that is kept between the two objects non-Oilpan. 713 // when a LocalFrame is detached by FrameLoader::detachFromParent().
714 // It clears the LocalFrame's m_view reference via setView(nullptr).
708 // 715 //
709 // That cycle is broken when a LocalFrame is detached by 716 // For Oilpan, Member reference cycles pose no problem, but
710 // FrameLoader::detachFromParent(), it then clears its 717 // LocalFrame's FrameView is also cleared by setView(). This additionally
711 // FrameView's m_frame reference by calling setView(nullptr). 718 // triggers FrameView::dispose(), which performs the operations
712 RefPtrWillBePersistent<LocalFrame> m_frame; 719 // that cannot be delayed until finalization time.
720 RefPtrWillBeMember<LocalFrame> m_frame;
713 721
714 bool m_doFullPaintInvalidation; 722 bool m_doFullPaintInvalidation;
715 723
716 bool m_canHaveScrollbars; 724 bool m_canHaveScrollbars;
717 unsigned m_slowRepaintObjectCount; 725 unsigned m_slowRepaintObjectCount;
718 726
719 bool m_hasPendingLayout; 727 bool m_hasPendingLayout;
720 RenderObject* m_layoutSubtreeRoot; 728 RenderObject* m_layoutSubtreeRoot;
721 729
722 bool m_layoutSchedulingEnabled; 730 bool m_layoutSchedulingEnabled;
(...skipping 22 matching lines...) Expand all
745 753
746 bool m_wasScrolledByUser; 754 bool m_wasScrolledByUser;
747 bool m_inProgrammaticScroll; 755 bool m_inProgrammaticScroll;
748 bool m_safeToPropagateScrollToParent; 756 bool m_safeToPropagateScrollToParent;
749 757
750 double m_lastPaintTime; 758 double m_lastPaintTime;
751 759
752 bool m_isTrackingPaintInvalidations; // Used for testing. 760 bool m_isTrackingPaintInvalidations; // Used for testing.
753 Vector<IntRect> m_trackedPaintInvalidationRects; 761 Vector<IntRect> m_trackedPaintInvalidationRects;
754 762
755 RefPtrWillBePersistent<Node> m_nodeToDraw; 763 RefPtrWillBeMember<Node> m_nodeToDraw;
756 PaintBehavior m_paintBehavior; 764 PaintBehavior m_paintBehavior;
757 bool m_isPainting; 765 bool m_isPainting;
758 766
759 unsigned m_visuallyNonEmptyCharacterCount; 767 unsigned m_visuallyNonEmptyCharacterCount;
760 unsigned m_visuallyNonEmptyPixelCount; 768 unsigned m_visuallyNonEmptyPixelCount;
761 bool m_isVisuallyNonEmpty; 769 bool m_isVisuallyNonEmpty;
762 bool m_firstVisuallyNonEmptyLayoutCallbackPending; 770 bool m_firstVisuallyNonEmptyLayoutCallbackPending;
763 771
764 RefPtrWillBePersistent<Node> m_maintainScrollPositionAnchor; 772 RefPtrWillBeMember<Node> m_maintainScrollPositionAnchor;
765 773
766 // Renderer to hold our custom scroll corner. 774 // Renderer to hold our custom scroll corner.
767 RawPtrWillBePersistent<RenderScrollbarPart> m_scrollCorner; 775 RawPtrWillBeMember<RenderScrollbarPart> m_scrollCorner;
768 776
769 OwnPtr<ScrollableAreaSet> m_scrollableAreas; 777 OwnPtr<ScrollableAreaSet> m_scrollableAreas;
770 OwnPtr<ResizerAreaSet> m_resizerAreas; 778 OwnPtr<ResizerAreaSet> m_resizerAreas;
771 OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects; 779 OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects;
772 OwnPtr<FrameViewAutoSizeInfo> m_autoSizeInfo; 780 OwnPtrWillBeMember<FrameViewAutoSizeInfo> m_autoSizeInfo;
773 781
774 float m_visibleContentScaleFactor; 782 float m_visibleContentScaleFactor;
775 IntSize m_inputEventsOffsetForEmulation; 783 IntSize m_inputEventsOffsetForEmulation;
776 float m_inputEventsScaleFactorForEmulation; 784 float m_inputEventsScaleFactorForEmulation;
777 785
778 IntSize m_layoutSize; 786 IntSize m_layoutSize;
779 bool m_layoutSizeFixedToFrameSize; 787 bool m_layoutSizeFixedToFrameSize;
780 788
781 Timer<FrameView> m_didScrollTimer; 789 Timer<FrameView> m_didScrollTimer;
782 790
783 Vector<IntRect> m_tickmarks; 791 Vector<IntRect> m_tickmarks;
784 792
785 bool m_needsUpdateWidgetPositions;
786 float m_topControlsViewportAdjustment; 793 float m_topControlsViewportAdjustment;
787 794
788 RefPtr<Scrollbar> m_horizontalScrollbar; 795 bool m_needsUpdateWidgetPositions;
789 RefPtr<Scrollbar> m_verticalScrollbar; 796
797 #if ENABLE(OILPAN) && ENABLE(ASSERT)
798 // Verified when finalizing.
799 bool m_hasBeenDisposed;
800 #endif
801
802 RefPtrWillBeMember<Scrollbar> m_horizontalScrollbar;
803 RefPtrWillBeMember<Scrollbar> m_verticalScrollbar;
790 ScrollbarMode m_horizontalScrollbarMode; 804 ScrollbarMode m_horizontalScrollbarMode;
791 ScrollbarMode m_verticalScrollbarMode; 805 ScrollbarMode m_verticalScrollbarMode;
792 806
793 bool m_horizontalScrollbarLock; 807 bool m_horizontalScrollbarLock;
794 bool m_verticalScrollbarLock; 808 bool m_verticalScrollbarLock;
795 809
796 HashSet<RefPtr<Widget> > m_children; 810 ChildrenWidgetSet m_children;
797 811
798 DoubleSize m_pendingScrollDelta; 812 DoubleSize m_pendingScrollDelta;
799 DoublePoint m_scrollPosition; 813 DoublePoint m_scrollPosition;
800 DoublePoint m_cachedScrollPosition; 814 DoublePoint m_cachedScrollPosition;
801 IntSize m_contentsSize; 815 IntSize m_contentsSize;
802 816
803 int m_scrollbarsAvoidingResizer; 817 int m_scrollbarsAvoidingResizer;
804 bool m_scrollbarsSuppressed; 818 bool m_scrollbarsSuppressed;
805 819
806 bool m_inUpdateScrollbars; 820 bool m_inUpdateScrollbars;
(...skipping 23 matching lines...) Expand all
830 m_visuallyNonEmptyPixelCount += size.width() * size.height(); 844 m_visuallyNonEmptyPixelCount += size.width() * size.height();
831 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout 845 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout
832 static const unsigned visualPixelThreshold = 32 * 32; 846 static const unsigned visualPixelThreshold = 32 * 32;
833 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 847 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
834 setIsVisuallyNonEmpty(); 848 setIsVisuallyNonEmpty();
835 } 849 }
836 850
837 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 851 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
838 852
839 class AllowPaintInvalidationScope { 853 class AllowPaintInvalidationScope {
854 STACK_ALLOCATED();
840 public: 855 public:
841 explicit AllowPaintInvalidationScope(FrameView* view) 856 explicit AllowPaintInvalidationScope(FrameView* view)
842 : m_view(view) 857 : m_view(view)
843 , m_originalValue(view ? view->canInvalidatePaintDuringPerformLayout() : false) 858 , m_originalValue(view ? view->canInvalidatePaintDuringPerformLayout() : false)
844 { 859 {
845 if (!m_view) 860 if (!m_view)
846 return; 861 return;
847 862
848 m_view->setCanInvalidatePaintDuringPerformLayout(true); 863 m_view->setCanInvalidatePaintDuringPerformLayout(true);
849 } 864 }
850 865
851 ~AllowPaintInvalidationScope() 866 ~AllowPaintInvalidationScope()
852 { 867 {
853 if (!m_view) 868 if (!m_view)
854 return; 869 return;
855 870
856 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); 871 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue);
857 } 872 }
873
858 private: 874 private:
859 FrameView* m_view; 875 RawPtrWillBeMember<FrameView> m_view;
860 bool m_originalValue; 876 bool m_originalValue;
861 }; 877 };
862 878
863 } // namespace blink 879 } // namespace blink
864 880
865 #endif // FrameView_h 881 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698