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
184344
WebCore::EventHandler::targetPositionInWindowForSelectionAutoscroll is directly accessing NSScreen
https://bugs.webkit.org/show_bug.cgi?id=184344
Summary
WebCore::EventHandler::targetPositionInWindowForSelectionAutoscroll is direct...
Brent Fulgham
Reported
2018-04-05 16:52:19 PDT
The WebCore::EventHandler::targetPositionInWindowForSelectionAutoscroll method is retrieving NSScreen information directly. These calls should be brokered.
Attachments
Patch
(17.17 KB, patch)
2018-04-06 17:14 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews103 for mac-sierra
(2.52 MB, application/zip)
2018-04-06 18:46 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews116 for mac-sierra
(3.63 MB, application/zip)
2018-04-06 19:11 PDT
,
EWS Watchlist
no flags
Details
Patch
(11.62 KB, patch)
2018-04-07 12:37 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(11.58 KB, patch)
2018-04-09 11:46 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(17.55 KB, patch)
2018-04-09 12:13 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(18.20 KB, patch)
2018-04-09 12:48 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(18.19 KB, patch)
2018-04-09 13:41 PDT
,
Brent Fulgham
pvollan
: review+
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-04-05 16:52:40 PDT
<
rdar://problem/39224969
>
Brent Fulgham
Comment 2
2018-04-06 17:14:50 PDT
Created
attachment 337403
[details]
Patch
EWS Watchlist
Comment 3
2018-04-06 18:46:32 PDT
Comment on
attachment 337403
[details]
Patch
Attachment 337403
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/7231943
New failing tests: fast/events/autoscroll-with-non-scrollable-parent.html fast/events/autoscroll-nonscrollable-iframe-in-scrollable-div.html fast/events/no-scroll-on-input-text-selection.html fast/forms/select-multiple-elements-with-mouse-drag.html fast/events/autoscroll-in-iframe.html fast/forms/input-readonly-autoscroll.html fast/events/autoscroll-in-textfield.html fast/events/autoscroll-should-not-stop-on-keypress.html fast/forms/select/listbox-disabled-no-autoscroll.html fast/events/autoscroll-in-iframe-body.html
EWS Watchlist
Comment 4
2018-04-06 18:46:33 PDT
Created
attachment 337408
[details]
Archive of layout-test-results from ews103 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-sierra Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 5
2018-04-06 19:11:55 PDT
Comment on
attachment 337403
[details]
Patch
Attachment 337403
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/7232000
New failing tests: fast/events/autoscroll-with-non-scrollable-parent.html fast/events/autoscroll-nonscrollable-iframe-in-scrollable-div.html fast/events/no-scroll-on-input-text-selection.html fast/forms/select-multiple-elements-with-mouse-drag.html fast/events/autoscroll-in-iframe.html fast/forms/input-readonly-autoscroll.html fast/events/autoscroll-in-textfield.html fast/events/autoscroll-should-not-stop-on-keypress.html fast/forms/select/listbox-disabled-no-autoscroll.html fast/events/autoscroll-in-iframe-body.html
EWS Watchlist
Comment 6
2018-04-06 19:11:56 PDT
Created
attachment 337409
[details]
Archive of layout-test-results from ews116 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-sierra Platform: Mac OS X 10.12.6
Brent Fulgham
Comment 7
2018-04-07 12:37:37 PDT
Created
attachment 337430
[details]
Patch
Brent Fulgham
Comment 8
2018-04-09 11:46:04 PDT
Created
attachment 337515
[details]
Patch
Brent Fulgham
Comment 9
2018-04-09 12:13:07 PDT
Created
attachment 337521
[details]
Patch
Per Arne Vollan
Comment 10
2018-04-09 12:20:03 PDT
Comment on
attachment 337515
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=337515&action=review
> Source/WebCore/page/mac/EventHandlerMac.mm:1169 > + auto frame = toUserSpaceForPrimaryScreen(screenProperties(page->chrome().displayID()).screenRect);
Will the screen properties map be empty on WK1?
Brent Fulgham
Comment 11
2018-04-09 12:30:28 PDT
(In reply to Per Arne Vollan from
comment #10
)
> Comment on
attachment 337515
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=337515&action=review
> > > Source/WebCore/page/mac/EventHandlerMac.mm:1169 > > + auto frame = toUserSpaceForPrimaryScreen(screenProperties(page->chrome().displayID()).screenRect); > > Will the screen properties map be empty on WK1?
Oh, you are right. This will crash in WebKitLegacy. :-(
Brent Fulgham
Comment 12
2018-04-09 12:48:51 PDT
Created
attachment 337529
[details]
Patch
Brent Fulgham
Comment 13
2018-04-09 13:41:48 PDT
Created
attachment 337535
[details]
Patch
Per Arne Vollan
Comment 14
2018-04-09 13:47:34 PDT
Comment on
attachment 337535
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=337535&action=review
> Source/WebCore/page/mac/EventHandlerMac.mm:-1167 > - auto frame = toUserSpace(screen(page->chrome().displayID()).frame, nil);
It seems the original transformation will be incorrect if the window is not on the first screen, since the NSWindow parameter is nil here. Should we also address that in this patch?
Brent Fulgham
Comment 15
2018-04-09 15:41:39 PDT
(In reply to Per Arne Vollan from
comment #14
)
> Comment on
attachment 337535
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=337535&action=review
> > > Source/WebCore/page/mac/EventHandlerMac.mm:-1167 > > - auto frame = toUserSpace(screen(page->chrome().displayID()).frame, nil); > > It seems the original transformation will be incorrect if the window is not > on the first screen, since the NSWindow parameter is nil here. Should we > also address that in this patch?
Which NSWindow would we be passing as the second argument? If you know the right answer one to use, I’m in favor of fixing it now.
Brent Fulgham
Comment 16
2018-04-09 15:44:42 PDT
Comment on
attachment 337535
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=337535&action=review
>>> Source/WebCore/page/mac/EventHandlerMac.mm:-1167 >>> - auto frame = toUserSpace(screen(page->chrome().displayID()).frame, nil); >> >> It seems the original transformation will be incorrect if the window is not on the first screen, since the NSWindow parameter is nil here. Should we also address that in this patch? > > Which NSWindow would we be passing as the second argument? If you know the right answer one to use, I’m in favor of fixing it now.
Actually, I think it is correct as-is. A nil window was used by the other eiginslncode to compute coordinates with respect to the primary display (I.e., not “no display”). I think that is the correct transformation.
Per Arne Vollan
Comment 17
2018-04-09 16:21:58 PDT
Comment on
attachment 337535
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=337535&action=review
Very nice! r=me.
> Source/WebKit/WebProcess/WebProcess.cpp:138 > +#if PLATFORM(MAC) > +#include <WebCore/PlatformScreen.h> > +#endif
This include might not be needed.
Brent Fulgham
Comment 18
2018-04-09 16:30:12 PDT
Comment on
attachment 337535
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=337535&action=review
>> Source/WebKit/WebProcess/WebProcess.cpp:138 >> +#endif > > This include might not be needed.
You are right. I'll remove it.
Brent Fulgham
Comment 19
2018-04-09 16:34:19 PDT
Committed
r230454
: <
https://trac.webkit.org/changeset/230454
>
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