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

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

Issue 222023002: focus() behaviour differs depending on how value is set (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebasing 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
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.cpp ('k') | Source/core/html/HTMLTextFormControlElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTextFormControlElement.h
diff --git a/Source/core/html/HTMLTextFormControlElement.h b/Source/core/html/HTMLTextFormControlElement.h
index 0aa120b67b37c101a0e2af7a7ffc1bb05f3248cb..576c867f86d1cc426354eebe492b319dd837e699 100644
--- a/Source/core/html/HTMLTextFormControlElement.h
+++ b/Source/core/html/HTMLTextFormControlElement.h
@@ -95,13 +95,13 @@ protected:
void cacheSelection(int start, int end, TextFieldSelectionDirection direction)
{
+ ASSERT(start >= 0);
m_cachedSelectionStart = start;
m_cachedSelectionEnd = end;
m_cachedSelectionDirection = direction;
}
void restoreCachedSelection();
- bool hasCachedSelection() const { return m_cachedSelectionStart >= 0; }
virtual void defaultEventHandler(Event*) OVERRIDE;
virtual void subtreeHasChanged() = 0;
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.cpp ('k') | Source/core/html/HTMLTextFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698