Summary: | REGRESSION (r206750): Crash when pressing Caps Lock if “Use the Caps Lock key to switch to and from U.S.” is selected in Input Sources preferences | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | mitz | ||||||||
Component: | UI Events | Assignee: | Chris Dumez <cdumez> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Blocker | CC: | cdumez, commit-queue, webkit-bug-importer, webkit | ||||||||
Priority: | P1 | Keywords: | InRadar, Regression | ||||||||
Version: | Safari Technology Preview | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | macOS 10.12 | ||||||||||
Attachments: |
|
Description
mitz
2016-10-16 11:51:33 PDT
Using nightly builds, I tracked the regression down to the r206737-r206763 range, and the only relevant change in that range is <https://trac.webkit.org/r206750>. Thanks I will take a look tomorrow. According to https://developer.apple.com/reference/appkit/nsevent/1534183-characters?language=objc : "" This property is only valid for key-up and key-down events. It raises an NSInternalInconsistencyException if accessed on any other kind of event object. "" The issue is that I cam calling characters to other events that keyUp and keyDown it seems. Created attachment 291782 [details]
Patch
Created attachment 291783 [details]
Patch
Comment on attachment 291783 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=291783&action=review > Source/WebCore/platform/mac/PlatformEventFactoryMac.mm:275 > +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 > + if ([event type] == NSEventTypeFlagsChanged) > +#else > + if ([event type] == NSFlagsChanged) > +#endif > + return ASCIILiteral("Unidentified"); Instead of doing this, just #import <wtf/AppKitCompatibilityDeclarations.h> so you can use the modern enum unconditionally. (In reply to comment #6) > Comment on attachment 291783 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=291783&action=review > > > Source/WebCore/platform/mac/PlatformEventFactoryMac.mm:275 > > +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 > > + if ([event type] == NSEventTypeFlagsChanged) > > +#else > > + if ([event type] == NSFlagsChanged) > > +#endif > > + return ASCIILiteral("Unidentified"); > > Instead of doing this, just #import <wtf/AppKitCompatibilityDeclarations.h> > so you can use the modern enum unconditionally. Nice, I'll update. Created attachment 291786 [details]
Patch
Comment on attachment 291786 [details] Patch Clearing flags on attachment: 291786 Committed r207397: <http://trac.webkit.org/changeset/207397> All reviewed patches have been landed. Closing bug. |