WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
138731
Move DataDetectors scanning code to WebCore
https://bugs.webkit.org/show_bug.cgi?id=138731
Summary
Move DataDetectors scanning code to WebCore
Tim Horton
Reported
2014-11-14 01:57:29 PST
Move DataDetectors scanning code to WebCore
Attachments
Patch
(26.07 KB, patch)
2014-11-14 01:58 PST
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Patch
(53.15 KB, patch)
2014-11-14 13:29 PST
,
Tim Horton
andersca
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2014-11-14 01:58:05 PST
Created
attachment 241566
[details]
Patch
Tim Horton
Comment 2
2014-11-14 01:59:08 PST
This would be a prime candidate (one of many) for some kind of small Mac-only "WebKitKit" in between WebCore and WebKit{2}...
mitz
Comment 3
2014-11-14 07:13:18 PST
Comment on
attachment 241566
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=241566&action=review
> Source/WebCore/ChangeLog:22 > + * platform/mac/DataDetection.h: Copied from Source/WebCore/editing/DictionaryLookup.h. > + * platform/mac/DataDetection.mm: Added. > + (WebCore::DataDetection::detectItemAroundHitTestResult): > + Moved from WebKit2.
platform/ is not the right place for this code, which depends on non-platform WebCore concepts such as the DOM and the render tree.
Anders Carlsson
Comment 4
2014-11-14 07:51:15 PST
(In reply to
comment #3
)
> Comment on
attachment 241566
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=241566&action=review
> > > Source/WebCore/ChangeLog:22 > > + * platform/mac/DataDetection.h: Copied from Source/WebCore/editing/DictionaryLookup.h. > > + * platform/mac/DataDetection.mm: Added. > > + (WebCore::DataDetection::detectItemAroundHitTestResult): > > + Moved from WebKit2. > > platform/ is not the right place for this code, which depends on > non-platform WebCore concepts such as the DOM and the render tree.
Agreed, maybe we can move it to page/mac/?
Simon Fraser (smfr)
Comment 5
2014-11-14 08:05:54 PST
Comment on
attachment 241566
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=241566&action=review
> Source/WebKit2/ChangeLog:9 > + Move DataDetectors scanning code to WebCore, so that both WebKits can use it.
Is this a good long-term direction? Why not have WK2 just link with WK1?
Anders Carlsson
Comment 6
2014-11-14 08:24:19 PST
(In reply to
comment #5
)
> Comment on
attachment 241566
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=241566&action=review
> > > Source/WebKit2/ChangeLog:9 > > + Move DataDetectors scanning code to WebCore, so that both WebKits can use it. > > Is this a good long-term direction? Why not have WK2 just link with WK1?
It already does. 😑
Tim Horton
Comment 7
2014-11-14 08:35:00 PST
Oh yes, of course, totally wrong place. (In reply to
comment #5
)
> Comment on
attachment 241566
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=241566&action=review
> > > Source/WebKit2/ChangeLog:9 > > + Move DataDetectors scanning code to WebCore, so that both WebKits can use it. > > Is this a good long-term direction? Why not have WK2 just link with WK1?
Ideal long term answer, in my book, is
https://bugs.webkit.org/show_bug.cgi?id=138731
#c, not hiding things in WebKit legacy.
mitz
Comment 8
2014-11-14 08:44:11 PST
I don’t think there’s anuthing wrong, conceptually or practically, with this code being in WebCore.
Geoffrey Garen
Comment 9
2014-11-14 10:48:51 PST
> Agreed, maybe we can move it to page/mac/?
Or editing, perhaps? Editing already handles related "scan the text and possibly display something" tasks like dictionary lookup, alternative text presentation, linkification, and so on.
Tim Horton
Comment 10
2014-11-14 13:29:05 PST
Created
attachment 241621
[details]
Patch
Tim Horton
Comment 11
2014-11-14 13:36:36 PST
http://trac.webkit.org/changeset/176137
David Kilzer (:ddkilzer)
Comment 12
2014-11-15 10:58:43 PST
(In reply to
comment #11
)
>
http://trac.webkit.org/changeset/176137
iOS build fix committed as
r176156
: <
http://trac.webkit.org/changeset/176156
>
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