WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
196971
Show prompt for device orientation access if the client does not implement the corresponding API delegate
https://bugs.webkit.org/show_bug.cgi?id=196971
Summary
Show prompt for device orientation access if the client does not implement th...
Chris Dumez
Reported
2019-04-16 10:51:54 PDT
Show prompt for device orientation access if the client does not implement the corresponding API delegate.
Attachments
Patch
(13.09 KB, patch)
2019-04-16 10:55 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(13.89 KB, patch)
2019-04-16 11:44 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(15.00 KB, patch)
2019-04-16 11:53 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(15.07 KB, patch)
2019-04-16 13:27 PDT
,
Chris Dumez
achristensen
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2019-04-16 10:53:04 PDT
<
rdar://problem/49945840
>
Chris Dumez
Comment 2
2019-04-16 10:55:39 PDT
Created
attachment 367545
[details]
Patch
Alex Christensen
Comment 3
2019-04-16 11:18:47 PDT
Comment on
attachment 367545
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=367545&action=review
> Source/WebKit/UIProcess/Cocoa/WKOrientationAccessAlert.h:31 > +#import <wtf/CompletionHandler.h> > +#import <wtf/text/WTFString.h>
wtf/Forward.h should have everything necessary for this.
> Source/WebKit/UIProcess/Cocoa/WKOrientationAccessAlert.mm:35 > + String alertText = makeString('"', host, "\" Would Like to Access Motion and Orientation");
These strings need to be localized.
> Source/WebKit/UIProcess/Cocoa/WKOrientationAccessAlert.mm:40 > + auto completionBlock = makeBlockPtr([completionHandler = WTFMove(completionHandler)](bool shouldAllow) mutable {
I think this code would look better if we made a BlockPtr twice.
Chris Dumez
Comment 4
2019-04-16 11:38:39 PDT
(In reply to Alex Christensen from
comment #3
)
> Comment on
attachment 367545
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=367545&action=review
> > > Source/WebKit/UIProcess/Cocoa/WKOrientationAccessAlert.h:31 > > +#import <wtf/CompletionHandler.h> > > +#import <wtf/text/WTFString.h> > > wtf/Forward.h should have everything necessary for this.
Ok.
> > > Source/WebKit/UIProcess/Cocoa/WKOrientationAccessAlert.mm:35 > > + String alertText = makeString('"', host, "\" Would Like to Access Motion and Orientation"); > > These strings need to be localized.
Oops.
> > > Source/WebKit/UIProcess/Cocoa/WKOrientationAccessAlert.mm:40 > > + auto completionBlock = makeBlockPtr([completionHandler = WTFMove(completionHandler)](bool shouldAllow) mutable { > > I think this code would look better if we made a BlockPtr twice.
How do I make a BlockPtr twice with a single CompletionHandler?
Chris Dumez
Comment 5
2019-04-16 11:44:08 PDT
Created
attachment 367550
[details]
Patch
Alex Christensen
Comment 6
2019-04-16 11:46:05 PDT
Comment on
attachment 367550
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=367550&action=review
> Source/WebKit/UIProcess/Cocoa/WKOrientationAccessAlert.mm:40 > + auto completionBlock = makeBlockPtr([completionHandler = WTFMove(completionHandler)](bool shouldAllow) mutable {
Yep, we definitely need something like this.
> Source/WebKit/UIProcess/Cocoa/WKOrientationAccessAlert.mm:44 > + UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:[completionBlock](UIAlertAction *action) {
Cancel and Allow also should be localized.
Chris Dumez
Comment 7
2019-04-16 11:53:58 PDT
Created
attachment 367551
[details]
Patch
Chris Dumez
Comment 8
2019-04-16 13:27:40 PDT
Created
attachment 367558
[details]
Patch
Chris Dumez
Comment 9
2019-04-16 15:31:43 PDT
Alex, ping review? Does it look good to you now?
Chris Dumez
Comment 10
2019-04-16 15:44:01 PDT
Committed
r244360
: <
https://trac.webkit.org/changeset/244360
>
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