Created attachment 236074 [details]
Comment on attachment 236074 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=236074&action=review
> + No change in functionality.
But we removed the snapping from localSelectionRect. That seems like a bug fix, not a “no change” refactoring fix.
> + LayoutUnit selectionTop = root().selectionTopAdjustedForPrecedingBlock();
No need to put this into local variable any more if we are only using this once.
Created attachment 236101 [details]
Comment on attachment 236101 [details]
Clearing flags on attachment: 236101
Committed r172145: <http://trac.webkit.org/changeset/172145>
All reviewed patches have been landed. Closing bug.
Re-opened since this is blocked by bug 135657
Marked this bug resolved fix following the landing of <https://trac.webkit.org/changeset/223699> (bug #178232) that shared more code between InlineTextBox::paintSelection() and InlineTextBox::localSelectionRect(). The pointer to reference conversions that were made in the proposed patch for this bug (attachment #236101 [details]) were made in <https://trac.webkit.org/changeset/174876> (bug #137858).
For completeness, we cannot remove the logic to compute the enclosing integral rectangle from localSelectionRect() as the patch on this bug (attachment #236101 [details]) attempted to do because localSelectionRect() is used to answer calls to the Web API Element.getClientRects() and other objects that override localSelectionRect() return the enclosing integral rectangle of the selection. For consistency we would need to update all overrides of localSelectionRect(), including the override in InlineTextBox. Bug #138913 is tracking this effort.