[webkit-reviews] review granted: [Bug 232764] [iOS] Mail compose becomes unresponsive after pasting in text and attempting to type : [Attachment 443437] Rebase on trunk
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Nov 5 14:54:33 PDT 2021
Geoffrey Garen <ggaren at apple.com> has granted Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 232764: [iOS] Mail compose becomes unresponsive after pasting in text and
attempting to type
https://bugs.webkit.org/show_bug.cgi?id=232764
Attachment 443437: Rebase on trunk
https://bugs.webkit.org/attachment.cgi?id=443437&action=review
--- Comment #3 from Geoffrey Garen <ggaren at apple.com> ---
Comment on attachment 443437
--> https://bugs.webkit.org/attachment.cgi?id=443437
Rebase on trunk
View in context: https://bugs.webkit.org/attachment.cgi?id=443437&action=review
r=me
> Source/WebCore/editing/VisibleUnits.cpp:1511
> + case TextGranularity::SentenceGranularity: {
> + auto boundaryInDirection = useDownstream ? endOfSentence :
startOfSentence;
> + boundary = vp == boundaryInDirection(vp) ? vp :
boundaryInDirection(useDownstream ? previousSentencePosition(vp) :
nextSentencePosition(vp));
> break;
> + }
To my taste, this would read better as
If (vp == boundaryInDirection(vp)) {
boundary = vp;
break;
}
auto position = useDownstream ? previousSentencePosition(vp) :
nextSentencePosition(vp);
boundary = boundaryInDirection(position);
break;
More granular to step in a debugger and diff in a source control tool this way
too.
More information about the webkit-reviews
mailing list