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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 1801753002: First programmatic smooth scroll should run on the compositor if it can (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bot compile error Created 4 years, 9 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/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index 895adc8ff1ba4a99288bd717643f53dd16453813..d95c7c62a4b4915a40902bad988412545055188a 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -136,6 +136,7 @@
#include "platform/graphics/GraphicsLayer.h"
#include "platform/heap/Handle.h"
#include "platform/inspector_protocol/FrontendChannel.h"
+#include "platform/scroll/ProgrammaticScrollAnimator.h"
#include "platform/weborigin/SchemeRegistry.h"
#include "public/platform/Platform.h"
#include "public/platform/WebConnectionType.h"
@@ -2567,9 +2568,17 @@ void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element)
int Internals::getScrollAnimationState(Node* node) const
{
+ // TODO(ymalik): Use runStateAsText instead of returning an integer.
if (ScrollableArea* scrollableArea = scrollableAreaForNode(node))
return static_cast<int>(scrollableArea->scrollAnimator().m_runState);
return -1;
}
+String Internals::getProgrammaticScrollAnimationState(Node* node) const
+{
+ if (ScrollableArea* scrollableArea = scrollableAreaForNode(node))
+ return scrollableArea->programmaticScrollAnimator().runStateAsText();
+ return String();
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.h ('k') | third_party/WebKit/Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698