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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLInputElement.h

Issue 2463693002: INPUT element: Updating 'step' attribute should adjust the last value. (Closed)
Patch Set: Created 4 years, 1 month 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
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, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
6 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 6 * Copyright (C) 2012 Samsung Electronics. 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 void setType(const AtomicString&); 119 void setType(const AtomicString&);
120 120
121 String value() const override; 121 String value() const override;
122 void setValue(const String&, 122 void setValue(const String&,
123 ExceptionState&, 123 ExceptionState&,
124 TextFieldEventBehavior = DispatchNoEvent); 124 TextFieldEventBehavior = DispatchNoEvent);
125 void setValue(const String&, 125 void setValue(const String&,
126 TextFieldEventBehavior = DispatchNoEvent) override; 126 TextFieldEventBehavior = DispatchNoEvent) override;
127 void setValueForUser(const String&); 127 void setValueForUser(const String&);
128 // Update the value, and clear hasDirtyValue() flag.
129 void setNonDirtyValue(const String&);
128 // Checks if the specified string would be a valid value. 130 // Checks if the specified string would be a valid value.
129 // We should not call this for types with no string value such as CHECKBOX and 131 // We should not call this for types with no string value such as CHECKBOX and
130 // RADIO. 132 // RADIO.
131 bool isValidValue(const String&) const; 133 bool isValidValue(const String&) const;
132 bool hasDirtyValue() const; 134 bool hasDirtyValue() const;
133 135
134 String sanitizeValue(const String&) const; 136 String sanitizeValue(const String&) const;
135 137
136 String localizeValue(const String&) const; 138 String localizeValue(const String&) const;
137 139
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 400
399 // Returns null if this isn't associated with any radio button group. 401 // Returns null if this isn't associated with any radio button group.
400 RadioButtonGroupScope* radioButtonGroupScope() const; 402 RadioButtonGroupScope* radioButtonGroupScope() const;
401 void addToRadioButtonGroup(); 403 void addToRadioButtonGroup();
402 void removeFromRadioButtonGroup(); 404 void removeFromRadioButtonGroup();
403 PassRefPtr<ComputedStyle> customStyleForLayoutObject() override; 405 PassRefPtr<ComputedStyle> customStyleForLayoutObject() override;
404 406
405 bool shouldDispatchFormControlChangeEvent(String&, String&) override; 407 bool shouldDispatchFormControlChangeEvent(String&, String&) override;
406 408
407 AtomicString m_name; 409 AtomicString m_name;
408 // A dirty value. isNull() means the value is not dirty and we should refer 410 // The value string in |value| value mode.
409 // to |value| content attribute value. 411 // TODO(tkent): Rename it to m_nonAttributeValue.
410 String m_valueIfDirty; 412 String m_valueIfDirty;
411 String m_suggestedValue; 413 String m_suggestedValue;
412 int m_size; 414 int m_size;
413 int m_maxLength; 415 int m_maxLength;
414 int m_minLength; 416 int m_minLength;
415 // https://html.spec.whatwg.org/multipage/forms.html#concept-input-value-dirty -flag 417 // https://html.spec.whatwg.org/multipage/forms.html#concept-input-value-dirty -flag
416 unsigned m_hasDirtyValue : 1; 418 unsigned m_hasDirtyValue : 1;
417 // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-checked 419 // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-checked
418 unsigned m_isChecked : 1; 420 unsigned m_isChecked : 1;
419 // https://html.spec.whatwg.org/multipage/forms.html#concept-input-checked-dir ty-flag 421 // https://html.spec.whatwg.org/multipage/forms.html#concept-input-checked-dir ty-flag
(...skipping 15 matching lines...) Expand all
435 // assumes that it lives as long as its owning element lives. If we move the 437 // assumes that it lives as long as its owning element lives. If we move the
436 // loader into the ImageInput object we may delete the loader while this 438 // loader into the ImageInput object we may delete the loader while this
437 // element lives on. 439 // element lives on.
438 Member<HTMLImageLoader> m_imageLoader; 440 Member<HTMLImageLoader> m_imageLoader;
439 Member<ListAttributeTargetObserver> m_listAttributeTargetObserver; 441 Member<ListAttributeTargetObserver> m_listAttributeTargetObserver;
440 }; 442 };
441 443
442 } // namespace blink 444 } // namespace blink
443 445
444 #endif // HTMLInputElement_h 446 #endif // HTMLInputElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698