diff options
Diffstat (limited to 'WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm')
-rw-r--r-- | WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm index 7612322..d8324f7 100644 --- a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm +++ b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm @@ -123,7 +123,7 @@ void WebNetscapePluginEventHandlerCarbon::sendNullEvent() sendEvent(&event); } -void WebNetscapePluginEventHandlerCarbon::drawRect(const NSRect&) +void WebNetscapePluginEventHandlerCarbon::drawRect(CGContextRef, const NSRect&) { EventRecord event; @@ -209,6 +209,17 @@ void WebNetscapePluginEventHandlerCarbon::keyDown(NSEvent *theEvent) WKSendKeyEventToTSM(theEvent); } +void WebNetscapePluginEventHandlerCarbon::syntheticKeyDownWithCommandModifier(int keyCode, char character) +{ + EventRecord event; + getCarbonEvent(&event); + + event.what = ::keyDown; + event.modifiers |= cmdKey; + event.message = keyCode << 8 | character; + sendEvent(&event); +} + static UInt32 keyMessageForEvent(NSEvent *event) { NSData *data = [[event characters] dataUsingEncoding:CFStringConvertEncodingToNSStringEncoding(CFStringGetSystemEncoding())]; |