[webkit-reviews] review granted: [Bug 236795] Fix for assert crash in AccessibilityRenderObject::visiblePositionForIndex. : [Attachment 452867] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 22 08:50:50 PST 2022
Darin Adler <darin at apple.com> has granted Andres Gonzalez
<andresg_22 at apple.com>'s request for review:
Bug 236795: Fix for assert crash in
AccessibilityRenderObject::visiblePositionForIndex.
https://bugs.webkit.org/show_bug.cgi?id=236795
Attachment 452867: Patch
https://bugs.webkit.org/attachment.cgi?id=452867&action=review
--- Comment #14 from Darin Adler <darin at apple.com> ---
Comment on attachment 452867
--> https://bugs.webkit.org/attachment.cgi?id=452867
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=452867&action=review
> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:2109
> + auto& textControl =
downcast<RenderTextControl>(*m_renderer).textFormControlElement();
> + return textControl.visiblePositionForIndex(std::clamp(index, 0,
static_cast<int>(textControl.value().length())));
I suggest naming this just "element" or "control". One-word local names are the
best, unless you need multiple words for clarity.
More information about the webkit-reviews
mailing list