diff options
-rw-r--r-- | webkit/plugins/npapi/plugin_web_event_converter_mac.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/webkit/plugins/npapi/plugin_web_event_converter_mac.mm b/webkit/plugins/npapi/plugin_web_event_converter_mac.mm index 4d58b28..91bf2ec 100644 --- a/webkit/plugins/npapi/plugin_web_event_converter_mac.mm +++ b/webkit/plugins/npapi/plugin_web_event_converter_mac.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -209,11 +209,15 @@ bool CocoaPluginWebEventConverter::ConvertKeyboardEvent( return true; } + // TODO(thakis): Remove this once clang is smarter, http://crbug.com/111861 +#pragma clang diagnostic push // clang warns about direct access to isa. +#pragma clang diagnostic ignored "-Wformat" cocoa_event_.data.key.characters = reinterpret_cast<NPNSString*>( [NSString stringWithFormat:@"%S", key_event.text]); cocoa_event_.data.key.charactersIgnoringModifiers = reinterpret_cast<NPNSString*>( [NSString stringWithFormat:@"%S", key_event.unmodifiedText]); +#pragma clang diagnostic pop if (key_event.modifiers & WebInputEvent::IsAutoRepeat) cocoa_event_.data.key.isARepeat = true; |