WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
136564
Use tracking areas instead of (SPI) mouse moved notifications, and follow flags changes with an event monitor
https://bugs.webkit.org/show_bug.cgi?id=136564
Summary
Use tracking areas instead of (SPI) mouse moved notifications, and follow fla...
Maciej Stachowiak
Reported
2014-09-04 19:38:43 PDT
Use tracking areas instead of (SPI) mouse moved notifications, and follow flags changes with an event monitor
Attachments
Patch
(15.96 KB, patch)
2014-09-04 19:49 PDT
,
Maciej Stachowiak
mitz: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Maciej Stachowiak
Comment 1
2014-09-04 19:49:10 PDT
Created
attachment 237671
[details]
Patch
WebKit Commit Bot
Comment 2
2014-09-04 19:50:43 PDT
Attachment 237671
[details]
did not pass style-queue: ERROR: Source/WebKit/mac/WebView/WebHTMLView.mm:1780: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebKit/mac/WebView/WebHTMLView.mm:4216: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 2 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
mitz
Comment 3
2014-09-05 00:51:14 PDT
Comment on
attachment 237671
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=237671&action=review
> Source/WebKit/mac/ChangeLog:13 > + * WebKit.order: Remove reference to obsolete call.
There’s no need to update this file.
> Source/WebKit/mac/WebView/WebHTMLView.mm:617 > + id _flagsChangedEventMonitor;
Might be best to be consistent with the majority of ivars in this class and remove the underscore.
> Source/WebKit/mac/WebView/WebHTMLView.mm:1001 > + NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved location:[[flagsChangedEvent window] mouseLocationOutsideOfEventStream] > + modifierFlags:[flagsChangedEvent modifierFlags] timestamp:[flagsChangedEvent timestamp] windowNumber:[flagsChangedEvent windowNumber] > + context:[flagsChangedEvent context] eventNumber:0 clickCount:0 pressure:0]; > + > + // Pretend it's a mouse move. > + [self mouseMoved:fakeEvent];
This code is just moving around, but if you wanted you could rewrite it with dot syntax for property access and remove the not-so-helpful comment.
> Source/WebKit/mac/WebView/WebHTMLView.mm:3152 > + _private->_flagsChangedEventMonitor = [NSEvent addLocalMonitorForEventsMatchingMask:NSFlagsChangedMask handler:^(NSEvent *flagsChangedEvent) > + {
The opening brace for a block goes on the same line as the ^
Maciej Stachowiak
Comment 4
2014-09-05 01:01:48 PDT
Committed
r173309
: <
http://trac.webkit.org/changeset/173309
>
Maciej Stachowiak
Comment 5
2014-09-05 01:07:04 PDT
Landed with all suggested changes (except that I left in the removal from WebKit.order; I know it won't make any difference to the code but it makes it more convenient to not get false-positive search hits for removed symbols).
Daniel Bates
Comment 6
2014-09-05 11:16:51 PDT
Committed iOS build fix in <
http://trac.webkit.org/changeset/173315
>.
Daniel Bates
Comment 7
2014-09-05 11:33:58 PDT
Committed additional iOS build fixes in <
http://trac.webkit.org/changeset/173316
> and <
http://trac.webkit.org/changeset/173317
>.
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