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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.cpp

Issue 1895323002: Viewport apply scroll should be on the document element not scrollingElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.cpp
diff --git a/third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.cpp b/third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.cpp
index f6a6902e85eb4ef6ade34b59185a4ce24bd1536f..c9b130f0f693be16ea6febeafca9c4c93f338a9c 100644
--- a/third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.cpp
@@ -18,10 +18,8 @@
namespace blink {
-ViewportScrollCallback::ViewportScrollCallback(Document& document,
- FrameHost& frameHost)
+ViewportScrollCallback::ViewportScrollCallback(Document& document)
: m_document(&document)
- , m_frameHost(&frameHost)
{
// Only the root document can have a viewport scroll callback for now.
ASSERT(!document.ownerElement());
@@ -33,7 +31,6 @@ ViewportScrollCallback::~ViewportScrollCallback()
DEFINE_TRACE(ViewportScrollCallback)
{
- visitor->trace(m_frameHost);
visitor->trace(m_document);
ScrollStateCallback::trace(visitor);
}
@@ -60,10 +57,10 @@ bool ViewportScrollCallback::shouldScrollTopControls(const FloatSize& delta,
void ViewportScrollCallback::handleEvent(ScrollState* state)
{
- if (!m_frameHost || !m_document)
+ if (!m_document || !m_document->frameHost())
return;
- TopControls& topControls = m_frameHost->topControls();
+ TopControls& topControls = m_document->frameHost()->topControls();
// Scroll top controls.
if (state->isBeginning())

Powered by Google App Engine
This is Rietveld 408576698