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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 850443002: Scroll Customization Prototype (Not for review, WIP) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase / cleanup / minor bug fixes Created 5 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 unified diff | Download patch
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #include "core/layout/compositing/LayerCompositor.h" 111 #include "core/layout/compositing/LayerCompositor.h"
112 #include "core/loader/FrameLoader.h" 112 #include "core/loader/FrameLoader.h"
113 #include "core/loader/HistoryItem.h" 113 #include "core/loader/HistoryItem.h"
114 #include "core/page/Chrome.h" 114 #include "core/page/Chrome.h"
115 #include "core/page/ChromeClient.h" 115 #include "core/page/ChromeClient.h"
116 #include "core/page/EventHandler.h" 116 #include "core/page/EventHandler.h"
117 #include "core/page/FocusController.h" 117 #include "core/page/FocusController.h"
118 #include "core/page/NetworkStateNotifier.h" 118 #include "core/page/NetworkStateNotifier.h"
119 #include "core/page/Page.h" 119 #include "core/page/Page.h"
120 #include "core/page/PrintContext.h" 120 #include "core/page/PrintContext.h"
121 #include "core/page/scrolling/ScrollState.h"
121 #include "core/plugins/testing/DictionaryPluginPlaceholder.h" 122 #include "core/plugins/testing/DictionaryPluginPlaceholder.h"
122 #include "core/plugins/testing/DocumentFragmentPluginPlaceholder.h" 123 #include "core/plugins/testing/DocumentFragmentPluginPlaceholder.h"
123 #include "core/testing/DictionaryTest.h" 124 #include "core/testing/DictionaryTest.h"
124 #include "core/testing/GCObservation.h" 125 #include "core/testing/GCObservation.h"
125 #include "core/testing/InternalSettings.h" 126 #include "core/testing/InternalSettings.h"
126 #include "core/testing/LayerRect.h" 127 #include "core/testing/LayerRect.h"
127 #include "core/testing/LayerRectList.h" 128 #include "core/testing/LayerRectList.h"
128 #include "core/testing/PluginPlaceholderOptions.h" 129 #include "core/testing/PluginPlaceholderOptions.h"
129 #include "core/testing/PrivateScriptTest.h" 130 #include "core/testing/PrivateScriptTest.h"
130 #include "core/testing/TypeConversions.h" 131 #include "core/testing/TypeConversions.h"
(...skipping 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2306 2307
2307 void Internals::forcePluginPlaceholder(HTMLElement* element, const PluginPlaceho lderOptions& options, ExceptionState& exceptionState) 2308 void Internals::forcePluginPlaceholder(HTMLElement* element, const PluginPlaceho lderOptions& options, ExceptionState& exceptionState)
2308 { 2309 {
2309 if (!element->isPluginElement()) { 2310 if (!element->isPluginElement()) {
2310 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov ided is not a plugin."); 2311 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov ided is not a plugin.");
2311 return; 2312 return;
2312 } 2313 }
2313 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr eate(element->document(), options)); 2314 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr eate(element->document(), options));
2314 } 2315 }
2315 2316
2317 void Internals::setScrollChain(ScrollState* scrollState, const Vector<RefPtr<Ele ment>>& elements, ExceptionState&)
2318 {
2319 WillBeHeapVector<RefPtrWillBeMember<Element>> scrollChain;
2320 for (size_t i = 0; i < elements.size(); ++i)
2321 scrollChain.append(elements[i]);
2322 scrollState->setScrollChain(scrollChain);
2323 }
2324
2316 void Internals::forceBlinkGCWithoutV8GC() 2325 void Internals::forceBlinkGCWithoutV8GC()
2317 { 2326 {
2318 ThreadState::current()->setGCState(ThreadState::GCScheduledForTesting); 2327 ThreadState::current()->setGCState(ThreadState::GCScheduledForTesting);
2319 } 2328 }
2320 2329
2321 ValueIterable<int>::IterationSource* Internals::startIteration(ScriptState*, Exc eptionState&) 2330 ValueIterable<int>::IterationSource* Internals::startIteration(ScriptState*, Exc eptionState&)
2322 { 2331 {
2323 return new InternalsIterationSource(); 2332 return new InternalsIterationSource();
2324 } 2333 }
2325 2334
2326 } // namespace blink 2335 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698