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

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

Issue 1236913004: Expose scroll customization for touch to JS (behind REF). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test expectations. Created 5 years, 4 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 2273 matching lines...) Expand 10 before | Expand all | Expand 10 after
2401 2402
2402 void Internals::forcePluginPlaceholder(HTMLElement* element, const PluginPlaceho lderOptions& options, ExceptionState& exceptionState) 2403 void Internals::forcePluginPlaceholder(HTMLElement* element, const PluginPlaceho lderOptions& options, ExceptionState& exceptionState)
2403 { 2404 {
2404 if (!element->isPluginElement()) { 2405 if (!element->isPluginElement()) {
2405 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov ided is not a plugin."); 2406 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov ided is not a plugin.");
2406 return; 2407 return;
2407 } 2408 }
2408 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr eate(element->document(), options)); 2409 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr eate(element->document(), options));
2409 } 2410 }
2410 2411
2412 void Internals::setScrollChain(
2413 ScrollState* scrollState, const WillBeHeapVector<RefPtrWillBeMember<Element> >& elements, ExceptionState&)
2414 {
2415 WillBeHeapDeque<RefPtrWillBeMember<Element>> scrollChain;
2416 for (size_t i = 0; i < elements.size(); ++i)
2417 scrollChain.append(elements[i]);
2418 scrollState->setScrollChain(scrollChain);
2419 }
2420
2411 void Internals::forceBlinkGCWithoutV8GC() 2421 void Internals::forceBlinkGCWithoutV8GC()
2412 { 2422 {
2413 ThreadState::current()->setGCState(ThreadState::FullGCScheduled); 2423 ThreadState::current()->setGCState(ThreadState::FullGCScheduled);
2414 } 2424 }
2415 2425
2416 String Internals::selectedHTMLForClipboard() 2426 String Internals::selectedHTMLForClipboard()
2417 { 2427 {
2418 return frame()->selection().selectedHTMLForClipboard(); 2428 return frame()->selection().selectedHTMLForClipboard();
2419 } 2429 }
2420 2430
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
2481 2491
2482 return animator->setScrollbarsVisibleForTesting(visible); 2492 return animator->setScrollbarsVisibleForTesting(visible);
2483 } 2493 }
2484 2494
2485 void Internals::forceRestrictIFramePermissions() 2495 void Internals::forceRestrictIFramePermissions()
2486 { 2496 {
2487 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); 2497 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true);
2488 } 2498 }
2489 2499
2490 } // namespace blink 2500 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698