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

Unified Diff: third_party/WebKit/Source/core/html/TextControlElement.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/html/TextControlElement.cpp
diff --git a/third_party/WebKit/Source/core/html/TextControlElement.cpp b/third_party/WebKit/Source/core/html/TextControlElement.cpp
index f214cb1c8bbad618e27afd92b3b4c8f2a899c06d..5fd643d31455b0ed4de1869649661cc3d566f086 100644
--- a/third_party/WebKit/Source/core/html/TextControlElement.cpp
+++ b/third_party/WebKit/Source/core/html/TextControlElement.cpp
@@ -87,7 +87,7 @@ Node::InsertionNotificationRequest TextControlElement::insertedInto(
void TextControlElement::dispatchFocusEvent(
Element* oldFocusedElement,
WebFocusType type,
- InputDeviceCapabilities* sourceCapabilities) {
+ const InputDeviceCapabilitiesValue& sourceCapabilities) {
if (supportsPlaceholder())
updatePlaceholderVisibility();
handleFocusEvent(oldFocusedElement, type);
@@ -98,7 +98,7 @@ void TextControlElement::dispatchFocusEvent(
void TextControlElement::dispatchBlurEvent(
Element* newFocusedElement,
WebFocusType type,
- InputDeviceCapabilities* sourceCapabilities) {
+ const InputDeviceCapabilitiesValue& sourceCapabilities) {
if (supportsPlaceholder())
updatePlaceholderVisibility();
handleBlurEvent();
@@ -199,7 +199,8 @@ void TextControlElement::select() {
setSelectionRangeForBinding(0, std::numeric_limits<unsigned>::max());
// Avoid SelectionBehaviorOnFocus::Restore, which scrolls containers to show
// the selection.
- focus(FocusParams(SelectionBehaviorOnFocus::None, WebFocusTypeNone, nullptr));
+ focus(FocusParams(SelectionBehaviorOnFocus::None, WebFocusTypeNone,
+ InputDeviceCapabilities::Null));
restoreCachedSelection();
}
« no previous file with comments | « third_party/WebKit/Source/core/html/TextControlElement.h ('k') | third_party/WebKit/Source/core/html/forms/InputTypeView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698