[Webkit-unassigned] [Bug 153116] Need ability to specify alternate image for AutoFill button in input fields

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 24 15:02:03 PST 2016


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
 Attachment #269302|review?                     |review-
              Flags|                            |

--- Comment #16 from Darin Adler <darin at apple.com> ---
Comment on attachment 269302
  --> https://bugs.webkit.org/attachment.cgi?id=269302
Patch v2

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

review- because it’s not OK to make every HTMLInputElement so much bigger; should be easy to fix, though

> Source/WebCore/html/HTMLInputElement.h:436
> +    AutoFillButtonType m_autoFillButtonType;

This is only one bit. It’s not great that it’s going to make every HTMLInputElement 32 bits bigger (or more). Notice that all the fields around this are using bitfields to keep things cheap. Not OK to make every input element so much bigger. I think this should be:

    unsigned m_autoFillButtonType : 1; // AutoFillButtonType

To match how we do things in the rest of the class.

We could also consider combining this with

> Source/WebCore/html/HTMLTextFormControlElement.h:37
> +enum class AutoFillButtonType : uint32_t { Credentials, AddressBook };

32 bits just to hold one bit? How about 8 bits?

> Source/WebCore/html/InputType.h:268
> +    virtual void updateAutoFillButton(AutoFillButtonType);

We should not add this argument to this function. The members functions in TextFieldInputType can get the type from the element directly; it doesn’t need to be passed in.

> Source/WebCore/html/TextFieldInputType.cpp:644
> -void TextFieldInputType::updateAutoFillButton()
> +void TextFieldInputType::updateAutoFillButton(AutoFillButtonType autoFillButtonType)
>  {
>      if (shouldDrawAutoFillButton()) {
>          if (!m_container)
>              createContainer();
>          if (!m_autoFillButton)
> -            createAutoFillButton();
> +            createAutoFillButton(autoFillButtonType);

This looks wrong. If the auto fill button type has changed, I don’t see code to cause the old one to be destroyed and a new one of the correct type to be created.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160124/b988bb18/attachment-0001.html>

More information about the webkit-unassigned mailing list