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

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

Issue 1120833003: Put LayoutAnalyzer back behind disabled-by-default-blink.debug.layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: thinger 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
« 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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 569
570 DECLARE_VIRTUAL_TRACE(); 570 DECLARE_VIRTUAL_TRACE();
571 void notifyPageThatContentAreaWillPaint() const; 571 void notifyPageThatContentAreaWillPaint() const;
572 FrameView* parentFrameView() const; 572 FrameView* parentFrameView() const;
573 573
574 // Returns the scrollable area for the frame. 574 // Returns the scrollable area for the frame.
575 ScrollableArea* scrollableArea(); 575 ScrollableArea* scrollableArea();
576 576
577 int viewportWidth() const; 577 int viewportWidth() const;
578 578
579 LayoutAnalyzer& layoutAnalyzer() { return m_analyzer; } 579 LayoutAnalyzer* layoutAnalyzer() { return m_analyzer.get(); }
580 580
581 protected: 581 protected:
582 // Scroll the content via the compositor. 582 // Scroll the content via the compositor.
583 bool scrollContentsFastPath(const IntSize& scrollDelta); 583 bool scrollContentsFastPath(const IntSize& scrollDelta);
584 584
585 // Scroll the content by invalidating everything. 585 // Scroll the content by invalidating everything.
586 void scrollContentsSlowPath(const IntRect& updateRect); 586 void scrollContentsSlowPath(const IntRect& updateRect);
587 587
588 bool isVerticalDocument() const; 588 bool isVerticalDocument() const;
589 bool isFlippedDocument() const; 589 bool isFlippedDocument() const;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 // notifyScrollPositionChanged...there's too many ways to scroll this class. This needs 710 // notifyScrollPositionChanged...there's too many ways to scroll this class. This needs
711 // some cleanup. 711 // some cleanup.
712 void setScrollOffsetFromUpdateScrollbars(const DoubleSize&); 712 void setScrollOffsetFromUpdateScrollbars(const DoubleSize&);
713 713
714 IntRect rectToCopyOnScroll() const; 714 IntRect rectToCopyOnScroll() const;
715 715
716 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro llbar() == child || verticalScrollbar() == child; } 716 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro llbar() == child || verticalScrollbar() == child; }
717 717
718 ScrollingCoordinator* scrollingCoordinator(); 718 ScrollingCoordinator* scrollingCoordinator();
719 719
720 void prepareLayoutAnalyzer();
720 PassRefPtr<TracedValue> analyzerCounters(); 721 PassRefPtr<TracedValue> analyzerCounters();
721 722
722 // LayoutObject for the viewport-defining element (see Document::viewportDef iningElement). 723 // LayoutObject for the viewport-defining element (see Document::viewportDef iningElement).
723 LayoutObject* viewportLayoutObject(); 724 LayoutObject* viewportLayoutObject();
724 725
725 LayoutSize m_size; 726 LayoutSize m_size;
726 727
727 typedef HashSet<RefPtr<LayoutEmbeddedObject>> EmbeddedObjectSet; 728 typedef HashSet<RefPtr<LayoutEmbeddedObject>> EmbeddedObjectSet;
728 EmbeddedObjectSet m_partUpdateSet; 729 EmbeddedObjectSet m_partUpdateSet;
729 730
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 844
844 FloatSize m_elasticOverscroll; 845 FloatSize m_elasticOverscroll;
845 846
846 bool m_inUpdateScrollbars; 847 bool m_inUpdateScrollbars;
847 848
848 IntPoint m_panScrollIconPoint; 849 IntPoint m_panScrollIconPoint;
849 bool m_shouldDrawPanScrollIcon; 850 bool m_shouldDrawPanScrollIcon;
850 851
851 bool m_clipsRepaints; 852 bool m_clipsRepaints;
852 853
853 LayoutAnalyzer m_analyzer; 854 OwnPtr<LayoutAnalyzer> m_analyzer;
854 }; 855 };
855 856
856 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) 857 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
857 { 858 {
858 if (m_isVisuallyNonEmpty) 859 if (m_isVisuallyNonEmpty)
859 return; 860 return;
860 m_visuallyNonEmptyCharacterCount += count; 861 m_visuallyNonEmptyCharacterCount += count;
861 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout. 862 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout.
862 // The first few hundred characters rarely contain the interesting content o f the page. 863 // The first few hundred characters rarely contain the interesting content o f the page.
863 static const unsigned visualCharacterThreshold = 200; 864 static const unsigned visualCharacterThreshold = 200;
(...skipping 10 matching lines...) Expand all
874 static const unsigned visualPixelThreshold = 32 * 32; 875 static const unsigned visualPixelThreshold = 32 * 32;
875 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 876 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
876 setIsVisuallyNonEmpty(); 877 setIsVisuallyNonEmpty();
877 } 878 }
878 879
879 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 880 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
880 881
881 } // namespace blink 882 } // namespace blink
882 883
883 #endif // FrameView_h 884 #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