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

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

Issue 1209183004: Expose scroll customization for touch to JS (behind REF). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Clean up static map. 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 #include "core/layout/LayoutView.h" 108 #include "core/layout/LayoutView.h"
109 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h" 109 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h"
110 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" 110 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h"
111 #include "core/loader/FrameLoader.h" 111 #include "core/loader/FrameLoader.h"
112 #include "core/loader/HistoryItem.h" 112 #include "core/loader/HistoryItem.h"
113 #include "core/page/ChromeClient.h" 113 #include "core/page/ChromeClient.h"
114 #include "core/page/FocusController.h" 114 #include "core/page/FocusController.h"
115 #include "core/page/NetworkStateNotifier.h" 115 #include "core/page/NetworkStateNotifier.h"
116 #include "core/page/Page.h" 116 #include "core/page/Page.h"
117 #include "core/page/PrintContext.h" 117 #include "core/page/PrintContext.h"
118 #include "core/page/scrolling/ScrollState.h"
118 #include "core/paint/DeprecatedPaintLayer.h" 119 #include "core/paint/DeprecatedPaintLayer.h"
119 #include "core/plugins/testing/DictionaryPluginPlaceholder.h" 120 #include "core/plugins/testing/DictionaryPluginPlaceholder.h"
120 #include "core/plugins/testing/DocumentFragmentPluginPlaceholder.h" 121 #include "core/plugins/testing/DocumentFragmentPluginPlaceholder.h"
121 #include "core/svg/SVGImageElement.h" 122 #include "core/svg/SVGImageElement.h"
122 #include "core/testing/DictionaryTest.h" 123 #include "core/testing/DictionaryTest.h"
123 #include "core/testing/GCObservation.h" 124 #include "core/testing/GCObservation.h"
124 #include "core/testing/InternalRuntimeFlags.h" 125 #include "core/testing/InternalRuntimeFlags.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"
(...skipping 2271 matching lines...) Expand 10 before | Expand all | Expand 10 after
2399 2400
2400 void Internals::forcePluginPlaceholder(HTMLElement* element, const PluginPlaceho lderOptions& options, ExceptionState& exceptionState) 2401 void Internals::forcePluginPlaceholder(HTMLElement* element, const PluginPlaceho lderOptions& options, ExceptionState& exceptionState)
2401 { 2402 {
2402 if (!element->isPluginElement()) { 2403 if (!element->isPluginElement()) {
2403 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov ided is not a plugin."); 2404 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov ided is not a plugin.");
2404 return; 2405 return;
2405 } 2406 }
2406 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr eate(element->document(), options)); 2407 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr eate(element->document(), options));
2407 } 2408 }
2408 2409
2410 void Internals::setScrollChain(
2411 ScrollState* scrollState, const WillBeHeapVector<RefPtrWillBeMember<Element> >& elements, ExceptionState&)
2412 {
2413 WillBeHeapDeque<RefPtrWillBeMember<Element>> scrollChain;
2414 for (size_t i = 0; i < elements.size(); ++i)
2415 scrollChain.append(elements[i]);
2416 scrollState->setScrollChain(scrollChain);
2417 }
2418
2409 void Internals::forceBlinkGCWithoutV8GC() 2419 void Internals::forceBlinkGCWithoutV8GC()
2410 { 2420 {
2411 ThreadState::current()->setGCState(ThreadState::FullGCScheduled); 2421 ThreadState::current()->setGCState(ThreadState::FullGCScheduled);
2412 } 2422 }
2413 2423
2414 String Internals::selectedHTMLForClipboard() 2424 String Internals::selectedHTMLForClipboard()
2415 { 2425 {
2416 return frame()->selection().selectedHTMLForClipboard(); 2426 return frame()->selection().selectedHTMLForClipboard();
2417 } 2427 }
2418 2428
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2456 return ClientRectList::create(rects); 2466 return ClientRectList::create(rects);
2457 } 2467 }
2458 2468
2459 void Internals::setCapsLockState(bool enabled) 2469 void Internals::setCapsLockState(bool enabled)
2460 { 2470 {
2461 PlatformKeyboardEvent::setCurrentCapsLockState(enabled ? 2471 PlatformKeyboardEvent::setCurrentCapsLockState(enabled ?
2462 PlatformKeyboardEvent::OverrideCapsLockState::On : PlatformKeyboardEvent ::OverrideCapsLockState::Off); 2472 PlatformKeyboardEvent::OverrideCapsLockState::On : PlatformKeyboardEvent ::OverrideCapsLockState::Off);
2463 } 2473 }
2464 2474
2465 } // namespace blink 2475 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698