RESOLVED FIXED 135631
Cleanup InlineTextBox::paintSelection and ::localSelectionRect.
https://bugs.webkit.org/show_bug.cgi?id=135631
Summary Cleanup InlineTextBox::paintSelection and ::localSelectionRect.
zalan
Reported 2014-08-05 18:40:25 PDT
SSIA.
Attachments
Patch (6.87 KB, patch)
2014-08-05 19:29 PDT, zalan
no flags
Patch (6.79 KB, patch)
2014-08-06 07:25 PDT, zalan
no flags
zalan
Comment 1 2014-08-05 19:29:28 PDT
Darin Adler
Comment 2 2014-08-05 20:45:35 PDT
Comment on attachment 236074 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=236074&action=review > Source/WebCore/ChangeLog:8 > + No change in functionality. But we removed the snapping from localSelectionRect. That seems like a bug fix, not a “no change” refactoring fix. > Source/WebCore/rendering/InlineTextBox.cpp:740 > + LayoutUnit selectionTop = root().selectionTopAdjustedForPrecedingBlock(); No need to put this into local variable any more if we are only using this once.
zalan
Comment 3 2014-08-06 07:25:31 PDT
WebKit Commit Bot
Comment 4 2014-08-06 08:04:30 PDT
Comment on attachment 236101 [details] Patch Clearing flags on attachment: 236101 Committed r172145: <http://trac.webkit.org/changeset/172145>
WebKit Commit Bot
Comment 5 2014-08-06 08:04:36 PDT
All reviewed patches have been landed. Closing bug.
WebKit Commit Bot
Comment 6 2014-08-06 10:41:14 PDT
Re-opened since this is blocked by bug 135657
Daniel Bates
Comment 7 2017-10-19 12:36:35 PDT
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.
Radar WebKit Bug Importer
Comment 8 2017-11-15 13:11:13 PST
Note You need to log in before you can comment on or make changes to this bug.