[webkit-reviews] review granted: [Bug 208906] Change all return values in TextIterator header from live ranges to SimpleRange : [Attachment 393207] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Mar 14 03:05:42 PDT 2020


Antti Koivisto <koivisto at iki.fi> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 208906: Change all return values in TextIterator header from live ranges to
SimpleRange
https://bugs.webkit.org/show_bug.cgi?id=208906

Attachment 393207: Patch

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




--- Comment #3 from Antti Koivisto <koivisto at iki.fi> ---
Comment on attachment 393207
  --> https://bugs.webkit.org/attachment.cgi?id=393207
Patch

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

> Source/WebCore/accessibility/AXObjectCache.cpp:2667
> +    Node& node = it.atEnd() ? searchRange->startContainer() :
it.range().start.container.get();

auto

> Source/WebCore/editing/TextIterator.cpp:1494
> -    Ref<Range> r = m_underlyingIterator.range();
> +    SimpleRange range = m_underlyingIterator.range();

auto

> Source/WebCore/editing/TextIterator.cpp:1499
> +	       Node& node = range.start.container;

auto

> Source/WebCore/editing/TextIterator.cpp:2508
> +    for (TextIterator iterator { createLiveRange(range).ptr(), behavior };
!iterator.atEnd(); iterator.advance()) {

I suppose the plan to also make TextIterator take SimpleRange at some point?

> Source/WebCore/editing/VisibleUnits.cpp:638
> +    Node& node = it.atEnd() ? searchRange->startContainer() :
it.range().start.container.get();

auto

> Source/WebCore/editing/VisibleUnits.cpp:649
> +    return VisiblePosition(createLegacyEditingPosition(charIt.range().end),
DOWNSTREAM);

Could just use { }

> Source/WebCore/editing/VisibleUnits.cpp:685
> +	   SimpleRange characterRange = charIt.range();

auto


More information about the webkit-reviews mailing list