| 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) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 * rights reserved. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
| 8 * Copyright (C) 2010 Google Inc. All rights reserved. | 9 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 10 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. |
| 11 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 12 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| 11 * | 13 * |
| 12 * This library is free software; you can redistribute it and/or | 14 * This library is free software; you can redistribute it and/or |
| 13 * modify it under the terms of the GNU Library General Public | 15 * modify it under the terms of the GNU Library General Public |
| 14 * License as published by the Free Software Foundation; either | 16 * License as published by the Free Software Foundation; either |
| 15 * version 2 of the License, or (at your option) any later version. | 17 * version 2 of the License, or (at your option) any later version. |
| 16 * | 18 * |
| 17 * This library is distributed in the hope that it will be useful, | 19 * This library is distributed in the hope that it will be useful, |
| 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 m_autocomplete(Uninitialized), | 115 m_autocomplete(Uninitialized), |
| 114 m_hasNonEmptyList(false), | 116 m_hasNonEmptyList(false), |
| 115 m_stateRestored(false), | 117 m_stateRestored(false), |
| 116 m_parsingInProgress(createdByParser), | 118 m_parsingInProgress(createdByParser), |
| 117 m_valueAttributeWasUpdatedAfterParsing(false), | 119 m_valueAttributeWasUpdatedAfterParsing(false), |
| 118 m_canReceiveDroppedFiles(false), | 120 m_canReceiveDroppedFiles(false), |
| 119 m_shouldRevealPassword(false), | 121 m_shouldRevealPassword(false), |
| 120 m_needsToUpdateViewValue(true), | 122 m_needsToUpdateViewValue(true), |
| 121 m_isPlaceholderVisible(false), | 123 m_isPlaceholderVisible(false), |
| 122 // |m_inputType| is lazily created when constructed by the parser to avoid | 124 // |m_inputType| is lazily created when constructed by the parser to avoid |
| 123 // constructing unnecessarily a text inputType and its shadow subtree, jus
t | 125 // constructing unnecessarily a text inputType and its shadow subtree, |
| 124 // to destroy them when the |type| attribute gets set by the parser to | 126 // just to destroy them when the |type| attribute gets set by the parser |
| 125 // something else than 'text'. | 127 // to something else than 'text'. |
| 126 m_inputType(createdByParser ? nullptr : InputType::createText(*this)), | 128 m_inputType(createdByParser ? nullptr : InputType::createText(*this)), |
| 127 m_inputTypeView(m_inputType ? m_inputType->createView() : nullptr) { | 129 m_inputTypeView(m_inputType ? m_inputType->createView() : nullptr) { |
| 128 setHasCustomStyleCallbacks(); | 130 setHasCustomStyleCallbacks(); |
| 129 } | 131 } |
| 130 | 132 |
| 131 HTMLInputElement* HTMLInputElement::create(Document& document, | 133 HTMLInputElement* HTMLInputElement::create(Document& document, |
| 132 HTMLFormElement* form, | 134 HTMLFormElement* form, |
| 133 bool createdByParser) { | 135 bool createdByParser) { |
| 134 HTMLInputElement* inputElement = | 136 HTMLInputElement* inputElement = |
| 135 new HTMLInputElement(document, form, createdByParser); | 137 new HTMLInputElement(document, form, createdByParser); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 break; | 314 break; |
| 313 case SelectionBehaviorOnFocus::None: | 315 case SelectionBehaviorOnFocus::None: |
| 314 return; | 316 return; |
| 315 } | 317 } |
| 316 // TODO(tkent): scrollRectToVisible is a workaround of a bug of | 318 // TODO(tkent): scrollRectToVisible is a workaround of a bug of |
| 317 // FrameSelection::revealSelection(). It doesn't scroll correctly in a | 319 // FrameSelection::revealSelection(). It doesn't scroll correctly in a |
| 318 // case of RangeSelection. crbug.com/443061. | 320 // case of RangeSelection. crbug.com/443061. |
| 319 if (layoutObject()) | 321 if (layoutObject()) |
| 320 layoutObject()->scrollRectToVisible(boundingBox()); | 322 layoutObject()->scrollRectToVisible(boundingBox()); |
| 321 if (document().frame()) { | 323 if (document().frame()) { |
| 322 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStyleshee
ts | 324 // TODO(xiaochengh): The use of |
| 323 // needs to be audited. See http://crbug.com/590369 for more details. | 325 // updateStyleAndLayoutIgnorePendingStylesheets needs to be audited. See |
| 326 // http://crbug.com/590369 for more details. |
| 324 document().updateStyleAndLayoutIgnorePendingStylesheets(); | 327 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 325 | 328 |
| 326 document().frame()->selection().revealSelection(); | 329 document().frame()->selection().revealSelection(); |
| 327 } | 330 } |
| 328 } else { | 331 } else { |
| 329 HTMLTextFormControlElement::updateFocusAppearance(selectionBehavior); | 332 HTMLTextFormControlElement::updateFocusAppearance(selectionBehavior); |
| 330 } | 333 } |
| 331 } | 334 } |
| 332 | 335 |
| 333 void HTMLInputElement::beginEditing() { | 336 void HTMLInputElement::beginEditing() { |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 | 476 |
| 474 setNeedsValidityCheck(); | 477 setNeedsValidityCheck(); |
| 475 if ((couldBeSuccessfulSubmitButton || canBeSuccessfulSubmitButton()) && | 478 if ((couldBeSuccessfulSubmitButton || canBeSuccessfulSubmitButton()) && |
| 476 formOwner() && isConnected()) | 479 formOwner() && isConnected()) |
| 477 formOwner()->invalidateDefaultButtonStyle(); | 480 formOwner()->invalidateDefaultButtonStyle(); |
| 478 notifyFormStateChanged(); | 481 notifyFormStateChanged(); |
| 479 } | 482 } |
| 480 | 483 |
| 481 void HTMLInputElement::subtreeHasChanged() { | 484 void HTMLInputElement::subtreeHasChanged() { |
| 482 m_inputTypeView->subtreeHasChanged(); | 485 m_inputTypeView->subtreeHasChanged(); |
| 483 // When typing in an input field, childrenChanged is not called, so we need to
force the directionality check. | 486 // When typing in an input field, childrenChanged is not called, so we need to |
| 487 // force the directionality check. |
| 484 calculateAndAdjustDirectionality(); | 488 calculateAndAdjustDirectionality(); |
| 485 } | 489 } |
| 486 | 490 |
| 487 const AtomicString& HTMLInputElement::formControlType() const { | 491 const AtomicString& HTMLInputElement::formControlType() const { |
| 488 return m_inputType->formControlType(); | 492 return m_inputType->formControlType(); |
| 489 } | 493 } |
| 490 | 494 |
| 491 bool HTMLInputElement::shouldSaveAndRestoreFormControlState() const { | 495 bool HTMLInputElement::shouldSaveAndRestoreFormControlState() const { |
| 492 if (!m_inputType->shouldSaveAndRestoreFormControlState()) | 496 if (!m_inputType->shouldSaveAndRestoreFormControlState()) |
| 493 return false; | 497 return false; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 m_autocomplete = Off; | 679 m_autocomplete = Off; |
| 676 } else { | 680 } else { |
| 677 if (value.isEmpty()) | 681 if (value.isEmpty()) |
| 678 m_autocomplete = Uninitialized; | 682 m_autocomplete = Uninitialized; |
| 679 else | 683 else |
| 680 m_autocomplete = On; | 684 m_autocomplete = On; |
| 681 } | 685 } |
| 682 } else if (name == typeAttr) { | 686 } else if (name == typeAttr) { |
| 683 updateType(); | 687 updateType(); |
| 684 } else if (name == valueAttr) { | 688 } else if (name == valueAttr) { |
| 685 // We only need to setChanged if the form is looking at the default value ri
ght now. | 689 // We only need to setChanged if the form is looking at the default value |
| 690 // right now. |
| 686 if (!hasDirtyValue()) { | 691 if (!hasDirtyValue()) { |
| 687 updatePlaceholderVisibility(); | 692 updatePlaceholderVisibility(); |
| 688 setNeedsStyleRecalc( | 693 setNeedsStyleRecalc( |
| 689 SubtreeStyleChange, | 694 SubtreeStyleChange, |
| 690 StyleChangeReasonForTracing::fromAttribute(valueAttr)); | 695 StyleChangeReasonForTracing::fromAttribute(valueAttr)); |
| 691 } | 696 } |
| 692 m_needsToUpdateViewValue = true; | 697 m_needsToUpdateViewValue = true; |
| 693 setNeedsValidityCheck(); | 698 setNeedsValidityCheck(); |
| 694 m_valueAttributeWasUpdatedAfterParsing = !m_parsingInProgress; | 699 m_valueAttributeWasUpdatedAfterParsing = !m_parsingInProgress; |
| 695 m_inputType->warnIfValueIsInvalidAndElementIsVisible(value); | 700 m_inputType->warnIfValueIsInvalidAndElementIsVisible(value); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 720 if (m_size != oldSize && layoutObject()) | 725 if (m_size != oldSize && layoutObject()) |
| 721 layoutObject()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( | 726 layoutObject()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( |
| 722 LayoutInvalidationReason::AttributeChanged); | 727 LayoutInvalidationReason::AttributeChanged); |
| 723 } else if (name == altAttr) { | 728 } else if (name == altAttr) { |
| 724 m_inputTypeView->altAttributeChanged(); | 729 m_inputTypeView->altAttributeChanged(); |
| 725 } else if (name == srcAttr) { | 730 } else if (name == srcAttr) { |
| 726 m_inputTypeView->srcAttributeChanged(); | 731 m_inputTypeView->srcAttributeChanged(); |
| 727 } else if (name == usemapAttr || name == accesskeyAttr) { | 732 } else if (name == usemapAttr || name == accesskeyAttr) { |
| 728 // FIXME: ignore for the moment | 733 // FIXME: ignore for the moment |
| 729 } else if (name == onsearchAttr) { | 734 } else if (name == onsearchAttr) { |
| 730 // Search field and slider attributes all just cause updateFromElement to be
called through style recalcing. | 735 // Search field and slider attributes all just cause updateFromElement to be |
| 736 // called through style recalcing. |
| 731 setAttributeEventListener( | 737 setAttributeEventListener( |
| 732 EventTypeNames::search, | 738 EventTypeNames::search, |
| 733 createAttributeEventListener(this, name, value, eventParameterName())); | 739 createAttributeEventListener(this, name, value, eventParameterName())); |
| 734 } else if (name == incrementalAttr) { | 740 } else if (name == incrementalAttr) { |
| 735 UseCounter::count(document(), UseCounter::IncrementalAttribute); | 741 UseCounter::count(document(), UseCounter::IncrementalAttribute); |
| 736 } else if (name == minAttr) { | 742 } else if (name == minAttr) { |
| 737 m_inputTypeView->minOrMaxAttributeChanged(); | 743 m_inputTypeView->minOrMaxAttributeChanged(); |
| 738 m_inputType->sanitizeValueInResponseToMinOrMaxAttributeChange(); | 744 m_inputType->sanitizeValueInResponseToMinOrMaxAttributeChange(); |
| 739 setNeedsValidityCheck(); | 745 setNeedsValidityCheck(); |
| 740 UseCounter::count(document(), UseCounter::MinAttribute); | 746 UseCounter::count(document(), UseCounter::MinAttribute); |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 m_inputType->warnIfValueIsInvalidAndElementIsVisible(value); | 1041 m_inputType->warnIfValueIsInvalidAndElementIsVisible(value); |
| 1036 if (!m_inputType->canSetValue(value)) | 1042 if (!m_inputType->canSetValue(value)) |
| 1037 return; | 1043 return; |
| 1038 | 1044 |
| 1039 EventQueueScope scope; | 1045 EventQueueScope scope; |
| 1040 String sanitizedValue = sanitizeValue(value); | 1046 String sanitizedValue = sanitizeValue(value); |
| 1041 bool valueChanged = sanitizedValue != this->value(); | 1047 bool valueChanged = sanitizedValue != this->value(); |
| 1042 | 1048 |
| 1043 setLastChangeWasNotUserEdit(); | 1049 setLastChangeWasNotUserEdit(); |
| 1044 m_needsToUpdateViewValue = true; | 1050 m_needsToUpdateViewValue = true; |
| 1045 m_suggestedValue = | 1051 // Prevent TextFieldInputType::setValue from using the suggested value. |
| 1046 String(); // Prevent TextFieldInputType::setValue from using the suggeste
d value. | 1052 m_suggestedValue = String(); |
| 1047 | 1053 |
| 1048 m_inputType->setValue(sanitizedValue, valueChanged, eventBehavior); | 1054 m_inputType->setValue(sanitizedValue, valueChanged, eventBehavior); |
| 1049 m_inputTypeView->didSetValue(sanitizedValue, valueChanged); | 1055 m_inputTypeView->didSetValue(sanitizedValue, valueChanged); |
| 1050 | 1056 |
| 1051 if (valueChanged && eventBehavior == DispatchNoEvent) | 1057 if (valueChanged && eventBehavior == DispatchNoEvent) |
| 1052 setTextAsOfLastFormControlChangeEvent( | 1058 setTextAsOfLastFormControlChangeEvent( |
| 1053 sanitizedValue.isNull() ? defaultValue() : sanitizedValue); | 1059 sanitizedValue.isNull() ? defaultValue() : sanitizedValue); |
| 1054 | 1060 |
| 1055 if (!valueChanged) | 1061 if (!valueChanged) |
| 1056 return; | 1062 return; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1119 | 1125 |
| 1120 // Renderer and our event handler are responsible for sanitizing values. | 1126 // Renderer and our event handler are responsible for sanitizing values. |
| 1121 DCHECK(value == m_inputType->sanitizeUserInputValue(value) || | 1127 DCHECK(value == m_inputType->sanitizeUserInputValue(value) || |
| 1122 m_inputType->sanitizeUserInputValue(value).isEmpty()); | 1128 m_inputType->sanitizeUserInputValue(value).isEmpty()); |
| 1123 | 1129 |
| 1124 DCHECK(!value.isNull()); | 1130 DCHECK(!value.isNull()); |
| 1125 m_valueIfDirty = value; | 1131 m_valueIfDirty = value; |
| 1126 m_hasDirtyValue = true; | 1132 m_hasDirtyValue = true; |
| 1127 m_needsToUpdateViewValue = false; | 1133 m_needsToUpdateViewValue = false; |
| 1128 | 1134 |
| 1129 // Input event is fired by the Node::defaultEventHandler for editable controls
. | 1135 // Input event is fired by the Node::defaultEventHandler for editable |
| 1136 // controls. |
| 1130 if (!isTextField()) | 1137 if (!isTextField()) |
| 1131 dispatchInputEvent(); | 1138 dispatchInputEvent(); |
| 1132 notifyFormStateChanged(); | 1139 notifyFormStateChanged(); |
| 1133 | 1140 |
| 1134 setNeedsValidityCheck(); | 1141 setNeedsValidityCheck(); |
| 1135 | 1142 |
| 1136 // Clear autofill flag (and yellow background) on user edit. | 1143 // Clear autofill flag (and yellow background) on user edit. |
| 1137 setAutofilled(false); | 1144 setAutofilled(false); |
| 1138 } | 1145 } |
| 1139 | 1146 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 1170 if (evt->defaultHandled()) | 1177 if (evt->defaultHandled()) |
| 1171 return; | 1178 return; |
| 1172 } | 1179 } |
| 1173 | 1180 |
| 1174 if (evt->isKeyboardEvent() && evt->type() == EventTypeNames::keydown) { | 1181 if (evt->isKeyboardEvent() && evt->type() == EventTypeNames::keydown) { |
| 1175 m_inputTypeView->handleKeydownEvent(toKeyboardEvent(evt)); | 1182 m_inputTypeView->handleKeydownEvent(toKeyboardEvent(evt)); |
| 1176 if (evt->defaultHandled()) | 1183 if (evt->defaultHandled()) |
| 1177 return; | 1184 return; |
| 1178 } | 1185 } |
| 1179 | 1186 |
| 1180 // Call the base event handler before any of our own event handling for almost
all events in text fields. | 1187 // Call the base event handler before any of our own event handling for almost |
| 1181 // Makes editing keyboard handling take precedence over the keydown and keypre
ss handling in this function. | 1188 // all events in text fields. Makes editing keyboard handling take precedence |
| 1189 // over the keydown and keypress handling in this function. |
| 1182 bool callBaseClassEarly = | 1190 bool callBaseClassEarly = |
| 1183 isTextField() && (evt->type() == EventTypeNames::keydown || | 1191 isTextField() && (evt->type() == EventTypeNames::keydown || |
| 1184 evt->type() == EventTypeNames::keypress); | 1192 evt->type() == EventTypeNames::keypress); |
| 1185 if (callBaseClassEarly) { | 1193 if (callBaseClassEarly) { |
| 1186 HTMLTextFormControlElement::defaultEventHandler(evt); | 1194 HTMLTextFormControlElement::defaultEventHandler(evt); |
| 1187 if (evt->defaultHandled()) | 1195 if (evt->defaultHandled()) |
| 1188 return; | 1196 return; |
| 1189 } | 1197 } |
| 1190 | 1198 |
| 1191 // DOMActivate events cause the input to be "activated" - in the case of image
and submit inputs, this means | 1199 // DOMActivate events cause the input to be "activated" - in the case of image |
| 1192 // actually submitting the form. For reset inputs, the form is reset. These ev
ents are sent when the user clicks | 1200 // and submit inputs, this means actually submitting the form. For reset |
| 1193 // on the element, or presses enter while it is the active element. JavaScript
code wishing to activate the element | 1201 // inputs, the form is reset. These events are sent when the user clicks on |
| 1194 // must dispatch a DOMActivate event - a click event will not do the job. | 1202 // the element, or presses enter while it is the active element. JavaScript |
| 1203 // code wishing to activate the element must dispatch a DOMActivate event - a |
| 1204 // click event will not do the job. |
| 1195 if (evt->type() == EventTypeNames::DOMActivate) { | 1205 if (evt->type() == EventTypeNames::DOMActivate) { |
| 1196 m_inputTypeView->handleDOMActivateEvent(evt); | 1206 m_inputTypeView->handleDOMActivateEvent(evt); |
| 1197 if (evt->defaultHandled()) | 1207 if (evt->defaultHandled()) |
| 1198 return; | 1208 return; |
| 1199 } | 1209 } |
| 1200 | 1210 |
| 1201 // Use key press event here since sending simulated mouse events | 1211 // Use key press event here since sending simulated mouse events |
| 1202 // on key down blocks the proper sending of the key press event. | 1212 // on key down blocks the proper sending of the key press event. |
| 1203 if (evt->isKeyboardEvent() && evt->type() == EventTypeNames::keypress) { | 1213 if (evt->isKeyboardEvent() && evt->type() == EventTypeNames::keypress) { |
| 1204 m_inputTypeView->handleKeypressEvent(toKeyboardEvent(evt)); | 1214 m_inputTypeView->handleKeypressEvent(toKeyboardEvent(evt)); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1217 if (type() == InputTypeNames::search) | 1227 if (type() == InputTypeNames::search) |
| 1218 document().postTask(BLINK_FROM_HERE, | 1228 document().postTask(BLINK_FROM_HERE, |
| 1219 createSameThreadTask(&HTMLInputElement::onSearch, | 1229 createSameThreadTask(&HTMLInputElement::onSearch, |
| 1220 wrapPersistent(this))); | 1230 wrapPersistent(this))); |
| 1221 // Form submission finishes editing, just as loss of focus does. | 1231 // Form submission finishes editing, just as loss of focus does. |
| 1222 // If there was a change, send the event now. | 1232 // If there was a change, send the event now. |
| 1223 if (wasChangedSinceLastFormControlChangeEvent()) | 1233 if (wasChangedSinceLastFormControlChangeEvent()) |
| 1224 dispatchFormControlChangeEvent(); | 1234 dispatchFormControlChangeEvent(); |
| 1225 | 1235 |
| 1226 HTMLFormElement* formForSubmission = m_inputTypeView->formForSubmission(); | 1236 HTMLFormElement* formForSubmission = m_inputTypeView->formForSubmission(); |
| 1227 // Form may never have been present, or may have been destroyed by code resp
onding to the change event. | 1237 // Form may never have been present, or may have been destroyed by code |
| 1238 // responding to the change event. |
| 1228 if (formForSubmission) | 1239 if (formForSubmission) |
| 1229 formForSubmission->submitImplicitly(evt, canTriggerImplicitSubmission()); | 1240 formForSubmission->submitImplicitly(evt, canTriggerImplicitSubmission()); |
| 1230 | 1241 |
| 1231 evt->setDefaultHandled(); | 1242 evt->setDefaultHandled(); |
| 1232 return; | 1243 return; |
| 1233 } | 1244 } |
| 1234 | 1245 |
| 1235 if (evt->isBeforeTextInsertedEvent()) | 1246 if (evt->isBeforeTextInsertedEvent()) |
| 1236 m_inputTypeView->handleBeforeTextInsertedEvent( | 1247 m_inputTypeView->handleBeforeTextInsertedEvent( |
| 1237 static_cast<BeforeTextInsertedEvent*>(evt)); | 1248 static_cast<BeforeTextInsertedEvent*>(evt)); |
| 1238 | 1249 |
| 1239 if (evt->isMouseEvent() && evt->type() == EventTypeNames::mousedown) { | 1250 if (evt->isMouseEvent() && evt->type() == EventTypeNames::mousedown) { |
| 1240 m_inputTypeView->handleMouseDownEvent(toMouseEvent(evt)); | 1251 m_inputTypeView->handleMouseDownEvent(toMouseEvent(evt)); |
| 1241 if (evt->defaultHandled()) | 1252 if (evt->defaultHandled()) |
| 1242 return; | 1253 return; |
| 1243 } | 1254 } |
| 1244 | 1255 |
| 1245 m_inputTypeView->forwardEvent(evt); | 1256 m_inputTypeView->forwardEvent(evt); |
| 1246 | 1257 |
| 1247 if (!callBaseClassEarly && !evt->defaultHandled()) | 1258 if (!callBaseClassEarly && !evt->defaultHandled()) |
| 1248 HTMLTextFormControlElement::defaultEventHandler(evt); | 1259 HTMLTextFormControlElement::defaultEventHandler(evt); |
| 1249 } | 1260 } |
| 1250 | 1261 |
| 1251 bool HTMLInputElement::willRespondToMouseClickEvents() { | 1262 bool HTMLInputElement::willRespondToMouseClickEvents() { |
| 1252 // FIXME: Consider implementing willRespondToMouseClickEvents() in InputType i
f more accurate results are necessary. | 1263 // FIXME: Consider implementing willRespondToMouseClickEvents() in InputType |
| 1264 // if more accurate results are necessary. |
| 1253 if (!isDisabledFormControl()) | 1265 if (!isDisabledFormControl()) |
| 1254 return true; | 1266 return true; |
| 1255 | 1267 |
| 1256 return HTMLTextFormControlElement::willRespondToMouseClickEvents(); | 1268 return HTMLTextFormControlElement::willRespondToMouseClickEvents(); |
| 1257 } | 1269 } |
| 1258 | 1270 |
| 1259 bool HTMLInputElement::isURLAttribute(const Attribute& attribute) const { | 1271 bool HTMLInputElement::isURLAttribute(const Attribute& attribute) const { |
| 1260 return attribute.name() == srcAttr || attribute.name() == formactionAttr || | 1272 return attribute.name() == srcAttr || attribute.name() == formactionAttr || |
| 1261 HTMLTextFormControlElement::isURLAttribute(attribute); | 1273 HTMLTextFormControlElement::isURLAttribute(attribute); |
| 1262 } | 1274 } |
| (...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1901 | 1913 |
| 1902 bool HTMLInputElement::hasFallbackContent() const { | 1914 bool HTMLInputElement::hasFallbackContent() const { |
| 1903 return m_inputTypeView->hasFallbackContent(); | 1915 return m_inputTypeView->hasFallbackContent(); |
| 1904 } | 1916 } |
| 1905 | 1917 |
| 1906 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) { | 1918 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) { |
| 1907 return m_inputType->setFilesFromPaths(paths); | 1919 return m_inputType->setFilesFromPaths(paths); |
| 1908 } | 1920 } |
| 1909 | 1921 |
| 1910 } // namespace blink | 1922 } // namespace blink |
| OLD | NEW |