WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
95040
[chromium] Add CompositorSupport interface for constructing compositor classes
https://bugs.webkit.org/show_bug.cgi?id=95040
Summary
[chromium] Add CompositorSupport interface for constructing compositor classes
James Robinson
Reported
2012-08-26 21:36:41 PDT
[chromium] Add CompositorSupport interface for constructing compositor classes
Attachments
Patch
(28.88 KB, patch)
2012-08-26 21:44 PDT
,
James Robinson
no flags
Details
Formatted Diff
Diff
Patch
(32.20 KB, patch)
2012-08-27 13:53 PDT
,
James Robinson
no flags
Details
Formatted Diff
Diff
Remove default WebPassOwnPtr constructor, it's not useful without a copy ctor
(32.14 KB, patch)
2012-08-27 14:45 PDT
,
James Robinson
no flags
Details
Formatted Diff
Diff
Patch
(32.82 KB, patch)
2012-08-27 17:10 PDT
,
James Robinson
no flags
Details
Formatted Diff
Diff
consistent fallback behavior
(32.95 KB, patch)
2012-08-29 16:15 PDT
,
James Robinson
no flags
Details
Formatted Diff
Diff
add example of implementing in WebKit and using on chromium side
(33.21 KB, patch)
2012-08-29 16:18 PDT
,
James Robinson
fishd
: review+
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
James Robinson
Comment 1
2012-08-26 21:44:10 PDT
Created
attachment 160627
[details]
Patch
WebKit Review Bot
Comment 2
2012-08-26 21:47:32 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-08-26 23:48:22 PDT
Comment on
attachment 160627
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=160627&action=review
I was hoping I could review this, but I just have silly comments about whitespace. :)
> Source/Platform/chromium/public/WebCompositorSupport.h:55 > + // May return nil if initialization fails. Does not take ownership of the provided client or root layer.
nil -> 0
> Source/Platform/chromium/public/WebCompositorSupport.h:59 > + // Layers -------------------------------------------------------
Please add a blank line below this line and one more blank line above this line.
> Source/Platform/chromium/public/WebCompositorSupport.h:80 > + // Animation ----------------------------------------------------
Please add a blank line below this line.
> Source/WebKit/chromium/src/LinkHighlight.cpp:44 > +
This blank line isn't needed.
James Robinson
Comment 4
2012-08-27 13:40:24 PDT
I'll try using the fancy new WebPassOwnPtr<> type here and see how it works out.
Adam Barth
Comment 5
2012-08-27 13:46:50 PDT
Woah, we have WebPassOwnPtr now! That's exciting.
James Robinson
Comment 6
2012-08-27 13:50:55 PDT
(In reply to
comment #5
)
> Woah, we have WebPassOwnPtr now! That's exciting.
Not yet - we will soon though :)
James Robinson
Comment 7
2012-08-27 13:53:22 PDT
Created
attachment 160797
[details]
Patch
James Robinson
Comment 8
2012-08-27 13:53:43 PDT
Check it out - I don't have to document ownership transfers any more since it's in the type system. Woohoo!
WebKit Review Bot
Comment 9
2012-08-27 13:55:15 PDT
Attachment 160797
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/Platform/ChangeLog', u'Source/Platf..." exit_code: 1 Source/Platform/chromium/public/WebPassOwnPtr.h:85: scoped_ptr is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 1 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
James Robinson
Comment 10
2012-08-27 14:45:05 PDT
Created
attachment 160810
[details]
Remove default WebPassOwnPtr constructor, it's not useful without a copy ctor
WebKit Review Bot
Comment 11
2012-08-27 14:47:28 PDT
Attachment 160810
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/Platform/ChangeLog', u'Source/Platf..." exit_code: 1 Source/Platform/chromium/public/WebPassOwnPtr.h:80: scoped_ptr is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 1 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
James Robinson
Comment 12
2012-08-27 14:47:48 PDT
Darin pointed out it would be super handy to have default implementations of the create..() functions so it's easier to modify the interface without having to land implementations of the new functions chromium-side first. However, I don't know how to write a default implementation of these since WebPassOwnPtr<T> is not copyable (by design) since users should only be using it to put into a OwnPtr<T> or scoped_ptr<T> depending on which side of the interface they are on.
James Robinson
Comment 13
2012-08-27 17:10:05 PDT
Created
attachment 160861
[details]
Patch
James Robinson
Comment 14
2012-08-27 17:12:40 PDT
This provides default implementations of WebCompositorSupport, which Darin points out will make modifying the interface a hell of a lot easier. To do this we've (mostly accidentally) implemented move emulation for WebPassOwnPtr<> so that we can return a temporary null value.
WebKit Review Bot
Comment 15
2012-08-27 17:13:19 PDT
Attachment 160861
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/Platform/ChangeLog', u'Source/Platf..." exit_code: 1 Source/Platform/chromium/public/WebPassOwnPtr.h:85: scoped_ptr is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 1 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
James Robinson
Comment 16
2012-08-27 17:26:32 PDT
One consequence of this is that WebPassOwnPtr<T> is a really weird type. I think we should just make sure it's never declared as a local or member variable, or really used at all outside of declaring + implementing WebKit APIs.
Darin Fisher (:fishd, Google)
Comment 17
2012-08-28 14:19:47 PDT
Comment on
attachment 160861
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=160861&action=review
> Source/Platform/chromium/public/WebPassOwnPtr.h:35 > +#include "base/memory/scoped_ptr.h"
This adds a new circular dependency between WebKit and Chromium, but it is probably fairly unlikely that this path will ever change.
> Source/Platform/chromium/public/WebPassOwnPtr.h:52 > +// OwnPtr<Foo> foo = ...->createFoo();
It would be good to complete this by showing how to implement on the WebKit side and call on the Chromium side.
James Robinson
Comment 18
2012-08-29 16:15:54 PDT
Created
attachment 161350
[details]
consistent fallback behavior
James Robinson
Comment 19
2012-08-29 16:18:36 PDT
Created
attachment 161351
[details]
add example of implementing in WebKit and using on chromium side
James Robinson
Comment 20
2012-08-29 16:19:51 PDT
This assumes that if compositorSupport is not null, it'll return the types we want.
WebKit Review Bot
Comment 21
2012-08-29 16:21:00 PDT
Attachment 161351
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/Platform/ChangeLog', u'Source/Platf..." exit_code: 1 Source/Platform/chromium/public/WebPassOwnPtr.h:98: scoped_ptr is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 1 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
James Robinson
Comment 22
2012-08-30 12:52:17 PDT
Committed
r127172
: <
http://trac.webkit.org/changeset/127172
>
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