Index: ui/views/controls/textfield/textfield.cc |
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc |
index ba72a31e0c98948bc0533f85729758e01b2c7f60..223015f977338bc5b33675059b5902e490ee8b58 100644 |
--- a/ui/views/controls/textfield/textfield.cc |
+++ b/ui/views/controls/textfield/textfield.cc |
@@ -18,6 +18,7 @@ |
#include "ui/events/event.h" |
#include "ui/events/keycodes/keyboard_codes.h" |
#include "ui/gfx/canvas.h" |
+#include "ui/gfx/cursor.h" |
#include "ui/gfx/display.h" |
#include "ui/gfx/insets.h" |
#include "ui/gfx/screen.h" |
@@ -489,9 +490,13 @@ gfx::NativeCursor Textfield::GetCursor(const ui::MouseEvent& event) { |
bool in_selection = GetRenderText()->IsPointInSelection(event.location()); |
bool drag_event = event.type() == ui::ET_MOUSE_DRAGGED; |
bool text_cursor = !initiating_drag_ && (drag_event || !in_selection); |
+#if defined(OS_MACOSX) |
+ return text_cursor ? gfx::GetNativeIBeamCursor() |
+ : gfx::GetNativeArrowCursor(); |
+#else |
return text_cursor ? ui::kCursorIBeam : ui::kCursorNull; |
+#endif |
} |
- |
bool Textfield::OnMousePressed(const ui::MouseEvent& event) { |
TrackMouseClicks(event); |
@@ -919,7 +924,7 @@ void Textfield::ShowContextMenuForView(View* source, |
ui::MenuSourceType source_type) { |
UpdateContextMenu(); |
ignore_result(context_menu_runner_->RunMenuAt(GetWidget(), NULL, |
- gfx::Rect(point, gfx::Size()), MenuItemView::TOPLEFT, source_type, |
+ gfx::Rect(point, gfx::Size()), ui::TOPLEFT_MENU_ANCHOR, source_type, |
MenuRunner::HAS_MNEMONICS | MenuRunner::CONTEXT_MENU)); |
} |
@@ -1289,7 +1294,7 @@ gfx::NativeWindow Textfield::GetAttachedWindow() const { |
// IME may want to interact with the native view of [NativeWidget A] rather |
// than that of [NativeWidget B]. This is why we need to call |
// GetTopLevelWidget() here. |
- return GetWidget()->GetTopLevelWidget()->GetNativeView(); |
+ return GetWidget()->GetTopLevelWidget()->GetNativeWindow(); |
} |
ui::TextInputType Textfield::GetTextInputType() const { |