Mac: Fix 10.10 SDK compile and test errors (issue #1414)

This commit is contained in:
Marshall Greenblatt 2015-08-26 16:38:43 -04:00
parent 9af98fab45
commit c2086cf7c7
4 changed files with 11 additions and 4 deletions

View File

@ -348,8 +348,13 @@ extern "C" {
// doesn't call any NSTextInput functions, such as setMarkedText or // doesn't call any NSTextInput functions, such as setMarkedText or
// insertText. So, we need to send an IPC message to a renderer so it can // insertText. So, we need to send an IPC message to a renderer so it can
// delete the composition node. // delete the composition node.
// TODO(erikchen): NSInputManager is deprecated since OSX 10.6. Switch to
// NSTextInputContext. http://www.crbug.com/479010.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSInputManager *currentInputManager = [NSInputManager currentInputManager]; NSInputManager *currentInputManager = [NSInputManager currentInputManager];
[currentInputManager markedTextAbandoned:self]; [currentInputManager markedTextAbandoned:self];
#pragma clang diagnostic pop
hasMarkedText_ = NO; hasMarkedText_ = NO;
// Should not call [self unmarkText] here, because it'll send unnecessary // Should not call [self unmarkText] here, because it'll send unnecessary

View File

@ -648,6 +648,8 @@ BrowserOpenGLView* GLView(NSView* view) {
case NSOtherMouseUp: case NSOtherMouseUp:
modifiers |= EVENTFLAG_MIDDLE_MOUSE_BUTTON; modifiers |= EVENTFLAG_MIDDLE_MOUSE_BUTTON;
break; break;
default:
break;
} }
return modifiers; return modifiers;

View File

@ -11,7 +11,7 @@
#include "include/wrapper/cef_helpers.h" #include "include/wrapper/cef_helpers.h"
// Receives notifications from the application. // Receives notifications from the application.
@interface SimpleAppDelegate : NSObject @interface SimpleAppDelegate : NSObject<NSApplicationDelegate>
- (void)createApplication:(id)object; - (void)createApplication:(id)object;
- (void)tryToTerminateApplication:(NSApplication*)app; - (void)tryToTerminateApplication:(NSApplication*)app;
@end @end
@ -90,7 +90,7 @@
[NSBundle loadNibNamed:@"MainMenu" owner:NSApp]; [NSBundle loadNibNamed:@"MainMenu" owner:NSApp];
// Set the delegate for application events. // Set the delegate for application events.
[NSApp setDelegate:self]; [[NSApplication sharedApplication] setDelegate:self];
} }
- (void)tryToTerminateApplication:(NSApplication*)app { - (void)tryToTerminateApplication:(NSApplication*)app {

View File

@ -85,7 +85,7 @@ const int kVerticalScrollbarWidth = GetSystemMetrics(SM_CXVSCROLL);
const CefRect kEditBoxRect(442, 251, 46, 16); const CefRect kEditBoxRect(442, 251, 46, 16);
const CefRect kNavigateButtonRect(375, 275, 130, 20); const CefRect kNavigateButtonRect(375, 275, 130, 20);
const CefRect kSelectRect(461, 21, 87, 26); const CefRect kSelectRect(461, 21, 87, 26);
const CefRect kExpandedSelectRect(466, 42, 81, 286); const CefRect kExpandedSelectRect(466, 42, 79, 286);
const CefRect kDropDivRect(9, 330, 52, 52); const CefRect kDropDivRect(9, 330, 52, 52);
const CefRect kDragDivRect(60, 330, 52, 52); const CefRect kDragDivRect(60, 330, 52, 52);
const int kVerticalScrollbarWidth = 15; const int kVerticalScrollbarWidth = 15;
@ -691,7 +691,7 @@ class OSRTestHandler : public RoutingTestHandler,
expanded_select_rect.height)); expanded_select_rect.height));
// first pixel of border // first pixel of border
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
EXPECT_EQ(0xff719bc1, *(reinterpret_cast<const uint32*>(buffer))); EXPECT_EQ(0xff5d99d6, *(reinterpret_cast<const uint32*>(buffer)));
#else #else
if (scale_factor_ == 1.0f) if (scale_factor_ == 1.0f)
EXPECT_EQ(0xffd69c2b, *(reinterpret_cast<const uint32*>(buffer))); EXPECT_EQ(0xffd69c2b, *(reinterpret_cast<const uint32*>(buffer)));