[webkit-reviews] review granted: [Bug 214053] Remove use of live ranges from AXObject.h : [Attachment 403737] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 7 18:14:42 PDT 2020


Sam Weinig <sam at webkit.org> has granted Darin Adler <darin at apple.com>'s request
for review:
Bug 214053: Remove use of live ranges from AXObject.h
https://bugs.webkit.org/show_bug.cgi?id=214053

Attachment 403737: Patch

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




--- Comment #4 from Sam Weinig <sam at webkit.org> ---
Comment on attachment 403737
  --> https://bugs.webkit.org/attachment.cgi?id=403737
Patch

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

> Source/WebCore/accessibility/AXObjectCache.cpp:2046
> +static bool setRangeStartOrEndWithCharacterOffset(SimpleRange& range, const
CharacterOffset& characterOffset, bool isStart)

Not new, but the bool isStart here makes the call below harder to follow than
needed.  Could do with an enum replacement. (This bool isStart is common
pattern in this file).

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:2813
> +    int length = AXObjectCache::lengthForRange(SimpleRange { *range });
>      return length < 0 ? 0 : length;

std::max(0, length);?


More information about the webkit-reviews mailing list