[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
Wed Jan 20 10:01:47 PST 2016


--- Comment #14 from Daniel Bates <dbates at webkit.org> ---
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

Thank you Zhuo Li for updating the patch. It looks good to me though a WebKit2 owner will need to formally review it. I noticed some very minor nits.

> Source/WebCore/html/TextFieldInputType.cpp:621
> +    ASSERT(autoFillButtonType == AutoFillButtonType::Credentials || autoFillButtonType == AutoFillButtonType::AddressBook);
> +    if (autoFillButtonType != AutoFillButtonType::Credentials && autoFillButtonType != AutoFillButtonType::AddressBook)
> +        return;

Please remove this code as it is unnecessary to runtime assert the button type because our use of the switch statement below and AutoFillButtonType being a enum class implies that a compile-time failure will occur if a enumerator value is added to-/renamed/removed from- AutoFillButtonType and the switch (below) is not updated.

> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:49
> +    return WebCore::AutoFillButtonType::Credentials;

Are these lines necessary? I thought the supported versions of clang/gcc were smart enough to realize that a switch block for an enum/enum class handles all possible code paths and hence the proposed added code is unreachable.

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/20160120/392af3f5/attachment.html>

More information about the webkit-unassigned mailing list