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

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

Issue 1996363003: Avoid calling updateAllLifecyclePhasesExceptPaint in SVGImage if not needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 enum UrlFragmentBehavior { 270 enum UrlFragmentBehavior {
271 UrlFragmentScroll, 271 UrlFragmentScroll,
272 UrlFragmentDontScroll 272 UrlFragmentDontScroll
273 }; 273 };
274 // Updates the fragment anchor element based on URL's fragment identifier. 274 // Updates the fragment anchor element based on URL's fragment identifier.
275 // Updates corresponding ':target' CSS pseudo class on the anchor element. 275 // Updates corresponding ':target' CSS pseudo class on the anchor element.
276 // If |UrlFragmentScroll| is passed in then makes the anchor element 276 // If |UrlFragmentScroll| is passed in then makes the anchor element
277 // focused and also visible by scrolling to it. The scroll position is 277 // focused and also visible by scrolling to it. The scroll position is
278 // maintained during the frame loading process. 278 // maintained during the frame loading process.
279 void processUrlFragment(const KURL&, UrlFragmentBehavior = UrlFragmentScroll ); 279 // Returns false if the URL behavior is unchanged from last time this method was called.
fs 2016/05/23 21:25:56 Maybe also mention that false is returned if the f
280 bool processUrlFragment(const KURL&, UrlFragmentBehavior = UrlFragmentScroll );
280 void clearFragmentAnchor(); 281 void clearFragmentAnchor();
281 282
282 // Methods to convert points and rects between the coordinate space of the l ayoutObject, and this view. 283 // Methods to convert points and rects between the coordinate space of the l ayoutObject, and this view.
283 IntRect convertFromLayoutObject(const LayoutObject&, const IntRect&) const; 284 IntRect convertFromLayoutObject(const LayoutObject&, const IntRect&) const;
284 IntRect convertToLayoutObject(const LayoutObject&, const IntRect&) const; 285 IntRect convertToLayoutObject(const LayoutObject&, const IntRect&) const;
285 IntPoint convertFromLayoutObject(const LayoutObject&, const IntPoint&) const ; 286 IntPoint convertFromLayoutObject(const LayoutObject&, const IntPoint&) const ;
286 IntPoint convertToLayoutObject(const LayoutObject&, const IntPoint&) const; 287 IntPoint convertToLayoutObject(const LayoutObject&, const IntPoint&) const;
287 288
288 bool isFrameViewScrollCorner(LayoutScrollbarPart* scrollCorner) const { retu rn m_scrollCorner == scrollCorner; } 289 bool isFrameViewScrollCorner(LayoutScrollbarPart* scrollCorner) const { retu rn m_scrollCorner == scrollCorner; }
289 290
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 RefPtr<TransformPaintPropertyNode> m_preTranslation; 906 RefPtr<TransformPaintPropertyNode> m_preTranslation;
906 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; 907 RefPtr<TransformPaintPropertyNode> m_scrollTranslation;
907 // The content clip clips the document (= LayoutView) but not the scrollbars . 908 // The content clip clips the document (= LayoutView) but not the scrollbars .
908 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() i s enabled. 909 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() i s enabled.
909 RefPtr<ClipPaintPropertyNode> m_contentClip; 910 RefPtr<ClipPaintPropertyNode> m_contentClip;
910 911
911 bool m_isUpdatingAllLifecyclePhases; 912 bool m_isUpdatingAllLifecyclePhases;
912 ScrollAnchor m_scrollAnchor; 913 ScrollAnchor m_scrollAnchor;
913 914
914 bool m_needsScrollbarsUpdate; 915 bool m_needsScrollbarsUpdate;
916
917 KURL m_currentUrl;
918 UrlFragmentBehavior m_currentUrlFragmentBehavior;
915 }; 919 };
916 920
917 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) 921 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
918 { 922 {
919 if (m_isVisuallyNonEmpty) 923 if (m_isVisuallyNonEmpty)
920 return; 924 return;
921 m_visuallyNonEmptyCharacterCount += count; 925 m_visuallyNonEmptyCharacterCount += count;
922 // Use a threshold value to prevent very small amounts of visible content fr om triggering didMeaningfulLayout. 926 // Use a threshold value to prevent very small amounts of visible content fr om triggering didMeaningfulLayout.
923 // The first few hundred characters rarely contain the interesting content o f the page. 927 // The first few hundred characters rarely contain the interesting content o f the page.
924 static const unsigned visualCharacterThreshold = 200; 928 static const unsigned visualCharacterThreshold = 200;
(...skipping 11 matching lines...) Expand all
936 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 940 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
937 setIsVisuallyNonEmpty(); 941 setIsVisuallyNonEmpty();
938 } 942 }
939 943
940 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 944 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
941 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); 945 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView());
942 946
943 } // namespace blink 947 } // namespace blink
944 948
945 #endif // FrameView_h 949 #endif // FrameView_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698