WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
201144
Don't compute upconverted characters twice in buildQuery() in DataDetection.mm
https://bugs.webkit.org/show_bug.cgi?id=201144
Summary
Don't compute upconverted characters twice in buildQuery() in DataDetection.mm
David Kilzer (:ddkilzer)
Reported
2019-08-26 12:26:21 PDT
Currently upconverted characters (and string length) are computed twice in buildQuery() in DataDetection.mm: for (TextIterator iterator(contextRange); !iterator.atEnd(); iterator.advance(), iteratorCount++) { size_t currentTextLength = iterator.text().length(); [...] const UniChar* currentCharPtr = iterator.text().upconvertedCharacters(); [...] RetainPtr<CFStringRef> currentText = adoptCF(CFStringCreateWithCharacters(kCFAllocatorDefault, iterator.text().upconvertedCharacters(), iterator.text().length())); [...] } <
https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/editing/cocoa/DataDetection.mm#L365
> There's no need to compute these twice, so we can extract the common code. <
rdar://problem/54689399
>
Attachments
Patch v1
(11.13 KB, patch)
2019-08-26 12:35 PDT
,
David Kilzer (:ddkilzer)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2019-08-26 12:35:22 PDT
Created
attachment 377260
[details]
Patch v1
Brent Fulgham
Comment 2
2019-08-26 12:43:41 PDT
Comment on
attachment 377260
[details]
Patch v1 r=me
WebKit Commit Bot
Comment 3
2019-08-26 13:26:56 PDT
Comment on
attachment 377260
[details]
Patch v1 Clearing flags on attachment: 377260 Committed
r249115
: <
https://trac.webkit.org/changeset/249115
>
WebKit Commit Bot
Comment 4
2019-08-26 13:26:58 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug