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

Side by Side Diff: Source/core/html/HTMLTextFormControlElement.h

Issue 255163002: Dispatch change event for input type=checkbox when checked but value is null (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved shouldDispatchFormControlChangeEvent as private/protected function and moved shouldDispatch t… Created 6 years, 7 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
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/html/HTMLTextFormControlElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
6 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. 6 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 void restoreCachedSelection(); 104 void restoreCachedSelection();
105 105
106 virtual void defaultEventHandler(Event*) OVERRIDE; 106 virtual void defaultEventHandler(Event*) OVERRIDE;
107 virtual void subtreeHasChanged() = 0; 107 virtual void subtreeHasChanged() = 0;
108 108
109 void setLastChangeWasNotUserEdit() { m_lastChangeWasUserEdit = false; } 109 void setLastChangeWasNotUserEdit() { m_lastChangeWasUserEdit = false; }
110 110
111 String valueWithHardLineBreaks() const; 111 String valueWithHardLineBreaks() const;
112 112
113 virtual bool shouldDispatchFormControlChangeEvent(String&, String&);
114
113 private: 115 private:
114 int computeSelectionStart() const; 116 int computeSelectionStart() const;
115 int computeSelectionEnd() const; 117 int computeSelectionEnd() const;
116 TextFieldSelectionDirection computeSelectionDirection() const; 118 TextFieldSelectionDirection computeSelectionDirection() const;
117 119
118 virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusType) OVERR IDE FINAL; 120 virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusType) OVERR IDE FINAL;
119 virtual void dispatchBlurEvent(Element* newFocusedElement) OVERRIDE FINAL; 121 virtual void dispatchBlurEvent(Element* newFocusedElement) OVERRIDE FINAL;
120 122
121 // Returns true if user-editable value is empty. Used to check placeholder v isibility. 123 // Returns true if user-editable value is empty. Used to check placeholder v isibility.
122 virtual bool isEmptyValue() const = 0; 124 virtual bool isEmptyValue() const = 0;
(...skipping 17 matching lines...) Expand all
140 return element.isTextFormControl(); 142 return element.isTextFormControl();
141 } 143 }
142 144
143 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLTextFormControlElement); 145 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLTextFormControlElement);
144 146
145 HTMLTextFormControlElement* enclosingTextFormControl(const Position&); 147 HTMLTextFormControlElement* enclosingTextFormControl(const Position&);
146 148
147 } // namespace 149 } // namespace
148 150
149 #endif 151 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/html/HTMLTextFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698