[webkit-reviews] review granted: [Bug 206093] AX: Unable to use AccessibilityObject::replaceTextInRange to insert text at first time when the text fields are empty : [Attachment 387877] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 15 18:43:39 PST 2020


Ryosuke Niwa <rniwa at webkit.org> has granted Canhai Chen
<canhai_chen at apple.com>'s request for review:
Bug 206093: AX: Unable to use AccessibilityObject::replaceTextInRange to insert
text at first time when the text fields are empty
https://bugs.webkit.org/show_bug.cgi?id=206093

Attachment 387877: Patch

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




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

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

> Source/WebCore/ChangeLog:9
> +	   When we are trying to insert text in an empty text field with (0, 0)
range, the frame selection will create a new VisibleSelection in
FrameSelection::setSelectedRange, and the container node that this new
VisibleSelection returns is the parent node of the text field element, which
could be a HTMLDivElement or HTMLBodyElement. Because the container node is not
editable, it failed to insert text in Editor::replaceSelectionWithText later.

Can we hard-wrap this line into multiple lines?
This is a really long single line comment.

> Source/WebCore/accessibility/AccessibilityObject.cpp:1193
> +    if (range.isNull() && !textLength)
> +	   return nullptr;

Can we check that the backing element for this object is
HTMLTextFormControlElement
to minimize the risk of this code change causing other kinds of issues?


More information about the webkit-reviews mailing list