RESOLVED FIXED 214882
Improve range idioms and other changes to prepare the way for more reduction in live range use
https://bugs.webkit.org/show_bug.cgi?id=214882
Summary Improve range idioms and other changes to prepare the way for more reduction ...
Darin Adler
Reported 2020-07-28 10:00:54 PDT
Improve range idioms and other changes to prepare the way for more reduction in live range use
Attachments
Patch (108.16 KB, patch)
2020-07-28 15:58 PDT, Darin Adler
no flags
Patch (109.18 KB, patch)
2020-07-28 16:48 PDT, Darin Adler
no flags
Darin Adler
Comment 1 2020-07-28 15:58:36 PDT Comment hidden (obsolete)
Darin Adler
Comment 2 2020-07-28 16:48:07 PDT
Sam Weinig
Comment 3 2020-07-28 19:17:04 PDT
Comment on attachment 405427 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405427&action=review > Source/WebCore/accessibility/AccessibilityObject.cpp:1181 > VisiblePositionRange AccessibilityObject::lineRangeForPosition(const VisiblePosition& visiblePosition) const > { > - VisiblePosition startPosition = startOfLine(visiblePosition); > - VisiblePosition endPosition = endOfLine(visiblePosition); > - return VisiblePositionRange(startPosition, endPosition); > + return { startOfLine(visiblePosition), endOfLine(visiblePosition) }; Some of these functions don't seem like they belong as member functions on AccessibilityObject, given how general they are, and that they don't seem to be using any state or functions of AccessibilityObject. In another change (not this one), it might be a good idea to move some of these to VisibileUnit.h or similar.
Darin Adler
Comment 4 2020-07-29 09:27:38 PDT
Comment on attachment 405427 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405427&action=review >> Source/WebCore/accessibility/AccessibilityObject.cpp:1181 >> + return { startOfLine(visiblePosition), endOfLine(visiblePosition) }; > > Some of these functions don't seem like they belong as member functions on AccessibilityObject, given how general they are, and that they don't seem to be using any state or functions of AccessibilityObject. In another change (not this one), it might be a good idea to move some of these to VisibileUnit.h or similar. Agreed. I’ll try to come back to that later. In some cases the functions look universal but have some sort of subtle dependency on the accessibility object, so it’s a non-trivial project to disentangle.
EWS
Comment 5 2020-07-29 09:36:46 PDT
Committed r265044: <https://trac.webkit.org/changeset/265044> All reviewed patches have been landed. Closing bug and clearing flags on attachment 405427 [details].
Radar WebKit Bug Importer
Comment 6 2020-07-29 09:37:18 PDT
Andres Gonzalez
Comment 7 2020-08-15 10:16:25 PDT
*** Bug 215521 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.