Index: ui/views/controls/textfield/textfield.cc |
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc |
index c46ddd24b6d8b7bc5236e7e5fd83758772cb13ed..6633730a60184c171af172a96f3f998faa828bf9 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" |
@@ -490,9 +491,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); |
@@ -920,7 +925,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)); |
} |
@@ -1290,7 +1295,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 { |