[webkit-reviews] review denied: [Bug 174394] Expose way to set values of classified form controls as {Legacy WebKit, WebKit} SPI : [Attachment 321517] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 22 01:20:54 PDT 2017


Ryosuke Niwa <rniwa at webkit.org> has denied Frederik Riedel <riedel at apple.com>'s
request for review:
Bug 174394: Expose way to set values of classified form controls as {Legacy
WebKit, WebKit} SPI
https://bugs.webkit.org/show_bug.cgi?id=174394

Attachment 321517: Patch

https://bugs.webkit.org/attachment.cgi?id=321517&action=review




--- Comment #47 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 321517
  --> https://bugs.webkit.org/attachment.cgi?id=321517
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=321517&action=review

> Source/WebCore/editing/ios/AutofillElements.cpp:94
> +		       autofillElements.m_password = &inputElement;
> +		       autofillElements.m_username = previousElement;
> +		       return autofillElements;

Can we just add a private constructor which takes username & password elements,
and do AutofillElements(previousElement, &inputElement) here?

> Source/WebCore/editing/ios/AutofillElements.cpp:108
> +		       autofillElements.m_password = nextElement;
> +		       autofillElements.m_username = &inputElement;
> +		       return autofillElements;

Ditto.

> Source/WebCore/editing/ios/AutofillElements.cpp:122
> +	       if (!previousElement && !nextElement) {
> +		   autofillElements.m_password = &inputElement;
> +		   return autofillElements;
> +	       }

Ditto.

> Source/WebCore/editing/ios/AutofillElements.cpp:137
> +    if (this->m_username) {
> +	   this->m_username->setValueForUser(username);
> +	   this->m_username->setAutoFilled();
> +    }
> +    if (this->m_password) {
> +	   this->m_password->setValueForUser(password);
> +	   this->m_password->setAutoFilled();
> +    }

Nit: We don't use "this->" in WebKit. Please remove.

> Source/WebKit/Shared/AssistedNodeInformation.h:113
> +    bool acceptsAutofilledLoginCredentials;

Please add an initializer: { false }. r- because of this and iOS build
failures.

> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:2814
> +    if (is<HTMLInputElement>(m_assistedNode.get())) {

Use is<HTMLInputElement>(*m_assistedNode) instead.

> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:2815
> +	   RefPtr<Element> assistendElement =
&downcast<Element>(*m_assistedNode);

Use Ref<Element> instead since we know m_assistedNode is not null at this
point.


More information about the webkit-reviews mailing list