| Index: third_party/WebKit/Source/core/html/HTMLInputElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
|
| index 8553d6649dabbadf67a57644d169ce794d31f13f..29cd41801be6120de9ec677271e2c62a893c8f11 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
|
| @@ -81,16 +81,15 @@ namespace blink {
|
| using namespace HTMLNames;
|
|
|
| class ListAttributeTargetObserver : public IdTargetObserver {
|
| - USING_FAST_MALLOC_WILL_BE_REMOVED(ListAttributeTargetObserver);
|
| public:
|
| - static PassOwnPtrWillBeRawPtr<ListAttributeTargetObserver> create(const AtomicString& id, HTMLInputElement*);
|
| + static RawPtr<ListAttributeTargetObserver> create(const AtomicString& id, HTMLInputElement*);
|
| DECLARE_VIRTUAL_TRACE();
|
| void idTargetChanged() override;
|
|
|
| private:
|
| ListAttributeTargetObserver(const AtomicString& id, HTMLInputElement*);
|
|
|
| - RawPtrWillBeMember<HTMLInputElement> m_element;
|
| + Member<HTMLInputElement> m_element;
|
| };
|
|
|
| // FIXME: According to HTML4, the length attribute's value can be arbitrarily
|
| @@ -131,9 +130,9 @@ HTMLInputElement::HTMLInputElement(Document& document, HTMLFormElement* form, bo
|
| setHasCustomStyleCallbacks();
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<HTMLInputElement> HTMLInputElement::create(Document& document, HTMLFormElement* form, bool createdByParser)
|
| +RawPtr<HTMLInputElement> HTMLInputElement::create(Document& document, HTMLFormElement* form, bool createdByParser)
|
| {
|
| - RefPtrWillBeRawPtr<HTMLInputElement> inputElement = adoptRefWillBeNoop(new HTMLInputElement(document, form, createdByParser));
|
| + RawPtr<HTMLInputElement> inputElement = new HTMLInputElement(document, form, createdByParser);
|
| if (!createdByParser)
|
| inputElement->ensureUserAgentShadowRoot();
|
| return inputElement.release();
|
| @@ -470,7 +469,7 @@ void HTMLInputElement::updateType()
|
| if (m_inputType->formControlType() == newTypeName)
|
| return;
|
|
|
| - RefPtrWillBeRawPtr<InputType> newType = InputType::create(*this, newTypeName);
|
| + RawPtr<InputType> newType = InputType::create(*this, newTypeName);
|
| removeFromRadioButtonGroup();
|
|
|
| bool didStoreValue = m_inputType->storesValueSeparateFromAttribute();
|
| @@ -921,7 +920,7 @@ void HTMLInputElement::setChecked(bool nowChecked, TextFieldEventBehavior eventB
|
| if (checked() == nowChecked)
|
| return;
|
|
|
| - RefPtrWillBeRawPtr<HTMLInputElement> protector(this);
|
| + RawPtr<HTMLInputElement> protector(this);
|
| m_reflectsCheckedAttribute = false;
|
| m_isChecked = nowChecked;
|
|
|
| @@ -1078,7 +1077,7 @@ void HTMLInputElement::setValue(const String& value, TextFieldEventBehavior even
|
| if (!m_inputType->canSetValue(value))
|
| return;
|
|
|
| - RefPtrWillBeRawPtr<HTMLInputElement> protector(this);
|
| + RawPtr<HTMLInputElement> protector(this);
|
| EventQueueScope scope;
|
| String sanitizedValue = sanitizeValue(value);
|
| bool valueChanged = sanitizedValue != this->value();
|
| @@ -1187,11 +1186,11 @@ void* HTMLInputElement::preDispatchEventHandler(Event* event)
|
|
|
| void HTMLInputElement::postDispatchEventHandler(Event* event, void* dataFromPreDispatch)
|
| {
|
| - OwnPtrWillBeRawPtr<ClickHandlingState> state = adoptPtrWillBeNoop(static_cast<ClickHandlingState*>(dataFromPreDispatch));
|
| + RawPtr<ClickHandlingState> state = static_cast<ClickHandlingState*>(dataFromPreDispatch);
|
| if (!state)
|
| return;
|
| // m_inputTypeView could be freed if the type attribute is modified through a change event handler.
|
| - RefPtrWillBeRawPtr<InputTypeView> protect(m_inputTypeView.get());
|
| + RawPtr<InputTypeView> protect(m_inputTypeView.get());
|
| m_inputTypeView->didDispatchClick(event, *state);
|
| }
|
|
|
| @@ -1251,13 +1250,13 @@ void HTMLInputElement::defaultEventHandler(Event* evt)
|
| if (m_inputTypeView->shouldSubmitImplicitly(evt)) {
|
| // FIXME: Remove type check.
|
| if (type() == InputTypeNames::search)
|
| - document().postTask(BLINK_FROM_HERE, createSameThreadTask(&HTMLInputElement::onSearch, PassRefPtrWillBeRawPtr<HTMLInputElement>(this)));
|
| + document().postTask(BLINK_FROM_HERE, createSameThreadTask(&HTMLInputElement::onSearch, RawPtr<HTMLInputElement>(this)));
|
| // Form submission finishes editing, just as loss of focus does.
|
| // If there was a change, send the event now.
|
| if (wasChangedSinceLastFormControlChangeEvent())
|
| dispatchFormControlChangeEvent();
|
|
|
| - RefPtrWillBeRawPtr<HTMLFormElement> formForSubmission = m_inputTypeView->formForSubmission();
|
| + RawPtr<HTMLFormElement> formForSubmission = m_inputTypeView->formForSubmission();
|
| // Form may never have been present, or may have been destroyed by code responding to the change event.
|
| if (formForSubmission)
|
| formForSubmission->submitImplicitly(evt, canTriggerImplicitSubmission());
|
| @@ -1611,7 +1610,7 @@ bool HTMLInputElement::hasValidDataListOptions() const
|
| HTMLDataListElement* dataList = this->dataList();
|
| if (!dataList)
|
| return false;
|
| - RefPtrWillBeRawPtr<HTMLDataListOptionsCollection> options = dataList->options();
|
| + RawPtr<HTMLDataListOptionsCollection> options = dataList->options();
|
| for (unsigned i = 0; HTMLOptionElement* option = options->item(i); ++i) {
|
| if (isValidValue(option->value()))
|
| return true;
|
| @@ -1619,7 +1618,7 @@ bool HTMLInputElement::hasValidDataListOptions() const
|
| return false;
|
| }
|
|
|
| -void HTMLInputElement::setListAttributeTargetObserver(PassOwnPtrWillBeRawPtr<ListAttributeTargetObserver> newObserver)
|
| +void HTMLInputElement::setListAttributeTargetObserver(RawPtr<ListAttributeTargetObserver> newObserver)
|
| {
|
| if (m_listAttributeTargetObserver)
|
| m_listAttributeTargetObserver->unregister();
|
| @@ -1805,9 +1804,9 @@ void HTMLInputElement::setWidth(unsigned width)
|
| setUnsignedIntegralAttribute(widthAttr, width);
|
| }
|
|
|
| -PassOwnPtrWillBeRawPtr<ListAttributeTargetObserver> ListAttributeTargetObserver::create(const AtomicString& id, HTMLInputElement* element)
|
| +RawPtr<ListAttributeTargetObserver> ListAttributeTargetObserver::create(const AtomicString& id, HTMLInputElement* element)
|
| {
|
| - return adoptPtrWillBeNoop(new ListAttributeTargetObserver(id, element));
|
| + return new ListAttributeTargetObserver(id, element);
|
| }
|
|
|
| ListAttributeTargetObserver::ListAttributeTargetObserver(const AtomicString& id, HTMLInputElement* element)
|
| @@ -1878,7 +1877,7 @@ bool HTMLInputElement::setupDateTimeChooserParameters(DateTimeChooserParameters&
|
| parameters.doubleValue = m_inputType->valueAsDouble();
|
| parameters.isAnchorElementRTL = m_inputType->computedTextDirection() == RTL;
|
| if (HTMLDataListElement* dataList = this->dataList()) {
|
| - RefPtrWillBeRawPtr<HTMLDataListOptionsCollection> options = dataList->options();
|
| + RawPtr<HTMLDataListOptionsCollection> options = dataList->options();
|
| for (unsigned i = 0; HTMLOptionElement* option = options->item(i); ++i) {
|
| if (!isValidValue(option->value()))
|
| continue;
|
|
|