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

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

Issue 2384273007: reflow comments in core/html/*.{cpp,h},core/html/imports (Closed)
Patch Set: comments Created 4 years, 2 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
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 bool rangeUnderflow() const final; 65 bool rangeUnderflow() const final;
66 bool rangeOverflow() const final; 66 bool rangeOverflow() const final;
67 bool stepMismatch() const final; 67 bool stepMismatch() const final;
68 bool tooLong() const final; 68 bool tooLong() const final;
69 bool tooShort() const final; 69 bool tooShort() const final;
70 bool typeMismatch() const final; 70 bool typeMismatch() const final;
71 bool valueMissing() const final; 71 bool valueMissing() const final;
72 String validationMessage() const final; 72 String validationMessage() const final;
73 String validationSubMessage() const final; 73 String validationSubMessage() const final;
74 74
75 // Returns the minimum value for type=date, number, or range. Don't call this for other types. 75 // Returns the minimum value for type=date, number, or range. Don't call this
76 // for other types.
76 double minimum() const; 77 double minimum() const;
77 // Returns the maximum value for type=date, number, or range. Don't call this for other types. 78 // Returns the maximum value for type=date, number, or range. Don't call this
78 // This always returns a value which is >= minimum(). 79 // for other types. This always returns a value which is >= minimum().
79 double maximum() const; 80 double maximum() const;
80 // Sets the "allowed value step" defined in the HTML spec to the specified dou ble pointer. 81 // Sets the "allowed value step" defined in the HTML spec to the specified
81 // Returns false if there is no "allowed value step." 82 // double pointer. Returns false if there is no "allowed value step."
82 bool getAllowedValueStep(Decimal*) const; 83 bool getAllowedValueStep(Decimal*) const;
83 StepRange createStepRange(AnyStepHandling) const; 84 StepRange createStepRange(AnyStepHandling) const;
84 85
85 Decimal findClosestTickMarkValue(const Decimal&); 86 Decimal findClosestTickMarkValue(const Decimal&);
86 87
87 // Implementations of HTMLInputElement::stepUp() and stepDown(). 88 // Implementations of HTMLInputElement::stepUp() and stepDown().
88 void stepUp(int, ExceptionState&); 89 void stepUp(int, ExceptionState&);
89 void stepDown(int, ExceptionState&); 90 void stepDown(int, ExceptionState&);
90 // stepUp()/stepDown() for user-interaction. 91 // stepUp()/stepDown() for user-interaction.
91 bool isSteppable() const; 92 bool isSteppable() const;
92 93
93 // Returns true if the type is button, reset, or submit. 94 // Returns true if the type is button, reset, or submit.
94 bool isTextButton() const; 95 bool isTextButton() const;
95 // Returns true if the type is email, number, password, search, tel, text, 96 // Returns true if the type is email, number, password, search, tel, text,
96 // or url. 97 // or url.
97 bool isTextField() const; 98 bool isTextField() const;
98 // Do not add type check predicates for concrete input types; e.g. isImage, 99 // Do not add type check predicates for concrete input types; e.g. isImage,
99 // isRadio, isFile. If you want to check the input type, you may use 100 // isRadio, isFile. If you want to check the input type, you may use
100 // |input->type() == InputTypeNames::image|, etc. 101 // |input->type() == InputTypeNames::image|, etc.
101 102
102 bool checked() const; 103 bool checked() const;
103 void setChecked(bool, TextFieldEventBehavior = DispatchNoEvent); 104 void setChecked(bool, TextFieldEventBehavior = DispatchNoEvent);
104 void dispatchChangeEventIfNeeded(); 105 void dispatchChangeEventIfNeeded();
105 106
106 // 'indeterminate' is a state independent of the checked state that causes the control to draw in a way that hides the actual state. 107 // 'indeterminate' is a state independent of the checked state that causes the
108 // control to draw in a way that hides the actual state.
107 bool indeterminate() const { return m_isIndeterminate; } 109 bool indeterminate() const { return m_isIndeterminate; }
108 void setIndeterminate(bool); 110 void setIndeterminate(bool);
109 // shouldAppearChecked is used by the layout tree/CSS while checked() is used by JS to determine checked state 111 // shouldAppearChecked is used by the layout tree/CSS while checked() is used
112 // by JS to determine checked state
110 bool shouldAppearChecked() const; 113 bool shouldAppearChecked() const;
111 bool shouldAppearIndeterminate() const override; 114 bool shouldAppearIndeterminate() const override;
112 115
113 int size() const; 116 int size() const;
114 bool sizeShouldIncludeDecoration(int& preferredSize) const; 117 bool sizeShouldIncludeDecoration(int& preferredSize) const;
115 118
116 void setType(const AtomicString&); 119 void setType(const AtomicString&);
117 120
118 String value() const override; 121 String value() const override;
119 void setValue(const String&, 122 void setValue(const String&,
120 ExceptionState&, 123 ExceptionState&,
121 TextFieldEventBehavior = DispatchNoEvent); 124 TextFieldEventBehavior = DispatchNoEvent);
122 void setValue(const String&, 125 void setValue(const String&,
123 TextFieldEventBehavior = DispatchNoEvent) override; 126 TextFieldEventBehavior = DispatchNoEvent) override;
124 void setValueForUser(const String&); 127 void setValueForUser(const String&);
125 // Checks if the specified string would be a valid value. 128 // Checks if the specified string would be a valid value.
126 // We should not call this for types with no string value such as CHECKBOX and RADIO. 129 // We should not call this for types with no string value such as CHECKBOX and
130 // RADIO.
127 bool isValidValue(const String&) const; 131 bool isValidValue(const String&) const;
128 bool hasDirtyValue() const; 132 bool hasDirtyValue() const;
129 133
130 String sanitizeValue(const String&) const; 134 String sanitizeValue(const String&) const;
131 135
132 String localizeValue(const String&) const; 136 String localizeValue(const String&) const;
133 137
134 const String& suggestedValue() const; 138 const String& suggestedValue() const;
135 void setSuggestedValue(const String&); 139 void setSuggestedValue(const String&);
136 140
(...skipping 24 matching lines...) Expand all
161 void setSelectionRangeForBinding(int start, 165 void setSelectionRangeForBinding(int start,
162 int end, 166 int end,
163 const String& direction, 167 const String& direction,
164 ExceptionState&); 168 ExceptionState&);
165 169
166 bool layoutObjectIsNeeded(const ComputedStyle&) final; 170 bool layoutObjectIsNeeded(const ComputedStyle&) final;
167 LayoutObject* createLayoutObject(const ComputedStyle&) override; 171 LayoutObject* createLayoutObject(const ComputedStyle&) override;
168 void detachLayoutTree(const AttachContext& = AttachContext()) final; 172 void detachLayoutTree(const AttachContext& = AttachContext()) final;
169 void updateFocusAppearance(SelectionBehaviorOnFocus) final; 173 void updateFocusAppearance(SelectionBehaviorOnFocus) final;
170 174
171 // FIXME: For isActivatedSubmit and setActivatedSubmit, we should use the NVI- idiom here by making 175 // FIXME: For isActivatedSubmit and setActivatedSubmit, we should use the
172 // it private virtual in all classes and expose a public method in HTMLFormCon trolElement to call 176 // NVI-idiom here by making it private virtual in all classes and expose a
177 // public method in HTMLFormControlElement to call
173 // the private virtual method. 178 // the private virtual method.
174 bool isActivatedSubmit() const final; 179 bool isActivatedSubmit() const final;
175 void setActivatedSubmit(bool flag) final; 180 void setActivatedSubmit(bool flag) final;
176 181
177 String altText() const final; 182 String altText() const final;
178 183
179 const AtomicString& defaultValue() const; 184 const AtomicString& defaultValue() const;
180 185
181 Vector<String> acceptMIMETypes(); 186 Vector<String> acceptMIMETypes();
182 Vector<String> acceptFileExtensions(); 187 Vector<String> acceptFileExtensions();
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 unsigned m_hasNonEmptyList : 1; 425 unsigned m_hasNonEmptyList : 1;
421 unsigned m_stateRestored : 1; 426 unsigned m_stateRestored : 1;
422 unsigned m_parsingInProgress : 1; 427 unsigned m_parsingInProgress : 1;
423 unsigned m_valueAttributeWasUpdatedAfterParsing : 1; 428 unsigned m_valueAttributeWasUpdatedAfterParsing : 1;
424 unsigned m_canReceiveDroppedFiles : 1; 429 unsigned m_canReceiveDroppedFiles : 1;
425 unsigned m_shouldRevealPassword : 1; 430 unsigned m_shouldRevealPassword : 1;
426 unsigned m_needsToUpdateViewValue : 1; 431 unsigned m_needsToUpdateViewValue : 1;
427 unsigned m_isPlaceholderVisible : 1; 432 unsigned m_isPlaceholderVisible : 1;
428 Member<InputType> m_inputType; 433 Member<InputType> m_inputType;
429 Member<InputTypeView> m_inputTypeView; 434 Member<InputTypeView> m_inputTypeView;
430 // The ImageLoader must be owned by this element because the loader code assum es 435 // The ImageLoader must be owned by this element because the loader code
431 // that it lives as long as its owning element lives. If we move the loader in to 436 // assumes that it lives as long as its owning element lives. If we move the
432 // the ImageInput object we may delete the loader while this element lives on. 437 // loader into the ImageInput object we may delete the loader while this
438 // element lives on.
433 Member<HTMLImageLoader> m_imageLoader; 439 Member<HTMLImageLoader> m_imageLoader;
434 Member<ListAttributeTargetObserver> m_listAttributeTargetObserver; 440 Member<ListAttributeTargetObserver> m_listAttributeTargetObserver;
435 }; 441 };
436 442
437 } // namespace blink 443 } // namespace blink
438 444
439 #endif // HTMLInputElement_h 445 #endif // HTMLInputElement_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLImageLoader.cpp ('k') | third_party/WebKit/Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698