WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
138447
Clients should be able to customize the view used for page previews
https://bugs.webkit.org/show_bug.cgi?id=138447
Summary
Clients should be able to customize the view used for page previews
Conrad Shultz
Reported
2014-11-05 17:08:27 PST
Clients should be able to customize the view used for page previews
Attachments
Patch
(5.94 KB, patch)
2014-11-05 17:18 PST
,
Conrad Shultz
no flags
Details
Formatted Diff
Diff
Patch
(5.90 KB, patch)
2014-11-06 09:11 PST
,
Conrad Shultz
no flags
Details
Formatted Diff
Diff
Patch
(5.97 KB, patch)
2014-11-06 17:00 PST
,
Conrad Shultz
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2014-11-05 17:09:15 PST
<
rdar://problem/18889231
>
Conrad Shultz
Comment 2
2014-11-05 17:18:21 PST
Created
attachment 241074
[details]
Patch
Anders Carlsson
Comment 3
2014-11-05 17:33:04 PST
Comment on
attachment 241074
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=241074&action=review
> Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h:124 > +- (NSView *)_previewViewForURL:(NSURL *)url frame:(NSRect)frame;
This sounds kind of ambiguous, as both a verb and a noun. I can't think of a better name though. Can it return a WKView?
Conrad Shultz
Comment 4
2014-11-05 17:34:40 PST
(In reply to
comment #3
)
> Comment on
attachment 241074
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=241074&action=review
> > > Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h:124 > > +- (NSView *)_previewViewForURL:(NSURL *)url frame:(NSRect)frame; > > This sounds kind of ambiguous, as both a verb and a noun. I can't think of a > better name though. > Can it return a WKView?
I'd rather not constrain it as such, especially since the internal implementation actually uses WKWebView. I initially had -_viewForPreviewingURL:frame:, but thought this read better. Perhaps I was wrong?
Anders Carlsson
Comment 5
2014-11-05 17:39:33 PST
Comment on
attachment 241074
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=241074&action=review
> Source/WebKit2/UIProcess/mac/WKActionMenuController.mm:112 > + RetainPtr<NSView> previewView; > + NSRect defaultFrame = NSMakeRect(0, 0, _mainViewSize.width, _mainViewSize.height);
I'd move these around, put the initial assignment here and then have the check below be if (!previewView) { ... }
> Source/WebKit2/UIProcess/mac/WKActionMenuController.mm:819 > +- (RetainPtr<NSView>)pagePreviewViewController:(WKPagePreviewViewController *)pagePreviewViewController previewViewForURL:(NSURL *)url frame:(NSRect)frame
I don't think this needs to return a RetainPtr.
Conrad Shultz
Comment 6
2014-11-05 17:45:03 PST
(In reply to
comment #5
)
> Comment on
attachment 241074
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=241074&action=review
> > > Source/WebKit2/UIProcess/mac/WKActionMenuController.mm:112 > > + RetainPtr<NSView> previewView; > > + NSRect defaultFrame = NSMakeRect(0, 0, _mainViewSize.width, _mainViewSize.height); > > I'd move these around, put the initial assignment here and then have the > check below be > > if (!previewView) { > ... > }
> Agreed, will fix.
> > Source/WebKit2/UIProcess/mac/WKActionMenuController.mm:819 > > +- (RetainPtr<NSView>)pagePreviewViewController:(WKPagePreviewViewController *)pagePreviewViewController previewViewForURL:(NSURL *)url frame:(NSRect)frame > > I don't think this needs to return a RetainPtr.
I don't think so either.
Conrad Shultz
Comment 7
2014-11-06 09:11:19 PST
Created
attachment 241113
[details]
Patch
Anders Carlsson
Comment 8
2014-11-06 13:17:02 PST
Comment on
attachment 241113
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=241113&action=review
> Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h:124 > +- (NSView *)_viewForPreviewingURL:(NSURL *)url frame:(NSRect)frame;
I think this should be called initialFrameSize (and take an NSSize).
Conrad Shultz
Comment 9
2014-11-06 15:50:34 PST
(In reply to
comment #8
)
> Comment on
attachment 241113
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=241113&action=review
> > > Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h:124 > > +- (NSView *)_viewForPreviewingURL:(NSURL *)url frame:(NSRect)frame; > > I think this should be called initialFrameSize (and take an NSSize).
Agreed; new version coming.
Conrad Shultz
Comment 10
2014-11-06 17:00:24 PST
Created
attachment 241147
[details]
Patch
WebKit Commit Bot
Comment 11
2014-11-06 18:02:03 PST
Comment on
attachment 241147
[details]
Patch Clearing flags on attachment: 241147 Committed
r175732
: <
http://trac.webkit.org/changeset/175732
>
WebKit Commit Bot
Comment 12
2014-11-06 18:02:07 PST
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