OLD | NEW |
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 Loading... |
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 2256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2387 { | 2383 { |
2388 return CanvasFontCache::maxFonts(); | 2384 return CanvasFontCache::maxFonts(); |
2389 } | 2385 } |
2390 | 2386 |
2391 ClientRect* Internals::boundsInViewportSpace(Element* element) | 2387 ClientRect* Internals::boundsInViewportSpace(Element* element) |
2392 { | 2388 { |
2393 ASSERT(element); | 2389 ASSERT(element); |
2394 return ClientRect::create(element->boundsInViewportSpace()); | 2390 return ClientRect::create(element->boundsInViewportSpace()); |
2395 } | 2391 } |
2396 | 2392 |
2397 void Internals::forcePluginPlaceholder(HTMLElement* element, PassRefPtrWillBeRaw
Ptr<DocumentFragment> fragment, ExceptionState& exceptionState) | |
2398 { | |
2399 if (!element->isPluginElement()) { | |
2400 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov
ided is not a plugin."); | |
2401 return; | |
2402 } | |
2403 toHTMLPlugInElement(element)->setPlaceholder(DocumentFragmentPluginPlacehold
er::create(fragment)); | |
2404 } | |
2405 | |
2406 void Internals::forcePluginPlaceholder(HTMLElement* element, const PluginPlaceho
lderOptions& options, ExceptionState& exceptionState) | |
2407 { | |
2408 if (!element->isPluginElement()) { | |
2409 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov
ided is not a plugin."); | |
2410 return; | |
2411 } | |
2412 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr
eate(element->document(), options)); | |
2413 } | |
2414 | |
2415 void Internals::forceBlinkGCWithoutV8GC() | 2393 void Internals::forceBlinkGCWithoutV8GC() |
2416 { | 2394 { |
2417 ThreadState::current()->setGCState(ThreadState::FullGCScheduled); | 2395 ThreadState::current()->setGCState(ThreadState::FullGCScheduled); |
2418 } | 2396 } |
2419 | 2397 |
2420 String Internals::selectedHTMLForClipboard() | 2398 String Internals::selectedHTMLForClipboard() |
2421 { | 2399 { |
2422 return frame()->selection().selectedHTMLForClipboard(); | 2400 return frame()->selection().selectedHTMLForClipboard(); |
2423 } | 2401 } |
2424 | 2402 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2485 | 2463 |
2486 return animator->setScrollbarsVisibleForTesting(visible); | 2464 return animator->setScrollbarsVisibleForTesting(visible); |
2487 } | 2465 } |
2488 | 2466 |
2489 void Internals::forceRestrictIFramePermissions() | 2467 void Internals::forceRestrictIFramePermissions() |
2490 { | 2468 { |
2491 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); | 2469 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); |
2492 } | 2470 } |
2493 | 2471 |
2494 } // namespace blink | 2472 } // namespace blink |
OLD | NEW |