WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 238714
[macOS] Add helper methods to install and uninstall VKCImageAnalysisOverlayView
https://bugs.webkit.org/show_bug.cgi?id=238714
Summary
[macOS] Add helper methods to install and uninstall VKCImageAnalysisOverlayView
Wenson Hsieh
Reported
2022-04-03 10:40:21 PDT
.
Attachments
For EWS
(16.28 KB, patch)
2022-04-03 12:00 PDT
,
Wenson Hsieh
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Fix Big Sur build
(16.36 KB, patch)
2022-04-03 12:52 PDT
,
Wenson Hsieh
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Fix Big Sur build
(16.45 KB, patch)
2022-04-03 13:00 PDT
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
For landing
(16.47 KB, patch)
2022-04-04 12:56 PDT
,
Wenson Hsieh
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2022-04-03 12:00:46 PDT
Comment hidden (obsolete)
Created
attachment 456507
[details]
For EWS
Wenson Hsieh
Comment 2
2022-04-03 12:52:44 PDT
Comment hidden (obsolete)
Created
attachment 456510
[details]
Fix Big Sur build
Wenson Hsieh
Comment 3
2022-04-03 13:00:22 PDT
Created
attachment 456511
[details]
Fix Big Sur build
Tim Horton
Comment 4
2022-04-04 10:33:13 PDT
Comment on
attachment 456511
[details]
Fix Big Sur build View in context:
https://bugs.webkit.org/attachment.cgi?id=456511&action=review
> Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:1172 > + return CGRectMake(0, 0, 1, 1);
Why does this have a non-zero size?
> Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:5960 > +bool WebViewImpl::shouldAvoidUpdatingCursorAtPoint(NSPoint locationInView) const
Not totally sure this mechanism is a good idea, e.g. if you cmd-tab to a window with a web view and then don't update the cursor. Can you instead just force the cursor you want to be set?
Wenson Hsieh
Comment 5
2022-04-04 12:18:41 PDT
(In reply to Tim Horton from
comment #4
)
> Comment on
attachment 456511
[details]
> Fix Big Sur build > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=456511&action=review
> > > Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:1172 > > + return CGRectMake(0, 0, 1, 1); > > Why does this have a non-zero size?
So I just decided to fall back to the default value here (i.e., as if the delegate were unimplemented), which is the unit rect (0, 0, 1, 1). The return value of this delegate method is a normalized rect relative to the bounds of the WKWebView.
> > > Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:5960 > > +bool WebViewImpl::shouldAvoidUpdatingCursorAtPoint(NSPoint locationInView) const > > Not totally sure this mechanism is a good idea, e.g. if you cmd-tab to a > window with a web view and then don't update the cursor. Can you instead > just force the cursor you want to be set?
That's a good point! I'll see if I can change this...
Wenson Hsieh
Comment 6
2022-04-04 12:42:34 PDT
(In reply to Wenson Hsieh from
comment #5
)
> (In reply to Tim Horton from
comment #4
) > > Comment on
attachment 456511
[details]
> > Fix Big Sur build > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=456511&action=review
> > > > > Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:1172 > > > + return CGRectMake(0, 0, 1, 1); > > > > Why does this have a non-zero size? > > So I just decided to fall back to the default value here (i.e., as if the > delegate were unimplemented), which is the unit rect (0, 0, 1, 1). The > return value of this delegate method is a normalized rect relative to the > bounds of the WKWebView. > > > > > > Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:5960 > > > +bool WebViewImpl::shouldAvoidUpdatingCursorAtPoint(NSPoint locationInView) const > > > > Not totally sure this mechanism is a good idea, e.g. if you cmd-tab to a > > window with a web view and then don't update the cursor. Can you instead > > just force the cursor you want to be set? > > That's a good point! I'll see if I can change this...
Chatted with Tim on Slack about this; the overall approach seems okay since we're not avoiding cursor updates — just letting the native VisionKit views set the cursor on our behalf. I'll rename this method to something like, `imageAnalysisOverlayViewHasCursorAtPoint()`, to make this interaction clear.
Wenson Hsieh
Comment 7
2022-04-04 12:56:46 PDT
Created
attachment 456611
[details]
For landing
EWS
Comment 8
2022-04-04 14:17:16 PDT
Committed
r292316
(
249209@main
): <
https://commits.webkit.org/249209@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 456611
[details]
.
Radar WebKit Bug Importer
Comment 9
2022-04-04 14:18:18 PDT
<
rdar://problem/91260885
>
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