RESOLVED FIXED Bug 85758
[Chromium] Move clipboard to Platform.h
https://bugs.webkit.org/show_bug.cgi?id=85758
Summary [Chromium] Move clipboard to Platform.h
Mark Pilgrim (Google)
Reported 2012-05-06 19:00:05 PDT
[Chromium] Move clipboard to Platform.h
Attachments
Patch (4.22 KB, patch)
2012-05-06 19:00 PDT, Mark Pilgrim (Google)
no flags
Patch (15.84 KB, patch)
2012-05-07 07:19 PDT, Mark Pilgrim (Google)
no flags
WIP Patch (14.47 KB, patch)
2012-05-07 12:03 PDT, Mark Pilgrim (Google)
no flags
Patch (29.68 KB, patch)
2012-05-09 11:36 PDT, Mark Pilgrim (Google)
no flags
Patch (34.37 KB, patch)
2012-05-09 14:37 PDT, Mark Pilgrim (Google)
no flags
Mark Pilgrim (Google)
Comment 1 2012-05-06 19:00:37 PDT
WebKit Review Bot
Comment 2 2012-05-06 19:02:57 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Adam Barth
Comment 3 2012-05-06 20:44:59 PDT
Comment on attachment 140449 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140449&action=review > Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h:-54 > -class WebClipboard; You can probably guess what I'm going to say at this point. :) WebClipboard.h and its dependencies are already in Source/WebKit/chromium/public/platform, so they should be easy to move at the same time.
Mark Pilgrim (Google)
Comment 4 2012-05-07 07:19:07 PDT
WebKit Review Bot
Comment 5 2012-05-07 07:25:14 PDT
Comment on attachment 140525 [details] Patch Attachment 140525 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/12647056
Adam Barth
Comment 6 2012-05-07 10:20:51 PDT
Comment on attachment 140525 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140525&action=review > Source/Platform/chromium/public/WebClipboard.h:42 > +class WebDragData; > +class WebImage; Please move these dependencies too. The idea is that there shouldn't be any dependencies from the Platform layer to the WebKit layer. (Dependencies from WebKit to Platform are fine.) Here's a diagram that's intended to illustrate that relation: https://docs.google.com/drawings/d/1GJXd6XSLEehvuqA7Xbvbz0OH6Znnr2iTijihjrEY0ts/edit
Adam Barth
Comment 7 2012-05-07 10:22:52 PDT
To avoid breaking the compile when moving these APIs around, we've been introducing "forwarding" headers like the following: http://trac.webkit.org/browser/trunk/Source/WebKit/chromium/public/platform/WebURL.h Once we've finished factoring the Platform API out of the WebKit API, we'll update all the users of the API to use the new header locations and remove these forwarding headers.
Mark Pilgrim (Google)
Comment 8 2012-05-07 12:03:39 PDT
Created attachment 140566 [details] WIP Patch
Mark Pilgrim (Google)
Comment 9 2012-05-07 12:05:17 PDT
Still WIP.
Mark Pilgrim (Google)
Comment 10 2012-05-09 11:36:01 PDT
Mark Pilgrim (Google)
Comment 11 2012-05-09 11:36:37 PDT
(In reply to comment #6) > (From update of attachment 140525 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=140525&action=review > > > Source/Platform/chromium/public/WebClipboard.h:42 > > +class WebDragData; > > +class WebImage; > > Please move these dependencies too. Done in latest patch.
James Robinson
Comment 12 2012-05-09 11:41:48 PDT
Comment on attachment 140986 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140986&action=review > Source/Platform/chromium/public/Platform.h:67 > // Must return non-null. > + virtual WebClipboard* clipboard() { return 0; } > + > + // Must return non-null. > virtual WebMimeRegistry* mimeRegistry() { return 0; } these comments are kind of weird with the default impls > Source/Platform/chromium/public/WebImage.h:40 > +#elif WEBKIT_USING_CG > +typedef struct CGImage* CGImageRef; > +#endif this isn't necessarily something you have to do, but we should delete all the WEBKIT_USING_CG code from chromium code ASAPly
Eric Seidel (no email)
Comment 13 2012-05-09 11:46:17 PDT
(In reply to comment #12) > (From update of attachment 140986 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=140986&action=review > > Source/Platform/chromium/public/WebImage.h:40 > > +#elif WEBKIT_USING_CG > > +typedef struct CGImage* CGImageRef; > > +#endif > > this isn't necessarily something you have to do, but we should delete all the WEBKIT_USING_CG code from chromium code ASAPly When I was looking at removing BUILDING_ON_LEOPARD code the other day, I looked at removing CHROMIUM branches from various bits of cg, mac and cocoa files, but it was't clear to me what parts were still in use by Chromium and which weren't.
James Robinson
Comment 14 2012-05-09 11:50:18 PDT
(In reply to comment #13) > (In reply to comment #12) > > (From update of attachment 140986 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=140986&action=review > > > Source/Platform/chromium/public/WebImage.h:40 > > > +#elif WEBKIT_USING_CG > > > +typedef struct CGImage* CGImageRef; > > > +#endif > > > > this isn't necessarily something you have to do, but we should delete all the WEBKIT_USING_CG code from chromium code ASAPly > > When I was looking at removing BUILDING_ON_LEOPARD code the other day, I looked at removing CHROMIUM branches from various bits of cg, mac and cocoa files, but it was't clear to me what parts were still in use by Chromium and which weren't. That's slightly different. We never use CoreGraphics as the backend for GraphicsContext in Chromium, but we do still use some CG stuff in various bits of system integration (like theming code, iirc). My understanding is that WEBKIT_USING_CG means "Using CoreGraphics as the raster backend", which we never set, but that may not be the meaning of all the code in cg/ mac/ cocoa/.
WebKit Review Bot
Comment 15 2012-05-09 12:34:05 PDT
Comment on attachment 140986 [details] Patch Attachment 140986 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/12665003
Mark Pilgrim (Google)
Comment 16 2012-05-09 12:37:50 PDT
(In reply to comment #15) > (From update of attachment 140986 [details]) > Attachment 140986 [details] did not pass chromium-ews (chromium-xvfb): > Output: http://queues.webkit.org/results/12665003 Is this because I removed WebClipboard.h from Source/WebKit/chromium/WebKit.gyp?
Mark Pilgrim (Google)
Comment 17 2012-05-09 12:38:37 PDT
...and if so, why didn't I catch this in my local build? What am I doing differently from the bots?
Adam Barth
Comment 18 2012-05-09 14:04:07 PDT
Looks like you forgot to svn add Source/Platform/chromium/public/WebClipboard.h
Mark Pilgrim (Google)
Comment 19 2012-05-09 14:33:58 PDT
(In reply to comment #18) > Looks like you forgot to svn add Source/Platform/chromium/public/WebClipboard.h Grr.
Mark Pilgrim (Google)
Comment 20 2012-05-09 14:37:39 PDT
Mark Pilgrim (Google)
Comment 21 2012-05-09 14:41:12 PDT
Filed bug bug 86018 for removing code behind WEBKIT_USING_CG
Adam Barth
Comment 22 2012-05-09 14:53:53 PDT
Comment on attachment 141016 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=141016&action=review > Source/Platform/chromium/public/Platform.h:67 > // Must return non-null. > + virtual WebClipboard* clipboard() { return 0; } > + > + // Must return non-null. > virtual WebMimeRegistry* mimeRegistry() { return 0; } These comments do seem odd next to these default implementations, but I think its ok. Can we use ASSERT_NOT_REACHED() in API headers? I suspect we're not able to. > Source/WebKit/chromium/src/DragClientImpl.cpp:43 > > +#include <public/WebDragData.h> There's no need for this blank line. > Source/WebKit/chromium/src/WebDragData.cpp:42 > +#include <public/WebDragData.h> This header should have been left just after config. You probably got a style warning, but that's a bug in the style checker.
WebKit Review Bot
Comment 23 2012-05-09 15:50:08 PDT
Comment on attachment 141016 [details] Patch Clearing flags on attachment: 141016 Committed r116566: <http://trac.webkit.org/changeset/116566>
WebKit Review Bot
Comment 24 2012-05-09 15:50:14 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.