Bug 156467

Summary: Unify selectionStartEnd() methods.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: simon.fraser
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description zalan 2016-04-11 10:41:18 PDT
see https://bugs.webkit.org/show_bug.cgi?id=156448#c5

> Source/WebCore/rendering/InlineTextBox.cpp:607
> +    renderer().selectionStartEnd(selectionStart, selectionEnd);
Peculiar that this uses two out arguments and doesn’t even have get in its name. Should fix that.
> Source/WebCore/rendering/InlineTextBox.h:123
> +    std::pair<int, int> selectionStartEnd() const;
In other cases like this we sometimes use structures with names for the members rather than using a tuple. Sure would be nice to get rid of some those pairs of local variables and arguments using the same structure.

void SelectionSubtreeRoot::selectionStartEndPositions(int& startPos, int& endPos) const
void RenderObject::selectionStartEnd(int& spos, int& epos) const
std::pair<int, int> InlineTextBox::selectionStartEnd() const