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

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

Issue 2290313002: Remove PlatformKeyboardEvent (Closed)
Patch Set: One more fix Created 4 years, 3 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 #include "core/html/HTMLInputElement.h" 87 #include "core/html/HTMLInputElement.h"
88 #include "core/html/HTMLMediaElement.h" 88 #include "core/html/HTMLMediaElement.h"
89 #include "core/html/HTMLSelectElement.h" 89 #include "core/html/HTMLSelectElement.h"
90 #include "core/html/HTMLTextAreaElement.h" 90 #include "core/html/HTMLTextAreaElement.h"
91 #include "core/html/canvas/CanvasFontCache.h" 91 #include "core/html/canvas/CanvasFontCache.h"
92 #include "core/html/canvas/CanvasRenderingContext.h" 92 #include "core/html/canvas/CanvasRenderingContext.h"
93 #include "core/html/forms/FormController.h" 93 #include "core/html/forms/FormController.h"
94 #include "core/html/shadow/ShadowElementNames.h" 94 #include "core/html/shadow/ShadowElementNames.h"
95 #include "core/html/shadow/TextControlInnerElements.h" 95 #include "core/html/shadow/TextControlInnerElements.h"
96 #include "core/input/EventHandler.h" 96 #include "core/input/EventHandler.h"
97 #include "core/input/KeyboardEventManager.h"
97 #include "core/inspector/InspectorInstrumentation.h" 98 #include "core/inspector/InspectorInstrumentation.h"
98 #include "core/inspector/InstanceCounters.h" 99 #include "core/inspector/InstanceCounters.h"
99 #include "core/inspector/MainThreadDebugger.h" 100 #include "core/inspector/MainThreadDebugger.h"
100 #include "core/layout/LayoutMenuList.h" 101 #include "core/layout/LayoutMenuList.h"
101 #include "core/layout/LayoutObject.h" 102 #include "core/layout/LayoutObject.h"
102 #include "core/layout/LayoutTreeAsText.h" 103 #include "core/layout/LayoutTreeAsText.h"
103 #include "core/layout/api/LayoutMenuListItem.h" 104 #include "core/layout/api/LayoutMenuListItem.h"
104 #include "core/layout/api/LayoutViewItem.h" 105 #include "core/layout/api/LayoutViewItem.h"
105 #include "core/layout/compositing/CompositedLayerMapping.h" 106 #include "core/layout/compositing/CompositedLayerMapping.h"
106 #include "core/layout/compositing/PaintLayerCompositor.h" 107 #include "core/layout/compositing/PaintLayerCompositor.h"
(...skipping 16 matching lines...) Expand all
123 #include "core/testing/LayerRectList.h" 124 #include "core/testing/LayerRectList.h"
124 #include "core/testing/MockHyphenation.h" 125 #include "core/testing/MockHyphenation.h"
125 #include "core/testing/PrivateScriptTest.h" 126 #include "core/testing/PrivateScriptTest.h"
126 #include "core/testing/TypeConversions.h" 127 #include "core/testing/TypeConversions.h"
127 #include "core/testing/UnionTypesTest.h" 128 #include "core/testing/UnionTypesTest.h"
128 #include "core/workers/WorkerThread.h" 129 #include "core/workers/WorkerThread.h"
129 #include "gpu/command_buffer/client/gles2_interface.h" 130 #include "gpu/command_buffer/client/gles2_interface.h"
130 #include "platform/Cursor.h" 131 #include "platform/Cursor.h"
131 #include "platform/Language.h" 132 #include "platform/Language.h"
132 #include "platform/LayoutLocale.h" 133 #include "platform/LayoutLocale.h"
133 #include "platform/PlatformKeyboardEvent.h"
134 #include "platform/RuntimeEnabledFeatures.h" 134 #include "platform/RuntimeEnabledFeatures.h"
135 #include "platform/TraceEvent.h" 135 #include "platform/TraceEvent.h"
136 #include "platform/geometry/IntRect.h" 136 #include "platform/geometry/IntRect.h"
137 #include "platform/geometry/LayoutRect.h" 137 #include "platform/geometry/LayoutRect.h"
138 #include "platform/graphics/GraphicsLayer.h" 138 #include "platform/graphics/GraphicsLayer.h"
139 #include "platform/heap/Handle.h" 139 #include "platform/heap/Handle.h"
140 #include "platform/scroll/ProgrammaticScrollAnimator.h" 140 #include "platform/scroll/ProgrammaticScrollAnimator.h"
141 #include "platform/weborigin/SchemeRegistry.h" 141 #include "platform/weborigin/SchemeRegistry.h"
142 #include "public/platform/Platform.h" 142 #include "public/platform/Platform.h"
143 #include "public/platform/WebConnectionType.h" 143 #include "public/platform/WebConnectionType.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 overrideUserPreferredLanguages(Vector<AtomicString>()); 235 overrideUserPreferredLanguages(Vector<AtomicString>());
236 if (!page->deprecatedLocalMainFrame()->spellChecker().isSpellCheckingEnabled ()) 236 if (!page->deprecatedLocalMainFrame()->spellChecker().isSpellCheckingEnabled ())
237 page->deprecatedLocalMainFrame()->spellChecker().toggleSpellCheckingEnab led(); 237 page->deprecatedLocalMainFrame()->spellChecker().toggleSpellCheckingEnab led();
238 if (page->deprecatedLocalMainFrame()->editor().isOverwriteModeEnabled()) 238 if (page->deprecatedLocalMainFrame()->editor().isOverwriteModeEnabled())
239 page->deprecatedLocalMainFrame()->editor().toggleOverwriteModeEnabled(); 239 page->deprecatedLocalMainFrame()->editor().toggleOverwriteModeEnabled();
240 240
241 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator( )) 241 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator( ))
242 scrollingCoordinator->reset(); 242 scrollingCoordinator->reset();
243 243
244 page->deprecatedLocalMainFrame()->view()->clear(); 244 page->deprecatedLocalMainFrame()->view()->clear();
245 PlatformKeyboardEvent::setCurrentCapsLockState(PlatformKeyboardEvent::Overri deCapsLockState::Default); 245 KeyboardEventManager::setCurrentCapsLockState(OverrideCapsLockState::Default );
246 } 246 }
247 247
248 Internals::Internals(ScriptState* scriptState) 248 Internals::Internals(ScriptState* scriptState)
249 : ContextLifecycleObserver(scriptState->getExecutionContext()) 249 : ContextLifecycleObserver(scriptState->getExecutionContext())
250 , m_runtimeFlags(InternalRuntimeFlags::create()) 250 , m_runtimeFlags(InternalRuntimeFlags::create())
251 { 251 {
252 } 252 }
253 253
254 Document* Internals::contextDocument() const 254 Document* Internals::contextDocument() const
255 { 255 {
(...skipping 2304 matching lines...) Expand 10 before | Expand all | Expand 10 after
2560 ClientRectList* Internals::outlineRects(Element* element) 2560 ClientRectList* Internals::outlineRects(Element* element)
2561 { 2561 {
2562 Vector<LayoutRect> rects; 2562 Vector<LayoutRect> rects;
2563 if (element && element->layoutObject()) 2563 if (element && element->layoutObject())
2564 element->layoutObject()->addOutlineRects(rects, LayoutPoint(), LayoutObj ect::DontIncludeBlockVisualOverflow); 2564 element->layoutObject()->addOutlineRects(rects, LayoutPoint(), LayoutObj ect::DontIncludeBlockVisualOverflow);
2565 return ClientRectList::create(rects); 2565 return ClientRectList::create(rects);
2566 } 2566 }
2567 2567
2568 void Internals::setCapsLockState(bool enabled) 2568 void Internals::setCapsLockState(bool enabled)
2569 { 2569 {
2570 PlatformKeyboardEvent::setCurrentCapsLockState(enabled ? 2570 KeyboardEventManager::setCurrentCapsLockState(enabled ? OverrideCapsLockStat e::On : OverrideCapsLockState::Off);
2571 PlatformKeyboardEvent::OverrideCapsLockState::On : PlatformKeyboardEvent ::OverrideCapsLockState::Off);
2572 } 2571 }
2573 2572
2574 bool Internals::setScrollbarVisibilityInScrollableArea(Node* node, bool visible) 2573 bool Internals::setScrollbarVisibilityInScrollableArea(Node* node, bool visible)
2575 { 2574 {
2576 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) 2575 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node))
2577 return scrollableArea->scrollAnimator().setScrollbarsVisibleForTesting(v isible); 2576 return scrollableArea->scrollAnimator().setScrollbarsVisibleForTesting(v isible);
2578 return false; 2577 return false;
2579 } 2578 }
2580 2579
2581 double Internals::monotonicTimeToZeroBasedDocumentTime(double platformTime, Exce ptionState& exceptionState) 2580 double Internals::monotonicTimeToZeroBasedDocumentTime(double platformTime, Exce ptionState& exceptionState)
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2619 2618
2620 ClientRect* Internals::visualRect(Node* node) 2619 ClientRect* Internals::visualRect(Node* node)
2621 { 2620 {
2622 if (!node || !node->layoutObject()) 2621 if (!node || !node->layoutObject())
2623 return ClientRect::create(); 2622 return ClientRect::create();
2624 2623
2625 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); 2624 return ClientRect::create(FloatRect(node->layoutObject()->visualRect()));
2626 } 2625 }
2627 2626
2628 } // namespace blink 2627 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698