Index: Source/core/testing/Internals.cpp |
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp |
index 02559adc3a143f23061a6221413393bad675e155..8dc1d8c98f8953bb145e43ad79534e54150a39e6 100644 |
--- a/Source/core/testing/Internals.cpp |
+++ b/Source/core/testing/Internals.cpp |
@@ -118,6 +118,7 @@ |
#include "core/page/NetworkStateNotifier.h" |
#include "core/page/Page.h" |
#include "core/page/PrintContext.h" |
+#include "core/page/scrolling/ScrollState.h" |
#include "core/plugins/testing/DictionaryPluginPlaceholder.h" |
#include "core/plugins/testing/DocumentFragmentPluginPlaceholder.h" |
#include "core/testing/DictionaryTest.h" |
@@ -2313,6 +2314,14 @@ void Internals::forcePluginPlaceholder(HTMLElement* element, const PluginPlaceho |
toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::create(element->document(), options)); |
} |
+void Internals::setScrollChain(ScrollState* scrollState, const Vector<RefPtr<Element>>& elements, ExceptionState&) |
+{ |
+ WillBeHeapVector<RefPtrWillBeMember<Element>> scrollChain; |
+ for (size_t i = 0; i < elements.size(); ++i) |
+ scrollChain.append(elements[i]); |
+ scrollState->setScrollChain(scrollChain); |
+} |
+ |
void Internals::forceBlinkGCWithoutV8GC() |
{ |
ThreadState::current()->setGCState(ThreadState::GCScheduledForTesting); |