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

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

Issue 1057603002: Expose scroll customization for touch to JS (behind REF). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address haraken's comments. Created 5 years, 5 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
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 #include "core/layout/LayoutView.h" 107 #include "core/layout/LayoutView.h"
108 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h" 108 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h"
109 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" 109 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h"
110 #include "core/loader/FrameLoader.h" 110 #include "core/loader/FrameLoader.h"
111 #include "core/loader/HistoryItem.h" 111 #include "core/loader/HistoryItem.h"
112 #include "core/page/ChromeClient.h" 112 #include "core/page/ChromeClient.h"
113 #include "core/page/FocusController.h" 113 #include "core/page/FocusController.h"
114 #include "core/page/NetworkStateNotifier.h" 114 #include "core/page/NetworkStateNotifier.h"
115 #include "core/page/Page.h" 115 #include "core/page/Page.h"
116 #include "core/page/PrintContext.h" 116 #include "core/page/PrintContext.h"
117 #include "core/page/scrolling/ScrollState.h"
117 #include "core/paint/DeprecatedPaintLayer.h" 118 #include "core/paint/DeprecatedPaintLayer.h"
118 #include "core/plugins/testing/DictionaryPluginPlaceholder.h" 119 #include "core/plugins/testing/DictionaryPluginPlaceholder.h"
119 #include "core/plugins/testing/DocumentFragmentPluginPlaceholder.h" 120 #include "core/plugins/testing/DocumentFragmentPluginPlaceholder.h"
120 #include "core/testing/DictionaryTest.h" 121 #include "core/testing/DictionaryTest.h"
121 #include "core/testing/GCObservation.h" 122 #include "core/testing/GCObservation.h"
122 #include "core/testing/InternalRuntimeFlags.h" 123 #include "core/testing/InternalRuntimeFlags.h"
123 #include "core/testing/InternalSettings.h" 124 #include "core/testing/InternalSettings.h"
124 #include "core/testing/LayerRect.h" 125 #include "core/testing/LayerRect.h"
125 #include "core/testing/LayerRectList.h" 126 #include "core/testing/LayerRectList.h"
126 #include "core/testing/PluginPlaceholderOptions.h" 127 #include "core/testing/PluginPlaceholderOptions.h"
(...skipping 2256 matching lines...) Expand 10 before | Expand all | Expand 10 after
2383 2384
2384 void Internals::forcePluginPlaceholder(HTMLElement* element, const PluginPlaceho lderOptions& options, ExceptionState& exceptionState) 2385 void Internals::forcePluginPlaceholder(HTMLElement* element, const PluginPlaceho lderOptions& options, ExceptionState& exceptionState)
2385 { 2386 {
2386 if (!element->isPluginElement()) { 2387 if (!element->isPluginElement()) {
2387 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov ided is not a plugin."); 2388 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov ided is not a plugin.");
2388 return; 2389 return;
2389 } 2390 }
2390 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr eate(element->document(), options)); 2391 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr eate(element->document(), options));
2391 } 2392 }
2392 2393
2394 void Internals::setScrollChain(
2395 ScrollState* scrollState, const WillBeHeapVector<RefPtrWillBeMember<Element> >& elements, ExceptionState&)
2396 {
2397 WillBeHeapDeque<RefPtrWillBeMember<Element>> scrollChain;
2398 for (size_t i = 0; i < elements.size(); ++i)
2399 scrollChain.append(elements[i]);
2400 scrollState->setScrollChain(scrollChain);
2401 }
2402
2393 void Internals::forceBlinkGCWithoutV8GC() 2403 void Internals::forceBlinkGCWithoutV8GC()
2394 { 2404 {
2395 ThreadState::current()->setGCState(ThreadState::FullGCScheduled); 2405 ThreadState::current()->setGCState(ThreadState::FullGCScheduled);
2396 } 2406 }
2397 2407
2398 String Internals::selectedHTMLForClipboard() 2408 String Internals::selectedHTMLForClipboard()
2399 { 2409 {
2400 return frame()->selection().selectedHTMLForClipboard(); 2410 return frame()->selection().selectedHTMLForClipboard();
2401 } 2411 }
2402 2412
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2440 return ClientRectList::create(rects); 2450 return ClientRectList::create(rects);
2441 } 2451 }
2442 2452
2443 void Internals::setCapsLockState(bool enabled) 2453 void Internals::setCapsLockState(bool enabled)
2444 { 2454 {
2445 PlatformKeyboardEvent::setCurrentCapsLockState(enabled ? 2455 PlatformKeyboardEvent::setCurrentCapsLockState(enabled ?
2446 PlatformKeyboardEvent::OverrideCapsLockState::On : PlatformKeyboardEvent ::OverrideCapsLockState::Off); 2456 PlatformKeyboardEvent::OverrideCapsLockState::On : PlatformKeyboardEvent ::OverrideCapsLockState::Off);
2447 } 2457 }
2448 2458
2449 } // namespace blink 2459 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698