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

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2678683002: Delay instantiating InputDeviceCapabilities until accessed. (Closed)
Patch Set: rebased Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 2fde2c526802721659102806ad693fc66f3f70b6..ef1654c3f4ff0cb6ee2f6c501e3c412d4c5ad7e8 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -2658,7 +2658,8 @@ void Element::focus(const FocusParams& params) {
*this);
if (found && isShadowIncludingInclusiveAncestorOf(found)) {
found->focus(FocusParams(SelectionBehaviorOnFocus::Reset,
- WebFocusTypeForward, nullptr));
+ WebFocusTypeForward,
+ InputDeviceCapabilities::Null));
return;
}
}
@@ -2785,17 +2786,19 @@ Element* Element::adjustedFocusedElementInTreeScope() const {
: nullptr;
}
-void Element::dispatchFocusEvent(Element* oldFocusedElement,
- WebFocusType type,
- InputDeviceCapabilities* sourceCapabilities) {
+void Element::dispatchFocusEvent(
+ Element* oldFocusedElement,
+ WebFocusType type,
+ const InputDeviceCapabilitiesValue& sourceCapabilities) {
dispatchEvent(FocusEvent::create(EventTypeNames::focus, false, false,
document().domWindow(), 0, oldFocusedElement,
sourceCapabilities));
}
-void Element::dispatchBlurEvent(Element* newFocusedElement,
- WebFocusType type,
- InputDeviceCapabilities* sourceCapabilities) {
+void Element::dispatchBlurEvent(
+ Element* newFocusedElement,
+ WebFocusType type,
+ const InputDeviceCapabilitiesValue& sourceCapabilities) {
dispatchEvent(FocusEvent::create(EventTypeNames::blur, false, false,
document().domWindow(), 0, newFocusedElement,
sourceCapabilities));
@@ -2805,7 +2808,7 @@ void Element::dispatchFocusInEvent(
const AtomicString& eventType,
Element* oldFocusedElement,
WebFocusType,
- InputDeviceCapabilities* sourceCapabilities) {
+ const InputDeviceCapabilitiesValue& sourceCapabilities) {
#if DCHECK_IS_ON()
DCHECK(!EventDispatchForbiddenScope::isEventDispatchForbidden());
#endif
@@ -2819,7 +2822,7 @@ void Element::dispatchFocusInEvent(
void Element::dispatchFocusOutEvent(
const AtomicString& eventType,
Element* newFocusedElement,
- InputDeviceCapabilities* sourceCapabilities) {
+ const InputDeviceCapabilitiesValue& sourceCapabilities) {
#if DCHECK_IS_ON()
DCHECK(!EventDispatchForbiddenScope::isEventDispatchForbidden());
#endif
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.h ('k') | third_party/WebKit/Source/core/events/CompositionEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698