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

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

Issue 1330633003: Intersection Observer first draft Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix segfault on null input. Created 5 years, 3 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 OwnPtr<LayoutAnalyzer> m_analyzer; 833 OwnPtr<LayoutAnalyzer> m_analyzer;
832 834
833 // Mark if something has changed in the mapping from Frame to GraphicsLayer 835 // Mark if something has changed in the mapping from Frame to GraphicsLayer
834 // and the Frame Timing regions should be recalculated. 836 // and the Frame Timing regions should be recalculated.
835 bool m_frameTimingRequestsDirty; 837 bool m_frameTimingRequestsDirty;
836 838
837 // Exists only on root frame. 839 // Exists only on root frame.
838 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the 840 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the
839 // main frame. 841 // main frame.
840 OwnPtrWillBeMember<ScrollableArea> m_viewportScrollableArea; 842 OwnPtrWillBeMember<ScrollableArea> m_viewportScrollableArea;
843
844 // This frame's bounds in the root frame's content coordinates, clipped
845 // recursively through every ancestor view.
846 IntRect m_clippedBounds;
841 }; 847 };
842 848
843 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) 849 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
844 { 850 {
845 if (m_isVisuallyNonEmpty) 851 if (m_isVisuallyNonEmpty)
846 return; 852 return;
847 m_visuallyNonEmptyCharacterCount += count; 853 m_visuallyNonEmptyCharacterCount += count;
848 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout. 854 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout.
849 // The first few hundred characters rarely contain the interesting content o f the page. 855 // The first few hundred characters rarely contain the interesting content o f the page.
850 static const unsigned visualCharacterThreshold = 200; 856 static const unsigned visualCharacterThreshold = 200;
(...skipping 10 matching lines...) Expand all
861 static const unsigned visualPixelThreshold = 32 * 32; 867 static const unsigned visualPixelThreshold = 32 * 32;
862 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 868 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
863 setIsVisuallyNonEmpty(); 869 setIsVisuallyNonEmpty();
864 } 870 }
865 871
866 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 872 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
867 873
868 } // namespace blink 874 } // namespace blink
869 875
870 #endif // FrameView_h 876 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698