[webkit-reviews] review granted: [Bug 180721] is<HTMLTextFormControlElement> reports the input type. : [Attachment 329162] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 12 14:55:28 PST 2017


Ryosuke Niwa <rniwa at webkit.org> has granted zalan <zalan at apple.com>'s request
for review:
Bug 180721: is<HTMLTextFormControlElement> reports the input type.
https://bugs.webkit.org/show_bug.cgi?id=180721

Attachment 329162: Patch

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




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

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

> Source/WebCore/editing/Editor.cpp:247
> +    if (is<Element>(event->target()) &&
downcast<Element>(*event->target()).isTextField()) {
>	   auto& target =
downcast<HTMLTextFormControlElement>(*event->target());

Here, we should probably check both
is<HTMLTextFormControlElement>(event->target()) and
downcast<Element>(*event->target()).isTextField()
so that downcast & is match.

> Source/WebCore/editing/Editor.cpp:1724
> -    if (is<HTMLTextFormControlElement>(focusedElement)) {
> +    if (focusedElement && focusedElement->isTextField()) {

Ditto.


More information about the webkit-reviews mailing list