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

Unified Diff: Source/core/html/HTMLTextFormControlElement.cpp

Issue 222023002: focus() behaviour differs depending on how value is set (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing selection handling of 'value' HTML attribute by initializing m_cachedSelection{Start,End} wi… Created 6 years, 8 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: Source/core/html/HTMLTextFormControlElement.cpp
diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp
index 2eef6724f42469aa0bf5183a51a484f912ea2d9d..21bf8b6e0c3af24f3388b1164440c93f60aedfdc 100644
--- a/Source/core/html/HTMLTextFormControlElement.cpp
+++ b/Source/core/html/HTMLTextFormControlElement.cpp
@@ -53,8 +53,8 @@ using namespace std;
HTMLTextFormControlElement::HTMLTextFormControlElement(const QualifiedName& tagName, Document& doc, HTMLFormElement* form)
: HTMLFormControlElementWithState(tagName, doc, form)
, m_lastChangeWasUserEdit(false)
- , m_cachedSelectionStart(-1)
- , m_cachedSelectionEnd(-1)
+ , m_cachedSelectionStart(0)
+ , m_cachedSelectionEnd(0)
tkent 2014/04/09 00:16:48 hasCachedSelection() never returns false. We shou
harpreet.sk 2014/04/09 14:19:43 hasCachedSelection() is removed and assertions is
, m_cachedSelectionDirection(SelectionHasNoDirection)
{
}

Powered by Google App Engine
This is Rietveld 408576698