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

Unified Diff: third_party/WebKit/Source/core/dom/IntersectionObserver.cpp

Issue 2470793002: Revert of Use intersection observer to control frame throttling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
index 32ef04c78978b5f0856a4812c1ff8499585d1e5d..7509dcf7051d0c111c615918360c489eed7e098e 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
@@ -203,8 +203,7 @@
m_topMargin(Fixed),
m_rightMargin(Fixed),
m_bottomMargin(Fixed),
- m_leftMargin(Fixed),
- m_initialState(InitialState::kHidden) {
+ m_leftMargin(Fixed) {
switch (rootMargin.size()) {
case 0:
break;
@@ -292,11 +291,6 @@
return;
}
- if (m_initialState == InitialState::kAuto) {
- for (auto& observation : m_observations)
- observation->setLastThresholdIndex(std::numeric_limits<unsigned>::max());
- }
-
if (!rootFrame)
return;
if (FrameView* rootFrameView = rootFrame->view())
@@ -349,11 +343,6 @@
void IntersectionObserver::removeObservation(
IntersectionObservation& observation) {
m_observations.remove(&observation);
-}
-
-void IntersectionObserver::setInitialState(InitialState initialState) {
- DCHECK(m_observations.isEmpty());
- m_initialState = initialState;
}
HeapVector<Member<IntersectionObserverEntry>> IntersectionObserver::takeRecords(
« no previous file with comments | « third_party/WebKit/Source/core/dom/IntersectionObserver.h ('k') | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698