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

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

Issue 1313763002: Blink Plugins: Remove Shadow DOM Plugin Placeholder (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 #include "core/frame/FrameConsole.h" 78 #include "core/frame/FrameConsole.h"
79 #include "core/frame/FrameView.h" 79 #include "core/frame/FrameView.h"
80 #include "core/frame/LocalDOMWindow.h" 80 #include "core/frame/LocalDOMWindow.h"
81 #include "core/frame/LocalFrame.h" 81 #include "core/frame/LocalFrame.h"
82 #include "core/frame/Settings.h" 82 #include "core/frame/Settings.h"
83 #include "core/html/HTMLContentElement.h" 83 #include "core/html/HTMLContentElement.h"
84 #include "core/html/HTMLIFrameElement.h" 84 #include "core/html/HTMLIFrameElement.h"
85 #include "core/html/HTMLImageElement.h" 85 #include "core/html/HTMLImageElement.h"
86 #include "core/html/HTMLInputElement.h" 86 #include "core/html/HTMLInputElement.h"
87 #include "core/html/HTMLMediaElement.h" 87 #include "core/html/HTMLMediaElement.h"
88 #include "core/html/HTMLPlugInElement.h"
89 #include "core/html/HTMLSelectElement.h" 88 #include "core/html/HTMLSelectElement.h"
90 #include "core/html/HTMLTextAreaElement.h" 89 #include "core/html/HTMLTextAreaElement.h"
91 #include "core/html/canvas/CanvasFontCache.h" 90 #include "core/html/canvas/CanvasFontCache.h"
92 #include "core/html/canvas/CanvasRenderingContext.h" 91 #include "core/html/canvas/CanvasRenderingContext.h"
93 #include "core/html/forms/FormController.h" 92 #include "core/html/forms/FormController.h"
94 #include "core/html/shadow/PluginPlaceholderElement.h"
95 #include "core/html/shadow/ShadowElementNames.h" 93 #include "core/html/shadow/ShadowElementNames.h"
96 #include "core/html/shadow/TextControlInnerElements.h" 94 #include "core/html/shadow/TextControlInnerElements.h"
97 #include "core/input/EventHandler.h" 95 #include "core/input/EventHandler.h"
98 #include "core/inspector/ConsoleMessageStorage.h" 96 #include "core/inspector/ConsoleMessageStorage.h"
99 #include "core/inspector/InspectorConsoleAgent.h" 97 #include "core/inspector/InspectorConsoleAgent.h"
100 #include "core/inspector/InspectorFrontendChannel.h" 98 #include "core/inspector/InspectorFrontendChannel.h"
101 #include "core/inspector/InspectorInstrumentation.h" 99 #include "core/inspector/InspectorInstrumentation.h"
102 #include "core/inspector/InspectorOverlay.h" 100 #include "core/inspector/InspectorOverlay.h"
103 #include "core/inspector/InstanceCounters.h" 101 #include "core/inspector/InstanceCounters.h"
104 #include "core/inspector/InstrumentingAgents.h" 102 #include "core/inspector/InstrumentingAgents.h"
105 #include "core/layout/LayoutMenuList.h" 103 #include "core/layout/LayoutMenuList.h"
106 #include "core/layout/LayoutObject.h" 104 #include "core/layout/LayoutObject.h"
107 #include "core/layout/LayoutTreeAsText.h" 105 #include "core/layout/LayoutTreeAsText.h"
108 #include "core/layout/LayoutView.h" 106 #include "core/layout/LayoutView.h"
109 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h" 107 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h"
110 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" 108 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h"
111 #include "core/loader/FrameLoader.h" 109 #include "core/loader/FrameLoader.h"
112 #include "core/loader/HistoryItem.h" 110 #include "core/loader/HistoryItem.h"
113 #include "core/page/ChromeClient.h" 111 #include "core/page/ChromeClient.h"
114 #include "core/page/FocusController.h" 112 #include "core/page/FocusController.h"
115 #include "core/page/NetworkStateNotifier.h" 113 #include "core/page/NetworkStateNotifier.h"
116 #include "core/page/Page.h" 114 #include "core/page/Page.h"
117 #include "core/page/PrintContext.h" 115 #include "core/page/PrintContext.h"
118 #include "core/paint/DeprecatedPaintLayer.h" 116 #include "core/paint/DeprecatedPaintLayer.h"
119 #include "core/plugins/testing/DictionaryPluginPlaceholder.h"
120 #include "core/plugins/testing/DocumentFragmentPluginPlaceholder.h"
121 #include "core/svg/SVGImageElement.h" 117 #include "core/svg/SVGImageElement.h"
122 #include "core/testing/DictionaryTest.h" 118 #include "core/testing/DictionaryTest.h"
123 #include "core/testing/GCObservation.h" 119 #include "core/testing/GCObservation.h"
124 #include "core/testing/InternalRuntimeFlags.h" 120 #include "core/testing/InternalRuntimeFlags.h"
125 #include "core/testing/InternalSettings.h" 121 #include "core/testing/InternalSettings.h"
126 #include "core/testing/LayerRect.h" 122 #include "core/testing/LayerRect.h"
127 #include "core/testing/LayerRectList.h" 123 #include "core/testing/LayerRectList.h"
128 #include "core/testing/PluginPlaceholderOptions.h" 124 #include "core/testing/PluginPlaceholderOptions.h"
129 #include "core/testing/PrivateScriptTest.h" 125 #include "core/testing/PrivateScriptTest.h"
130 #include "core/testing/TypeConversions.h" 126 #include "core/testing/TypeConversions.h"
(...skipping 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after
2384 { 2380 {
2385 return CanvasFontCache::maxFonts(); 2381 return CanvasFontCache::maxFonts();
2386 } 2382 }
2387 2383
2388 ClientRect* Internals::boundsInViewportSpace(Element* element) 2384 ClientRect* Internals::boundsInViewportSpace(Element* element)
2389 { 2385 {
2390 ASSERT(element); 2386 ASSERT(element);
2391 return ClientRect::create(element->boundsInViewportSpace()); 2387 return ClientRect::create(element->boundsInViewportSpace());
2392 } 2388 }
2393 2389
2394 void Internals::forcePluginPlaceholder(HTMLElement* element, PassRefPtrWillBeRaw Ptr<DocumentFragment> fragment, ExceptionState& exceptionState)
2395 {
2396 if (!element->isPluginElement()) {
2397 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov ided is not a plugin.");
2398 return;
2399 }
2400 toHTMLPlugInElement(element)->setPlaceholder(DocumentFragmentPluginPlacehold er::create(fragment));
2401 }
2402
2403 void Internals::forcePluginPlaceholder(HTMLElement* element, const PluginPlaceho lderOptions& options, ExceptionState& exceptionState)
2404 {
2405 if (!element->isPluginElement()) {
2406 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov ided is not a plugin.");
2407 return;
2408 }
2409 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr eate(element->document(), options));
2410 }
2411
2412 void Internals::forceBlinkGCWithoutV8GC() 2390 void Internals::forceBlinkGCWithoutV8GC()
2413 { 2391 {
2414 ThreadState::current()->setGCState(ThreadState::FullGCScheduled); 2392 ThreadState::current()->setGCState(ThreadState::FullGCScheduled);
2415 } 2393 }
2416 2394
2417 String Internals::selectedHTMLForClipboard() 2395 String Internals::selectedHTMLForClipboard()
2418 { 2396 {
2419 return frame()->selection().selectedHTMLForClipboard(); 2397 return frame()->selection().selectedHTMLForClipboard();
2420 } 2398 }
2421 2399
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
2482 2460
2483 return animator->setScrollbarsVisibleForTesting(visible); 2461 return animator->setScrollbarsVisibleForTesting(visible);
2484 } 2462 }
2485 2463
2486 void Internals::forceRestrictIFramePermissions() 2464 void Internals::forceRestrictIFramePermissions()
2487 { 2465 {
2488 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); 2466 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true);
2489 } 2467 }
2490 2468
2491 } // namespace blink 2469 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698