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

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

Issue 1370723002: Include viewport visibility checks for autoplay experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased. Created 5 years, 1 month 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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 bool canThrottleRendering() const; 570 bool canThrottleRendering() const;
571 bool isHiddenForThrottling() const { return m_hiddenForThrottling; } 571 bool isHiddenForThrottling() const { return m_hiddenForThrottling; }
572 572
573 // Paint properties for SPv2 Only. 573 // Paint properties for SPv2 Only.
574 void setPreTranslation(PassRefPtr<TransformPaintPropertyNode> preTranslation ) { m_preTranslation = preTranslation; } 574 void setPreTranslation(PassRefPtr<TransformPaintPropertyNode> preTranslation ) { m_preTranslation = preTranslation; }
575 const TransformPaintPropertyNode* preTranslation() const { return m_preTrans lation.get(); } 575 const TransformPaintPropertyNode* preTranslation() const { return m_preTrans lation.get(); }
576 576
577 void setScrollTranslation(PassRefPtr<TransformPaintPropertyNode> scrollTrans lation) { m_scrollTranslation = scrollTranslation; } 577 void setScrollTranslation(PassRefPtr<TransformPaintPropertyNode> scrollTrans lation) { m_scrollTranslation = scrollTranslation; }
578 const TransformPaintPropertyNode* scrollTranslation() const { return m_scrol lTranslation.get(); } 578 const TransformPaintPropertyNode* scrollTranslation() const { return m_scrol lTranslation.get(); }
579 579
580 // TODO(ojan): Merge this with IntersectionObserver once it lands.
581 IntRect computeVisibleArea();
582
580 protected: 583 protected:
581 // Scroll the content via the compositor. 584 // Scroll the content via the compositor.
582 bool scrollContentsFastPath(const IntSize& scrollDelta); 585 bool scrollContentsFastPath(const IntSize& scrollDelta);
583 586
584 // Scroll the content by invalidating everything. 587 // Scroll the content by invalidating everything.
585 void scrollContentsSlowPath(const IntRect& updateRect); 588 void scrollContentsSlowPath(const IntRect& updateRect);
586 589
587 // These functions are used to create/destroy scrollbars. 590 // These functions are used to create/destroy scrollbars.
588 void setHasHorizontalScrollbar(bool); 591 void setHasHorizontalScrollbar(bool);
589 void setHasVerticalScrollbar(bool); 592 void setHasVerticalScrollbar(bool);
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 static const unsigned visualPixelThreshold = 32 * 32; 906 static const unsigned visualPixelThreshold = 32 * 32;
904 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 907 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
905 setIsVisuallyNonEmpty(); 908 setIsVisuallyNonEmpty();
906 } 909 }
907 910
908 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 911 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
909 912
910 } // namespace blink 913 } // namespace blink
911 914
912 #endif // FrameView_h 915 #endif // FrameView_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698