[webkit-reviews] review granted: [Bug 215070] Remove some member functions of Range and many calls to createLiveRange : [Attachment 405809] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Aug 2 17:37:10 PDT 2020


Sam Weinig <sam at webkit.org> has granted Darin Adler <darin at apple.com>'s request
for review:
Bug 215070: Remove some member functions of Range and many calls to
createLiveRange
https://bugs.webkit.org/show_bug.cgi?id=215070

Attachment 405809: Patch

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




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

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

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:2342
> +// FIXME: No reason for this to be a method instead of a function.
> +- (NSRange)_convertToNSRange:(const SimpleRange&)range

Reminds me we should investigate using direct methods / members at some point
(https://reviews.llvm.org/D69991 / https://nshipster.com/direct/).

> Source/WebCore/page/TextIndicator.cpp:306
> +	   textRects = RenderObject::collectSelectionRects(range).map([&](const
auto& rect) -> FloatRect {

Is the explicit return type needed here?

> Source/WebCore/rendering/RenderObject.h:551
> +    WEBCORE_EXPORT static Vector<SelectionRect> collectSelectionRects(const
SimpleRange&);
> +    WEBCORE_EXPORT static Vector<SelectionRect>
collectSelectionRectsWithoutUnionInteriorLines(const SimpleRange&);

I'm a little sad to be adding more to RenderObject, but given that there is
already collectSelectionRects functions here, it seems ok. Do they use the fact
that they are static member functions in anyway?


More information about the webkit-reviews mailing list