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

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

Issue 1330633003: Intersection Observer first draft Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Lost newline in merge Created 5 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 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 // LayoutObject for the viewport-defining element (see Document::viewportDef iningElement). 709 // LayoutObject for the viewport-defining element (see Document::viewportDef iningElement).
710 LayoutObject* viewportLayoutObject(); 710 LayoutObject* viewportLayoutObject();
711 711
712 void collectAnnotatedRegions(LayoutObject&, Vector<AnnotatedRegionValue>&); 712 void collectAnnotatedRegions(LayoutObject&, Vector<AnnotatedRegionValue>&);
713 713
714 typedef WTF::HashMap <const GraphicsLayer*, Vector<std::pair<int64_t, WebRec t>>> GraphicsLayerFrameTimingRequests; 714 typedef WTF::HashMap <const GraphicsLayer*, Vector<std::pair<int64_t, WebRec t>>> GraphicsLayerFrameTimingRequests;
715 void updateFrameTimingRequestsIfNeeded(); 715 void updateFrameTimingRequestsIfNeeded();
716 void collectFrameTimingRequests(GraphicsLayerFrameTimingRequests&); 716 void collectFrameTimingRequests(GraphicsLayerFrameTimingRequests&);
717 void collectFrameTimingRequestsRecursive(GraphicsLayerFrameTimingRequests&); 717 void collectFrameTimingRequestsRecursive(GraphicsLayerFrameTimingRequests&);
718 718
719 void computeIntersectionObservations(PaintInvalidationState&);
720
719 LayoutSize m_size; 721 LayoutSize m_size;
720 722
721 typedef HashSet<RefPtr<LayoutEmbeddedObject>> EmbeddedObjectSet; 723 typedef HashSet<RefPtr<LayoutEmbeddedObject>> EmbeddedObjectSet;
722 EmbeddedObjectSet m_partUpdateSet; 724 EmbeddedObjectSet m_partUpdateSet;
723 725
724 // FIXME: These are just "children" of the FrameView and should be RefPtrWil lBeMember<Widget> instead. 726 // FIXME: These are just "children" of the FrameView and should be RefPtrWil lBeMember<Widget> instead.
725 HashSet<RefPtr<LayoutPart>> m_parts; 727 HashSet<RefPtr<LayoutPart>> m_parts;
726 728
727 // The RefPtr cycle between LocalFrame and FrameView is broken 729 // The RefPtr cycle between LocalFrame and FrameView is broken
728 // when a LocalFrame is detached by LocalFrame::detach(). 730 // when a LocalFrame is detached by LocalFrame::detach().
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 OwnPtr<LayoutAnalyzer> m_analyzer; 829 OwnPtr<LayoutAnalyzer> m_analyzer;
828 830
829 // Mark if something has changed in the mapping from Frame to GraphicsLayer 831 // Mark if something has changed in the mapping from Frame to GraphicsLayer
830 // and the Frame Timing regions should be recalculated. 832 // and the Frame Timing regions should be recalculated.
831 bool m_frameTimingRequestsDirty; 833 bool m_frameTimingRequestsDirty;
832 834
833 // Exists only on root frame. 835 // Exists only on root frame.
834 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the 836 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the
835 // main frame. 837 // main frame.
836 OwnPtrWillBeMember<ScrollableArea> m_viewportScrollableArea; 838 OwnPtrWillBeMember<ScrollableArea> m_viewportScrollableArea;
839
840 // This frame's bounds in the root frame's content coordinates, clipped
841 // recursively through every ancestor view.
842 IntRect m_clippedBounds;
837 }; 843 };
838 844
839 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) 845 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
840 { 846 {
841 if (m_isVisuallyNonEmpty) 847 if (m_isVisuallyNonEmpty)
842 return; 848 return;
843 m_visuallyNonEmptyCharacterCount += count; 849 m_visuallyNonEmptyCharacterCount += count;
844 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout. 850 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout.
845 // The first few hundred characters rarely contain the interesting content o f the page. 851 // The first few hundred characters rarely contain the interesting content o f the page.
846 static const unsigned visualCharacterThreshold = 200; 852 static const unsigned visualCharacterThreshold = 200;
(...skipping 10 matching lines...) Expand all
857 static const unsigned visualPixelThreshold = 32 * 32; 863 static const unsigned visualPixelThreshold = 32 * 32;
858 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 864 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
859 setIsVisuallyNonEmpty(); 865 setIsVisuallyNonEmpty();
860 } 866 }
861 867
862 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 868 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
863 869
864 } // namespace blink 870 } // namespace blink
865 871
866 #endif // FrameView_h 872 #endif // FrameView_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698