Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 |
| 11 License as published by the Free Software Foundation; either | 11 License as published by the Free Software Foundation; either |
| 12 version 2 of the License, or (at your option) any later version. | 12 version 2 of the License, or (at your option) any later version. |
| 13 | 13 |
| 14 This library is distributed in the hope that it will be useful, | 14 This library is distributed in the hope that it will be useful, |
| 15 but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 17 Library General Public License for more details. | 17 Library General Public License for more details. |
| 18 | 18 |
| 19 You should have received a copy of the GNU Library General Public License | 19 You should have received a copy of the GNU Library General Public License |
| 20 along with this library; see the file COPYING.LIB. If not, write to | 20 along with this library; see the file COPYING.LIB. If not, write to |
| 21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 22 Boston, MA 02110-1301, USA. | 22 Boston, MA 02110-1301, USA. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef FrameView_h | 25 #ifndef FrameView_h |
| 26 #define FrameView_h | 26 #define FrameView_h |
| 27 | 27 |
| 28 #include "core/CoreExport.h" | 28 #include "core/CoreExport.h" |
| 29 #include "core/dom/DocumentLifecycle.h" | |
| 29 #include "core/frame/FrameViewAutoSizeInfo.h" | 30 #include "core/frame/FrameViewAutoSizeInfo.h" |
| 30 #include "core/frame/LayoutSubtreeRootList.h" | 31 #include "core/frame/LayoutSubtreeRootList.h" |
| 31 #include "core/frame/RootFrameViewport.h" | 32 #include "core/frame/RootFrameViewport.h" |
| 32 #include "core/layout/LayoutAnalyzer.h" | 33 #include "core/layout/LayoutAnalyzer.h" |
| 33 #include "core/paint/PaintPhase.h" | 34 #include "core/paint/PaintPhase.h" |
| 34 #include "platform/RuntimeEnabledFeatures.h" | 35 #include "platform/RuntimeEnabledFeatures.h" |
| 35 #include "platform/Widget.h" | 36 #include "platform/Widget.h" |
| 36 #include "platform/geometry/IntRect.h" | 37 #include "platform/geometry/IntRect.h" |
| 37 #include "platform/geometry/LayoutRect.h" | 38 #include "platform/geometry/LayoutRect.h" |
| 38 #include "platform/graphics/Color.h" | 39 #include "platform/graphics/Color.h" |
| 39 #include "platform/scroll/ScrollTypes.h" | 40 #include "platform/scroll/ScrollTypes.h" |
| 40 #include "platform/scroll/ScrollableArea.h" | 41 #include "platform/scroll/ScrollableArea.h" |
| 41 #include "platform/scroll/Scrollbar.h" | 42 #include "platform/scroll/Scrollbar.h" |
| 42 #include "public/platform/WebDisplayMode.h" | 43 #include "public/platform/WebDisplayMode.h" |
| 43 #include "public/platform/WebRect.h" | 44 #include "public/platform/WebRect.h" |
| 44 #include "wtf/Allocator.h" | 45 #include "wtf/Allocator.h" |
| 45 #include "wtf/Forward.h" | 46 #include "wtf/Forward.h" |
| 46 #include "wtf/HashSet.h" | 47 #include "wtf/HashSet.h" |
| 47 #include "wtf/ListHashSet.h" | 48 #include "wtf/ListHashSet.h" |
| 48 #include "wtf/OwnPtr.h" | 49 #include "wtf/OwnPtr.h" |
| 49 #include "wtf/TemporaryChange.h" | 50 #include "wtf/TemporaryChange.h" |
| 50 #include "wtf/text/WTFString.h" | 51 #include "wtf/text/WTFString.h" |
| 51 | 52 |
| 52 namespace blink { | 53 namespace blink { |
| 53 | 54 |
| 54 class AXObjectCache; | 55 class AXObjectCache; |
| 56 class CancellableTaskFactory; | |
| 55 class ComputedStyle; | 57 class ComputedStyle; |
| 56 class DocumentLifecycle; | 58 class DocumentLifecycle; |
| 57 class Cursor; | 59 class Cursor; |
| 58 class Element; | 60 class Element; |
| 59 class FloatSize; | 61 class FloatSize; |
| 60 class HTMLFrameOwnerElement; | 62 class HTMLFrameOwnerElement; |
| 61 class LayoutPart; | 63 class LayoutPart; |
| 62 class LocalFrame; | 64 class LocalFrame; |
| 63 class KURL; | 65 class KURL; |
| 64 class Node; | 66 class Node; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 75 struct CompositedSelection; | 77 struct CompositedSelection; |
| 76 | 78 |
| 77 typedef unsigned long long DOMTimeStamp; | 79 typedef unsigned long long DOMTimeStamp; |
| 78 | 80 |
| 79 class CORE_EXPORT FrameView final : public Widget, public ScrollableArea { | 81 class CORE_EXPORT FrameView final : public Widget, public ScrollableArea { |
| 80 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FrameView); | 82 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FrameView); |
| 81 | 83 |
| 82 friend class DisplayItemListPaintTestForSlimmingPaintV2; | 84 friend class DisplayItemListPaintTestForSlimmingPaintV2; |
| 83 friend class Internals; | 85 friend class Internals; |
| 84 friend class LayoutPart; // for invalidateTreeIfNeeded | 86 friend class LayoutPart; // for invalidateTreeIfNeeded |
| 87 friend class FrameThrottlingTest; | |
| 85 | 88 |
| 86 public: | 89 public: |
| 87 static PassRefPtrWillBeRawPtr<FrameView> create(LocalFrame*); | 90 static PassRefPtrWillBeRawPtr<FrameView> create(LocalFrame*); |
| 88 static PassRefPtrWillBeRawPtr<FrameView> create(LocalFrame*, const IntSize& initialSize); | 91 static PassRefPtrWillBeRawPtr<FrameView> create(LocalFrame*, const IntSize& initialSize); |
| 89 | 92 |
| 90 ~FrameView() override; | 93 ~FrameView() override; |
| 91 | 94 |
| 92 void invalidateRect(const IntRect&) override; | 95 void invalidateRect(const IntRect&) override; |
| 93 void setFrameRect(const IntRect&) override; | 96 void setFrameRect(const IntRect&) override; |
| 94 | 97 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 218 | 221 |
| 219 void setIsPainting(bool val) const { m_isPainting = val; } | 222 void setIsPainting(bool val) const { m_isPainting = val; } |
| 220 bool isPainting() const; | 223 bool isPainting() const; |
| 221 | 224 |
| 222 void setNodeToDraw(Node*); | 225 void setNodeToDraw(Node*); |
| 223 Node* nodeToDraw() const { return m_nodeToDraw.get(); } | 226 Node* nodeToDraw() const { return m_nodeToDraw.get(); } |
| 224 | 227 |
| 225 Color documentBackgroundColor() const; | 228 Color documentBackgroundColor() const; |
| 226 | 229 |
| 227 // Run all needed lifecycle stages. After calling this method, all frames wi ll be in the lifecycle state PaintInvalidationClean. | 230 // Run all needed lifecycle stages. After calling this method, all frames wi ll be in the lifecycle state PaintInvalidationClean. |
| 231 // If lifecycle throttling is allowed, some frames may skip the lifecycle up date (e.g., based on visibility) and will not end | |
| 232 // up being PaintInvalidationClean. | |
| 228 // TODO(pdr): Update callers to pass in the interest rect. | 233 // TODO(pdr): Update callers to pass in the interest rect. |
| 229 void updateAllLifecyclePhases(const LayoutRect& interestRect = LayoutRect::i nfiniteRect()); | 234 void updateAllLifecyclePhases(DocumentLifecycle::ThrottlingMode = DocumentLi fecycle::ThrottlingMode::Disallow, const LayoutRect& interestRect = LayoutRect:: infiniteRect()); |
| 230 | 235 |
| 231 // Computes the style, layout and compositing lifecycle stages if needed. Af ter calling this method, all frames wil lbe in a lifecycle | 236 // Computes the style, layout and compositing lifecycle stages if needed. Af ter calling this method, all frames wil lbe in a lifecycle |
| 232 // state >= CompositingClean, and scrolling has been updated. | 237 // state >= CompositingClean, and scrolling has been updated. |
| 233 void updateLifecycleToCompositingCleanPlusScrolling(); | 238 void updateLifecycleToCompositingCleanPlusScrolling(DocumentLifecycle::Throt tlingMode = DocumentLifecycle::ThrottlingMode::Disallow); |
| 234 | 239 |
| 235 // Computes only the style and layout lifecycle stages. | 240 // Computes only the style and layout lifecycle stages. |
| 236 // After calling this method, all frames will be in a lifecycle state >= Lay outClean. | 241 // After calling this method, all frames will be in a lifecycle state >= Lay outClean. |
| 237 void updateLifecycleToLayoutClean(); | 242 void updateLifecycleToLayoutClean(DocumentLifecycle::ThrottlingMode = Docume ntLifecycle::ThrottlingMode::Disallow); |
| 238 | 243 |
| 239 bool invalidateViewportConstrainedObjects(); | 244 bool invalidateViewportConstrainedObjects(); |
| 240 | 245 |
| 241 void incrementVisuallyNonEmptyCharacterCount(unsigned); | 246 void incrementVisuallyNonEmptyCharacterCount(unsigned); |
| 242 void incrementVisuallyNonEmptyPixelCount(const IntSize&); | 247 void incrementVisuallyNonEmptyPixelCount(const IntSize&); |
| 243 bool isVisuallyNonEmpty() const { return m_isVisuallyNonEmpty; } | 248 bool isVisuallyNonEmpty() const { return m_isVisuallyNonEmpty; } |
| 244 void setIsVisuallyNonEmpty() { m_isVisuallyNonEmpty = true; } | 249 void setIsVisuallyNonEmpty() { m_isVisuallyNonEmpty = true; } |
| 245 void enableAutoSizeMode(const IntSize& minSize, const IntSize& maxSize); | 250 void enableAutoSizeMode(const IntSize& minSize, const IntSize& maxSize); |
| 246 void disableAutoSizeMode(); | 251 void disableAutoSizeMode(); |
| 247 | 252 |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 549 // Returns true if the default scrolling direction is vertical. i.e. writing mode | 554 // Returns true if the default scrolling direction is vertical. i.e. writing mode |
| 550 // is horiziontal. In a vertical document, a spacebar scrolls down. | 555 // is horiziontal. In a vertical document, a spacebar scrolls down. |
| 551 bool isVerticalDocument() const; | 556 bool isVerticalDocument() const; |
| 552 | 557 |
| 553 // Returns true if the document's writing mode is right-to-left or bottom-to -top. | 558 // Returns true if the document's writing mode is right-to-left or bottom-to -top. |
| 554 bool isFlippedDocument() const; | 559 bool isFlippedDocument() const; |
| 555 | 560 |
| 556 void setFrameTimingRequestsDirty(bool isDirty) { m_frameTimingRequestsDirty = isDirty; } | 561 void setFrameTimingRequestsDirty(bool isDirty) { m_frameTimingRequestsDirty = isDirty; } |
| 557 bool frameTimingRequestsDirty() { return m_frameTimingRequestsDirty; } | 562 bool frameTimingRequestsDirty() { return m_frameTimingRequestsDirty; } |
| 558 | 563 |
| 564 // Returns true if this frame should skip rendering pipeline processing duri ng the | |
| 565 // current BeginMainFrame. | |
| 566 bool shouldThrottleRenderingPipeline() const; | |
| 567 | |
| 568 // Returns true if this frame should skip style computation, layout and | |
| 569 // compositing updates for the current BeginMainFrame. | |
| 570 bool shouldThrottleStyleLayoutAndCompositingUpdates() const; | |
|
ojan
2015/10/13 23:31:29
These names are confusing. They're both basically
Sami
2015/10/14 16:52:11
Agreed, I like those better. Changed and reworded
| |
| 571 | |
| 559 protected: | 572 protected: |
| 560 // Scroll the content via the compositor. | 573 // Scroll the content via the compositor. |
| 561 bool scrollContentsFastPath(const IntSize& scrollDelta); | 574 bool scrollContentsFastPath(const IntSize& scrollDelta); |
| 562 | 575 |
| 563 // Scroll the content by invalidating everything. | 576 // Scroll the content by invalidating everything. |
| 564 void scrollContentsSlowPath(const IntRect& updateRect); | 577 void scrollContentsSlowPath(const IntRect& updateRect); |
| 565 | 578 |
| 566 // These functions are used to create/destroy scrollbars. | 579 // These functions are used to create/destroy scrollbars. |
| 567 void setHasHorizontalScrollbar(bool); | 580 void setHasHorizontalScrollbar(bool); |
| 568 void setHasVerticalScrollbar(bool); | 581 void setHasVerticalScrollbar(bool); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 603 | 616 |
| 604 void setScrollOffset(const IntPoint&, ScrollType) override; | 617 void setScrollOffset(const IntPoint&, ScrollType) override; |
| 605 void setScrollOffset(const DoublePoint&, ScrollType) override; | 618 void setScrollOffset(const DoublePoint&, ScrollType) override; |
| 606 | 619 |
| 607 enum LifeCycleUpdateOption { | 620 enum LifeCycleUpdateOption { |
| 608 OnlyUpToLayoutClean, | 621 OnlyUpToLayoutClean, |
| 609 OnlyUpToCompositingCleanPlusScrolling, | 622 OnlyUpToCompositingCleanPlusScrolling, |
| 610 AllPhases, | 623 AllPhases, |
| 611 }; | 624 }; |
| 612 | 625 |
| 613 void updateLifecyclePhasesInternal(LifeCycleUpdateOption, const LayoutRect& interestRect = LayoutRect::infiniteRect()); | 626 void updateLifecyclePhasesInternal(LifeCycleUpdateOption, DocumentLifecycle: :ThrottlingMode, const LayoutRect& interestRect = LayoutRect::infiniteRect()); |
| 614 void invalidateTreeIfNeededRecursive(); | 627 void invalidateTreeIfNeededRecursive(); |
| 615 void scrollContentsIfNeededRecursive(); | 628 void scrollContentsIfNeededRecursive(); |
| 616 void updateStyleAndLayoutIfNeededRecursive(); | 629 void updateStyleAndLayoutIfNeededRecursive(); |
| 617 void updatePaintProperties(); | 630 void updatePaintProperties(); |
| 618 void synchronizedPaint(const LayoutRect& interestRect); | 631 void synchronizedPaint(const LayoutRect& interestRect); |
| 619 void synchronizedPaintRecursively(GraphicsLayer*, const LayoutRect& interest Rect); | 632 void synchronizedPaintRecursively(GraphicsLayer*, const LayoutRect& interest Rect); |
| 620 void compositeForSlimmingPaintV2(); | 633 void compositeForSlimmingPaintV2(); |
| 621 | 634 |
| 622 void reset(); | 635 void reset(); |
| 623 void init(); | 636 void init(); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 709 // LayoutObject for the viewport-defining element (see Document::viewportDef iningElement). | 722 // LayoutObject for the viewport-defining element (see Document::viewportDef iningElement). |
| 710 LayoutObject* viewportLayoutObject(); | 723 LayoutObject* viewportLayoutObject(); |
| 711 | 724 |
| 712 void collectAnnotatedRegions(LayoutObject&, Vector<AnnotatedRegionValue>&) c onst; | 725 void collectAnnotatedRegions(LayoutObject&, Vector<AnnotatedRegionValue>&) c onst; |
| 713 | 726 |
| 714 typedef WTF::HashMap <const GraphicsLayer*, Vector<std::pair<int64_t, WebRec t>>> GraphicsLayerFrameTimingRequests; | 727 typedef WTF::HashMap <const GraphicsLayer*, Vector<std::pair<int64_t, WebRec t>>> GraphicsLayerFrameTimingRequests; |
| 715 void updateFrameTimingRequestsIfNeeded(); | 728 void updateFrameTimingRequestsIfNeeded(); |
| 716 void collectFrameTimingRequests(GraphicsLayerFrameTimingRequests&); | 729 void collectFrameTimingRequests(GraphicsLayerFrameTimingRequests&); |
| 717 void collectFrameTimingRequestsRecursive(GraphicsLayerFrameTimingRequests&); | 730 void collectFrameTimingRequestsRecursive(GraphicsLayerFrameTimingRequests&); |
| 718 | 731 |
| 732 void setLifecycleThrottlingModeForSubtree(DocumentLifecycle::ThrottlingMode) ; | |
| 733 void updateViewportIntersectionsForSubtree(); | |
| 734 void updateViewportIntersectionIfNeeded(); | |
| 735 void notifyIntersectionObservers(); | |
| 736 | |
| 719 LayoutSize m_size; | 737 LayoutSize m_size; |
| 720 | 738 |
| 721 typedef HashSet<RefPtr<LayoutEmbeddedObject>> EmbeddedObjectSet; | 739 typedef HashSet<RefPtr<LayoutEmbeddedObject>> EmbeddedObjectSet; |
| 722 EmbeddedObjectSet m_partUpdateSet; | 740 EmbeddedObjectSet m_partUpdateSet; |
| 723 | 741 |
| 724 // FIXME: These are just "children" of the FrameView and should be RefPtrWil lBeMember<Widget> instead. | 742 // FIXME: These are just "children" of the FrameView and should be RefPtrWil lBeMember<Widget> instead. |
| 725 HashSet<RefPtr<LayoutPart>> m_parts; | 743 HashSet<RefPtr<LayoutPart>> m_parts; |
| 726 | 744 |
| 727 // The RefPtr cycle between LocalFrame and FrameView is broken | 745 // The RefPtr cycle between LocalFrame and FrameView is broken |
| 728 // when a LocalFrame is detached by LocalFrame::detach(). | 746 // when a LocalFrame is detached by LocalFrame::detach(). |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 743 bool m_hasPendingLayout; | 761 bool m_hasPendingLayout; |
| 744 LayoutSubtreeRootList m_layoutSubtreeRootList; | 762 LayoutSubtreeRootList m_layoutSubtreeRootList; |
| 745 | 763 |
| 746 bool m_layoutSchedulingEnabled; | 764 bool m_layoutSchedulingEnabled; |
| 747 bool m_inPerformLayout; | 765 bool m_inPerformLayout; |
| 748 bool m_inSynchronousPostLayout; | 766 bool m_inSynchronousPostLayout; |
| 749 int m_layoutCount; | 767 int m_layoutCount; |
| 750 unsigned m_nestedLayoutCount; | 768 unsigned m_nestedLayoutCount; |
| 751 Timer<FrameView> m_postLayoutTasksTimer; | 769 Timer<FrameView> m_postLayoutTasksTimer; |
| 752 Timer<FrameView> m_updateWidgetsTimer; | 770 Timer<FrameView> m_updateWidgetsTimer; |
| 771 OwnPtr<CancellableTaskFactory> m_intersectionObserverNotificationFactory; | |
| 753 | 772 |
| 754 bool m_firstLayout; | 773 bool m_firstLayout; |
| 755 bool m_isTransparent; | 774 bool m_isTransparent; |
| 756 Color m_baseBackgroundColor; | 775 Color m_baseBackgroundColor; |
| 757 IntSize m_lastViewportSize; | 776 IntSize m_lastViewportSize; |
| 758 float m_lastZoomFactor; | 777 float m_lastZoomFactor; |
| 759 | 778 |
| 760 AtomicString m_mediaType; | 779 AtomicString m_mediaType; |
| 761 AtomicString m_mediaTypeWhenNotPrinting; | 780 AtomicString m_mediaTypeWhenNotPrinting; |
| 762 | 781 |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 790 IntSize m_layoutSize; | 809 IntSize m_layoutSize; |
| 791 bool m_layoutSizeFixedToFrameSize; | 810 bool m_layoutSizeFixedToFrameSize; |
| 792 | 811 |
| 793 Timer<FrameView> m_didScrollTimer; | 812 Timer<FrameView> m_didScrollTimer; |
| 794 | 813 |
| 795 Vector<IntRect> m_tickmarks; | 814 Vector<IntRect> m_tickmarks; |
| 796 | 815 |
| 797 float m_topControlsViewportAdjustment; | 816 float m_topControlsViewportAdjustment; |
| 798 | 817 |
| 799 bool m_needsUpdateWidgetPositions; | 818 bool m_needsUpdateWidgetPositions; |
| 819 bool m_needsUpdateViewportIntersection; | |
| 800 | 820 |
| 801 #if ENABLE(ASSERT) | 821 #if ENABLE(ASSERT) |
| 802 // Verified when finalizing. | 822 // Verified when finalizing. |
| 803 bool m_hasBeenDisposed; | 823 bool m_hasBeenDisposed; |
| 804 #endif | 824 #endif |
| 805 | 825 |
| 806 RefPtrWillBeMember<Scrollbar> m_horizontalScrollbar; | 826 RefPtrWillBeMember<Scrollbar> m_horizontalScrollbar; |
| 807 RefPtrWillBeMember<Scrollbar> m_verticalScrollbar; | 827 RefPtrWillBeMember<Scrollbar> m_verticalScrollbar; |
| 808 ScrollbarMode m_horizontalScrollbarMode; | 828 ScrollbarMode m_horizontalScrollbarMode; |
| 809 ScrollbarMode m_verticalScrollbarMode; | 829 ScrollbarMode m_verticalScrollbarMode; |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 825 OwnPtr<LayoutAnalyzer> m_analyzer; | 845 OwnPtr<LayoutAnalyzer> m_analyzer; |
| 826 | 846 |
| 827 // Mark if something has changed in the mapping from Frame to GraphicsLayer | 847 // Mark if something has changed in the mapping from Frame to GraphicsLayer |
| 828 // and the Frame Timing regions should be recalculated. | 848 // and the Frame Timing regions should be recalculated. |
| 829 bool m_frameTimingRequestsDirty; | 849 bool m_frameTimingRequestsDirty; |
| 830 | 850 |
| 831 // Exists only on root frame. | 851 // Exists only on root frame. |
| 832 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the | 852 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the |
| 833 // main frame. | 853 // main frame. |
| 834 OwnPtrWillBeMember<ScrollableArea> m_viewportScrollableArea; | 854 OwnPtrWillBeMember<ScrollableArea> m_viewportScrollableArea; |
| 855 | |
| 856 // This frame's bounds in the root frame's content coordinates, clipped | |
| 857 // recursively through every ancestor view. | |
| 858 IntRect m_viewportIntersection; | |
| 859 bool m_viewportIntersectionValid; | |
| 860 | |
| 861 enum class ViewportVisibility { Hidden, Visible }; | |
| 862 enum class SecurityOriginStatus { IsSameOrigin, IsCrossOrigin }; | |
| 863 | |
| 864 // The following members control rendering pipeline throttling for this | |
| 865 // frame. They are only updated at the end of the pipeline (after painting) | |
| 866 // to avoid running further pipeline stages for a frame without having gone | |
| 867 // through the previous ones. | |
| 868 ViewportVisibility m_viewportVisibilityForThrottling; | |
| 869 SecurityOriginStatus m_securityOriginStatusForThrottling; | |
| 835 }; | 870 }; |
| 836 | 871 |
| 837 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) | 872 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) |
| 838 { | 873 { |
| 839 if (m_isVisuallyNonEmpty) | 874 if (m_isVisuallyNonEmpty) |
| 840 return; | 875 return; |
| 841 m_visuallyNonEmptyCharacterCount += count; | 876 m_visuallyNonEmptyCharacterCount += count; |
| 842 // Use a threshold value to prevent very small amounts of visible content fr om triggering didMeaningfulLayout. | 877 // Use a threshold value to prevent very small amounts of visible content fr om triggering didMeaningfulLayout. |
| 843 // The first few hundred characters rarely contain the interesting content o f the page. | 878 // The first few hundred characters rarely contain the interesting content o f the page. |
| 844 static const unsigned visualCharacterThreshold = 200; | 879 static const unsigned visualCharacterThreshold = 200; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 855 static const unsigned visualPixelThreshold = 32 * 32; | 890 static const unsigned visualPixelThreshold = 32 * 32; |
| 856 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 891 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
| 857 setIsVisuallyNonEmpty(); | 892 setIsVisuallyNonEmpty(); |
| 858 } | 893 } |
| 859 | 894 |
| 860 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); | 895 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); |
| 861 | 896 |
| 862 } // namespace blink | 897 } // namespace blink |
| 863 | 898 |
| 864 #endif // FrameView_h | 899 #endif // FrameView_h |
| OLD | NEW |