| OLD | NEW |
| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 class InputTypeView; | 42 class InputTypeView; |
| 43 class KURL; | 43 class KURL; |
| 44 class ListAttributeTargetObserver; | 44 class ListAttributeTargetObserver; |
| 45 class RadioButtonGroupScope; | 45 class RadioButtonGroupScope; |
| 46 struct DateTimeChooserParameters; | 46 struct DateTimeChooserParameters; |
| 47 | 47 |
| 48 class CORE_EXPORT HTMLInputElement : public HTMLTextFormControlElement { | 48 class CORE_EXPORT HTMLInputElement : public HTMLTextFormControlElement { |
| 49 DEFINE_WRAPPERTYPEINFO(); | 49 DEFINE_WRAPPERTYPEINFO(); |
| 50 public: | 50 public: |
| 51 static PassRefPtrWillBeRawPtr<HTMLInputElement> create(Document&, HTMLFormEl
ement*, bool createdByParser); | 51 static PassRefPtrWillBeRawPtr<HTMLInputElement> create(Document&, HTMLFormEl
ement*, bool createdByParser); |
| 52 virtual ~HTMLInputElement(); | 52 ~HTMLInputElement() override; |
| 53 DECLARE_VIRTUAL_TRACE(); | 53 DECLARE_VIRTUAL_TRACE(); |
| 54 | 54 |
| 55 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitspeechchange); | 55 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitspeechchange); |
| 56 | 56 |
| 57 virtual bool shouldAutocomplete() const override final; | 57 bool shouldAutocomplete() const final; |
| 58 | 58 |
| 59 // For ValidityState | 59 // For ValidityState |
| 60 virtual bool hasBadInput() const override final; | 60 bool hasBadInput() const final; |
| 61 virtual bool patternMismatch() const override final; | 61 bool patternMismatch() const final; |
| 62 virtual bool rangeUnderflow() const override final; | 62 bool rangeUnderflow() const final; |
| 63 virtual bool rangeOverflow() const override final; | 63 bool rangeOverflow() const final; |
| 64 virtual bool stepMismatch() const override final; | 64 bool stepMismatch() const final; |
| 65 virtual bool tooLong() const override final; | 65 bool tooLong() const final; |
| 66 virtual bool tooShort() const override final; | 66 bool tooShort() const final; |
| 67 virtual bool typeMismatch() const override final; | 67 bool typeMismatch() const final; |
| 68 virtual bool valueMissing() const override final; | 68 bool valueMissing() const final; |
| 69 virtual String validationMessage() const override final; | 69 String validationMessage() const final; |
| 70 | 70 |
| 71 // Returns the minimum value for type=date, number, or range. Don't call th
is for other types. | 71 // Returns the minimum value for type=date, number, or range. Don't call th
is for other types. |
| 72 double minimum() const; | 72 double minimum() const; |
| 73 // Returns the maximum value for type=date, number, or range. Don't call th
is for other types. | 73 // Returns the maximum value for type=date, number, or range. Don't call th
is for other types. |
| 74 // This always returns a value which is >= minimum(). | 74 // This always returns a value which is >= minimum(). |
| 75 double maximum() const; | 75 double maximum() const; |
| 76 // Sets the "allowed value step" defined in the HTML spec to the specified d
ouble pointer. | 76 // Sets the "allowed value step" defined in the HTML spec to the specified d
ouble pointer. |
| 77 // Returns false if there is no "allowed value step." | 77 // Returns false if there is no "allowed value step." |
| 78 bool getAllowedValueStep(Decimal*) const; | 78 bool getAllowedValueStep(Decimal*) const; |
| 79 StepRange createStepRange(AnyStepHandling) const; | 79 StepRange createStepRange(AnyStepHandling) const; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 96 | 96 |
| 97 bool checked() const { return m_isChecked; } | 97 bool checked() const { return m_isChecked; } |
| 98 void setChecked(bool, TextFieldEventBehavior = DispatchNoEvent); | 98 void setChecked(bool, TextFieldEventBehavior = DispatchNoEvent); |
| 99 void dispatchChangeEventIfNeeded(); | 99 void dispatchChangeEventIfNeeded(); |
| 100 | 100 |
| 101 // 'indeterminate' is a state independent of the checked state that causes t
he control to draw in a way that hides the actual state. | 101 // 'indeterminate' is a state independent of the checked state that causes t
he control to draw in a way that hides the actual state. |
| 102 bool indeterminate() const { return m_isIndeterminate; } | 102 bool indeterminate() const { return m_isIndeterminate; } |
| 103 void setIndeterminate(bool); | 103 void setIndeterminate(bool); |
| 104 // shouldAppearChecked is used by the layout tree/CSS while checked() is use
d by JS to determine checked state | 104 // shouldAppearChecked is used by the layout tree/CSS while checked() is use
d by JS to determine checked state |
| 105 bool shouldAppearChecked() const; | 105 bool shouldAppearChecked() const; |
| 106 virtual bool shouldAppearIndeterminate() const override; | 106 bool shouldAppearIndeterminate() const override; |
| 107 | 107 |
| 108 int size() const; | 108 int size() const; |
| 109 bool sizeShouldIncludeDecoration(int& preferredSize) const; | 109 bool sizeShouldIncludeDecoration(int& preferredSize) const; |
| 110 | 110 |
| 111 void setType(const AtomicString&); | 111 void setType(const AtomicString&); |
| 112 | 112 |
| 113 virtual String value() const override; | 113 String value() const override; |
| 114 void setValue(const String&, ExceptionState&, TextFieldEventBehavior = Dispa
tchNoEvent); | 114 void setValue(const String&, ExceptionState&, TextFieldEventBehavior = Dispa
tchNoEvent); |
| 115 void setValue(const String&, TextFieldEventBehavior = DispatchNoEvent); | 115 void setValue(const String&, TextFieldEventBehavior = DispatchNoEvent); |
| 116 void setValueForUser(const String&); | 116 void setValueForUser(const String&); |
| 117 // Checks if the specified string would be a valid value. | 117 // Checks if the specified string would be a valid value. |
| 118 // We should not call this for types with no string value such as CHECKBOX a
nd RADIO. | 118 // We should not call this for types with no string value such as CHECKBOX a
nd RADIO. |
| 119 bool isValidValue(const String&) const; | 119 bool isValidValue(const String&) const; |
| 120 bool hasDirtyValue() const { return !m_valueIfDirty.isNull(); }; | 120 bool hasDirtyValue() const { return !m_valueIfDirty.isNull(); }; |
| 121 | 121 |
| 122 String sanitizeValue(const String&) const; | 122 String sanitizeValue(const String&) const; |
| 123 | 123 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 140 | 140 |
| 141 int selectionStartForBinding(ExceptionState&) const; | 141 int selectionStartForBinding(ExceptionState&) const; |
| 142 int selectionEndForBinding(ExceptionState&) const; | 142 int selectionEndForBinding(ExceptionState&) const; |
| 143 String selectionDirectionForBinding(ExceptionState&) const; | 143 String selectionDirectionForBinding(ExceptionState&) const; |
| 144 void setSelectionStartForBinding(int, ExceptionState&); | 144 void setSelectionStartForBinding(int, ExceptionState&); |
| 145 void setSelectionEndForBinding(int, ExceptionState&); | 145 void setSelectionEndForBinding(int, ExceptionState&); |
| 146 void setSelectionDirectionForBinding(const String&, ExceptionState&); | 146 void setSelectionDirectionForBinding(const String&, ExceptionState&); |
| 147 void setSelectionRangeForBinding(int start, int end, ExceptionState&); | 147 void setSelectionRangeForBinding(int start, int end, ExceptionState&); |
| 148 void setSelectionRangeForBinding(int start, int end, const String& direction
, ExceptionState&); | 148 void setSelectionRangeForBinding(int start, int end, const String& direction
, ExceptionState&); |
| 149 | 149 |
| 150 virtual bool layoutObjectIsNeeded(const ComputedStyle&) override final; | 150 bool layoutObjectIsNeeded(const ComputedStyle&) final; |
| 151 virtual LayoutObject* createLayoutObject(const ComputedStyle&) override; | 151 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
| 152 virtual void detach(const AttachContext& = AttachContext()) override final; | 152 void detach(const AttachContext& = AttachContext()) final; |
| 153 virtual void updateFocusAppearance(bool restorePreviousSelection) override f
inal; | 153 void updateFocusAppearance(bool restorePreviousSelection) final; |
| 154 | 154 |
| 155 // FIXME: For isActivatedSubmit and setActivatedSubmit, we should use the NV
I-idiom here by making | 155 // FIXME: For isActivatedSubmit and setActivatedSubmit, we should use the NV
I-idiom here by making |
| 156 // it private virtual in all classes and expose a public method in HTMLFormC
ontrolElement to call | 156 // it private virtual in all classes and expose a public method in HTMLFormC
ontrolElement to call |
| 157 // the private virtual method. | 157 // the private virtual method. |
| 158 virtual bool isActivatedSubmit() const override final; | 158 bool isActivatedSubmit() const final; |
| 159 virtual void setActivatedSubmit(bool flag) override final; | 159 void setActivatedSubmit(bool flag) final; |
| 160 | 160 |
| 161 virtual String altText() const override final; | 161 String altText() const final; |
| 162 | 162 |
| 163 int maxResults() const { return m_maxResults; } | 163 int maxResults() const { return m_maxResults; } |
| 164 | 164 |
| 165 const AtomicString& defaultValue() const; | 165 const AtomicString& defaultValue() const; |
| 166 | 166 |
| 167 Vector<String> acceptMIMETypes(); | 167 Vector<String> acceptMIMETypes(); |
| 168 Vector<String> acceptFileExtensions(); | 168 Vector<String> acceptFileExtensions(); |
| 169 const AtomicString& alt() const; | 169 const AtomicString& alt() const; |
| 170 | 170 |
| 171 void setSize(unsigned); | 171 void setSize(unsigned); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 190 | 190 |
| 191 // These functions are used for laying out the input active during a | 191 // These functions are used for laying out the input active during a |
| 192 // drag-and-drop operation. | 192 // drag-and-drop operation. |
| 193 bool canReceiveDroppedFiles() const; | 193 bool canReceiveDroppedFiles() const; |
| 194 void setCanReceiveDroppedFiles(bool); | 194 void setCanReceiveDroppedFiles(bool); |
| 195 | 195 |
| 196 void onSearch(); | 196 void onSearch(); |
| 197 | 197 |
| 198 void updateClearButtonVisibility(); | 198 void updateClearButtonVisibility(); |
| 199 | 199 |
| 200 virtual bool willRespondToMouseClickEvents() override; | 200 bool willRespondToMouseClickEvents() override; |
| 201 | 201 |
| 202 HTMLElement* list() const; | 202 HTMLElement* list() const; |
| 203 HTMLDataListElement* dataList() const; | 203 HTMLDataListElement* dataList() const; |
| 204 bool hasValidDataListOptions() const; | 204 bool hasValidDataListOptions() const; |
| 205 void listAttributeTargetChanged(); | 205 void listAttributeTargetChanged(); |
| 206 | 206 |
| 207 HTMLInputElement* checkedRadioButtonForGroup(); | 207 HTMLInputElement* checkedRadioButtonForGroup(); |
| 208 bool isInRequiredRadioButtonGroup(); | 208 bool isInRequiredRadioButtonGroup(); |
| 209 | 209 |
| 210 // Functions for InputType classes. | 210 // Functions for InputType classes. |
| 211 void setValueInternal(const String&, TextFieldEventBehavior); | 211 void setValueInternal(const String&, TextFieldEventBehavior); |
| 212 bool valueAttributeWasUpdatedAfterParsing() const { return m_valueAttributeW
asUpdatedAfterParsing; } | 212 bool valueAttributeWasUpdatedAfterParsing() const { return m_valueAttributeW
asUpdatedAfterParsing; } |
| 213 void updateView(); | 213 void updateView(); |
| 214 bool needsToUpdateViewValue() const { return m_needsToUpdateViewValue; } | 214 bool needsToUpdateViewValue() const { return m_needsToUpdateViewValue; } |
| 215 virtual void setInnerEditorValue(const String&) override; | 215 void setInnerEditorValue(const String&) override; |
| 216 | 216 |
| 217 void cacheSelectionInResponseToSetValue(int caretOffset) { cacheSelection(ca
retOffset, caretOffset, SelectionHasNoDirection); } | 217 void cacheSelectionInResponseToSetValue(int caretOffset) { cacheSelection(ca
retOffset, caretOffset, SelectionHasNoDirection); } |
| 218 | 218 |
| 219 // For test purposes. | 219 // For test purposes. |
| 220 void selectColorInColorChooser(const Color&); | 220 void selectColorInColorChooser(const Color&); |
| 221 void endColorChooser(); | 221 void endColorChooser(); |
| 222 | 222 |
| 223 String defaultToolTip() const; | 223 String defaultToolTip() const; |
| 224 | 224 |
| 225 static const int maximumLength; | 225 static const int maximumLength; |
| 226 | 226 |
| 227 unsigned height() const; | 227 unsigned height() const; |
| 228 unsigned width() const; | 228 unsigned width() const; |
| 229 void setHeight(unsigned); | 229 void setHeight(unsigned); |
| 230 void setWidth(unsigned); | 230 void setWidth(unsigned); |
| 231 | 231 |
| 232 virtual void blur() override final; | 232 void blur() final; |
| 233 void defaultBlur(); | 233 void defaultBlur(); |
| 234 | 234 |
| 235 virtual const AtomicString& name() const override final; | 235 const AtomicString& name() const final; |
| 236 | 236 |
| 237 void beginEditing(); | 237 void beginEditing(); |
| 238 void endEditing(); | 238 void endEditing(); |
| 239 | 239 |
| 240 static Vector<FileChooserFileInfo> filesFromFileInputFormControlState(const
FormControlState&); | 240 static Vector<FileChooserFileInfo> filesFromFileInputFormControlState(const
FormControlState&); |
| 241 | 241 |
| 242 virtual bool matchesReadOnlyPseudoClass() const override final; | 242 bool matchesReadOnlyPseudoClass() const final; |
| 243 virtual bool matchesReadWritePseudoClass() const override final; | 243 bool matchesReadWritePseudoClass() const final; |
| 244 virtual void setRangeText(const String& replacement, ExceptionState&) overri
de final; | 244 void setRangeText(const String& replacement, ExceptionState&) final; |
| 245 virtual void setRangeText(const String& replacement, unsigned start, unsigne
d end, const String& selectionMode, ExceptionState&) override final; | 245 void setRangeText(const String& replacement, unsigned start, unsigned end, c
onst String& selectionMode, ExceptionState&) final; |
| 246 | 246 |
| 247 HTMLImageLoader* imageLoader() const { return m_imageLoader.get(); } | 247 HTMLImageLoader* imageLoader() const { return m_imageLoader.get(); } |
| 248 HTMLImageLoader& ensureImageLoader(); | 248 HTMLImageLoader& ensureImageLoader(); |
| 249 | 249 |
| 250 bool setupDateTimeChooserParameters(DateTimeChooserParameters&); | 250 bool setupDateTimeChooserParameters(DateTimeChooserParameters&); |
| 251 | 251 |
| 252 bool supportsInputModeAttribute() const; | 252 bool supportsInputModeAttribute() const; |
| 253 | 253 |
| 254 void setShouldRevealPassword(bool value); | 254 void setShouldRevealPassword(bool value); |
| 255 bool shouldRevealPassword() const { return m_shouldRevealPassword; } | 255 bool shouldRevealPassword() const { return m_shouldRevealPassword; } |
| 256 AXObject* popupRootAXObject(); | 256 AXObject* popupRootAXObject(); |
| 257 virtual void didNotifySubtreeInsertionsToDocument() override; | 257 void didNotifySubtreeInsertionsToDocument() override; |
| 258 | 258 |
| 259 virtual void ensureFallbackContent(); | 259 virtual void ensureFallbackContent(); |
| 260 virtual void ensurePrimaryContent(); | 260 virtual void ensurePrimaryContent(); |
| 261 bool hasFallbackContent() const; | 261 bool hasFallbackContent() const; |
| 262 protected: | 262 protected: |
| 263 HTMLInputElement(Document&, HTMLFormElement*, bool createdByParser); | 263 HTMLInputElement(Document&, HTMLFormElement*, bool createdByParser); |
| 264 | 264 |
| 265 virtual void defaultEventHandler(Event*) override; | 265 void defaultEventHandler(Event*) override; |
| 266 | 266 |
| 267 private: | 267 private: |
| 268 enum AutoCompleteSetting { Uninitialized, On, Off }; | 268 enum AutoCompleteSetting { Uninitialized, On, Off }; |
| 269 | 269 |
| 270 virtual void didAddUserAgentShadowRoot(ShadowRoot&) override final; | 270 void didAddUserAgentShadowRoot(ShadowRoot&) final; |
| 271 virtual void willAddFirstOpenShadowRoot() override final; | 271 void willAddFirstOpenShadowRoot() final; |
| 272 | 272 |
| 273 virtual void willChangeForm() override final; | 273 void willChangeForm() final; |
| 274 virtual void didChangeForm() override final; | 274 void didChangeForm() final; |
| 275 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; | 275 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 276 virtual void removedFrom(ContainerNode*) override final; | 276 void removedFrom(ContainerNode*) final; |
| 277 virtual void didMoveToNewDocument(Document& oldDocument) override final; | 277 void didMoveToNewDocument(Document& oldDocument) final; |
| 278 virtual void removeAllEventListeners() override final; | 278 void removeAllEventListeners() final; |
| 279 | 279 |
| 280 virtual bool hasCustomFocusLogic() const override final; | 280 bool hasCustomFocusLogic() const final; |
| 281 virtual bool isKeyboardFocusable() const override final; | 281 bool isKeyboardFocusable() const final; |
| 282 virtual bool shouldShowFocusRingOnMouseFocus() const override final; | 282 bool shouldShowFocusRingOnMouseFocus() const final; |
| 283 virtual bool isEnumeratable() const override final; | 283 bool isEnumeratable() const final; |
| 284 virtual bool isInteractiveContent() const override final; | 284 bool isInteractiveContent() const final; |
| 285 virtual bool supportLabels() const override final; | 285 bool supportLabels() const final; |
| 286 | 286 |
| 287 virtual bool isTextFormControl() const override final { return isTextField()
; } | 287 bool isTextFormControl() const final { return isTextField(); } |
| 288 | 288 |
| 289 virtual bool canTriggerImplicitSubmission() const override final { return is
TextField(); } | 289 bool canTriggerImplicitSubmission() const final { return isTextField(); } |
| 290 | 290 |
| 291 virtual const AtomicString& formControlType() const override final; | 291 const AtomicString& formControlType() const final; |
| 292 | 292 |
| 293 virtual bool shouldSaveAndRestoreFormControlState() const override final; | 293 bool shouldSaveAndRestoreFormControlState() const final; |
| 294 virtual FormControlState saveFormControlState() const override final; | 294 FormControlState saveFormControlState() const final; |
| 295 virtual void restoreFormControlState(const FormControlState&) override final
; | 295 void restoreFormControlState(const FormControlState&) final; |
| 296 | 296 |
| 297 virtual bool canStartSelection() const override final; | 297 bool canStartSelection() const final; |
| 298 | 298 |
| 299 virtual void accessKeyAction(bool sendMouseEvents) override final; | 299 void accessKeyAction(bool sendMouseEvents) final; |
| 300 | 300 |
| 301 virtual void attributeWillChange(const QualifiedName&, const AtomicString& o
ldValue, const AtomicString& newValue) override; | 301 void attributeWillChange(const QualifiedName&, const AtomicString& oldValue,
const AtomicString& newValue) override; |
| 302 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; | 302 void parseAttribute(const QualifiedName&, const AtomicString&) override; |
| 303 virtual bool isPresentationAttribute(const QualifiedName&) const override fi
nal; | 303 bool isPresentationAttribute(const QualifiedName&) const final; |
| 304 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) override final; | 304 void collectStyleForPresentationAttribute(const QualifiedName&, const Atomic
String&, MutableStylePropertySet*) final; |
| 305 virtual void finishParsingChildren() override final; | 305 void finishParsingChildren() final; |
| 306 virtual void parserDidSetAttributes() override final; | 306 void parserDidSetAttributes() final; |
| 307 | 307 |
| 308 virtual void copyNonAttributePropertiesFromElement(const Element&) override
final; | 308 void copyNonAttributePropertiesFromElement(const Element&) final; |
| 309 | 309 |
| 310 virtual void attach(const AttachContext& = AttachContext()) override final; | 310 void attach(const AttachContext& = AttachContext()) final; |
| 311 | 311 |
| 312 virtual bool appendFormData(FormDataList&, bool) override final; | 312 bool appendFormData(FormDataList&, bool) final; |
| 313 virtual String resultForDialogSubmit() override final; | 313 String resultForDialogSubmit() final; |
| 314 | 314 |
| 315 virtual bool canBeSuccessfulSubmitButton() const override final; | 315 bool canBeSuccessfulSubmitButton() const final; |
| 316 | 316 |
| 317 virtual void resetImpl() override final; | 317 void resetImpl() final; |
| 318 virtual bool supportsAutofocus() const override final; | 318 bool supportsAutofocus() const final; |
| 319 | 319 |
| 320 virtual void* preDispatchEventHandler(Event*) override final; | 320 void* preDispatchEventHandler(Event*) final; |
| 321 virtual void postDispatchEventHandler(Event*, void* dataFromPreDispatch) ove
rride final; | 321 void postDispatchEventHandler(Event*, void* dataFromPreDispatch) final; |
| 322 | 322 |
| 323 virtual bool isURLAttribute(const Attribute&) const override final; | 323 bool isURLAttribute(const Attribute&) const final; |
| 324 virtual bool hasLegalLinkAttribute(const QualifiedName&) const override fina
l; | 324 bool hasLegalLinkAttribute(const QualifiedName&) const final; |
| 325 virtual const QualifiedName& subResourceAttributeName() const override final
; | 325 const QualifiedName& subResourceAttributeName() const final; |
| 326 virtual bool isInRange() const override final; | 326 bool isInRange() const final; |
| 327 virtual bool isOutOfRange() const override final; | 327 bool isOutOfRange() const final; |
| 328 | 328 |
| 329 bool tooLong(const String&, NeedsToCheckDirtyFlag) const; | 329 bool tooLong(const String&, NeedsToCheckDirtyFlag) const; |
| 330 bool tooShort(const String&, NeedsToCheckDirtyFlag) const; | 330 bool tooShort(const String&, NeedsToCheckDirtyFlag) const; |
| 331 | 331 |
| 332 virtual bool supportsPlaceholder() const override final; | 332 bool supportsPlaceholder() const final; |
| 333 virtual void updatePlaceholderText() override final; | 333 void updatePlaceholderText() final; |
| 334 virtual bool isEmptyValue() const override final { return innerEditorValue()
.isEmpty(); } | 334 bool isEmptyValue() const final { return innerEditorValue().isEmpty(); } |
| 335 virtual bool isEmptySuggestedValue() const override final { return suggested
Value().isEmpty(); } | 335 bool isEmptySuggestedValue() const final { return suggestedValue().isEmpty()
; } |
| 336 virtual void handleFocusEvent(Element* oldFocusedElement, WebFocusType) over
ride final; | 336 void handleFocusEvent(Element* oldFocusedElement, WebFocusType) final; |
| 337 virtual void handleBlurEvent() override final; | 337 void handleBlurEvent() final; |
| 338 virtual void dispatchFocusInEvent(const AtomicString& eventType, Element* ol
dFocusedElement, WebFocusType) override final; | 338 void dispatchFocusInEvent(const AtomicString& eventType, Element* oldFocused
Element, WebFocusType) final; |
| 339 virtual bool supportsAutocapitalize() const override final; | 339 bool supportsAutocapitalize() const final; |
| 340 virtual const AtomicString& defaultAutocapitalize() const override final; | 340 const AtomicString& defaultAutocapitalize() const final; |
| 341 | 341 |
| 342 virtual bool isOptionalFormControl() const override final { return !isRequir
edFormControl(); } | 342 bool isOptionalFormControl() const final { return !isRequiredFormControl();
} |
| 343 virtual bool isRequiredFormControl() const override final; | 343 bool isRequiredFormControl() const final; |
| 344 virtual bool recalcWillValidate() const override final; | 344 bool recalcWillValidate() const final; |
| 345 virtual void requiredAttributeChanged() override final; | 345 void requiredAttributeChanged() final; |
| 346 | 346 |
| 347 void updateTouchEventHandlerRegistry(); | 347 void updateTouchEventHandlerRegistry(); |
| 348 void initializeTypeInParsing(); | 348 void initializeTypeInParsing(); |
| 349 void updateType(); | 349 void updateType(); |
| 350 | 350 |
| 351 virtual void subtreeHasChanged() override final; | 351 void subtreeHasChanged() final; |
| 352 | 352 |
| 353 void setListAttributeTargetObserver(PassOwnPtrWillBeRawPtr<ListAttributeTarg
etObserver>); | 353 void setListAttributeTargetObserver(PassOwnPtrWillBeRawPtr<ListAttributeTarg
etObserver>); |
| 354 void resetListAttributeTargetObserver(); | 354 void resetListAttributeTargetObserver(); |
| 355 void parseMaxLengthAttribute(const AtomicString&); | 355 void parseMaxLengthAttribute(const AtomicString&); |
| 356 void parseMinLengthAttribute(const AtomicString&); | 356 void parseMinLengthAttribute(const AtomicString&); |
| 357 void updateValueIfNeeded(); | 357 void updateValueIfNeeded(); |
| 358 | 358 |
| 359 // Returns null if this isn't associated with any radio button group. | 359 // Returns null if this isn't associated with any radio button group. |
| 360 RadioButtonGroupScope* radioButtonGroupScope() const; | 360 RadioButtonGroupScope* radioButtonGroupScope() const; |
| 361 void addToRadioButtonGroup(); | 361 void addToRadioButtonGroup(); |
| 362 void removeFromRadioButtonGroup(); | 362 void removeFromRadioButtonGroup(); |
| 363 virtual PassRefPtr<ComputedStyle> customStyleForLayoutObject() override; | 363 PassRefPtr<ComputedStyle> customStyleForLayoutObject() override; |
| 364 | 364 |
| 365 virtual bool shouldDispatchFormControlChangeEvent(String&, String&) override
; | 365 bool shouldDispatchFormControlChangeEvent(String&, String&) override; |
| 366 | 366 |
| 367 AtomicString m_name; | 367 AtomicString m_name; |
| 368 String m_valueIfDirty; | 368 String m_valueIfDirty; |
| 369 String m_suggestedValue; | 369 String m_suggestedValue; |
| 370 int m_size; | 370 int m_size; |
| 371 int m_maxLength; | 371 int m_maxLength; |
| 372 int m_minLength; | 372 int m_minLength; |
| 373 short m_maxResults; | 373 short m_maxResults; |
| 374 unsigned m_isChecked : 1; | 374 unsigned m_isChecked : 1; |
| 375 unsigned m_reflectsCheckedAttribute : 1; | 375 unsigned m_reflectsCheckedAttribute : 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 389 // The ImageLoader must be owned by this element because the loader code ass
umes | 389 // The ImageLoader must be owned by this element because the loader code ass
umes |
| 390 // that it lives as long as its owning element lives. If we move the loader
into | 390 // that it lives as long as its owning element lives. If we move the loader
into |
| 391 // the ImageInput object we may delete the loader while this element lives o
n. | 391 // the ImageInput object we may delete the loader while this element lives o
n. |
| 392 OwnPtrWillBeMember<HTMLImageLoader> m_imageLoader; | 392 OwnPtrWillBeMember<HTMLImageLoader> m_imageLoader; |
| 393 OwnPtrWillBeMember<ListAttributeTargetObserver> m_listAttributeTargetObserve
r; | 393 OwnPtrWillBeMember<ListAttributeTargetObserver> m_listAttributeTargetObserve
r; |
| 394 }; | 394 }; |
| 395 | 395 |
| 396 } // namespace blink | 396 } // namespace blink |
| 397 | 397 |
| 398 #endif // HTMLInputElement_h | 398 #endif // HTMLInputElement_h |
| OLD | NEW |