Chromium Code Reviews| Index: Source/core/html/forms/TextFieldInputType.cpp |
| diff --git a/Source/core/html/forms/TextFieldInputType.cpp b/Source/core/html/forms/TextFieldInputType.cpp |
| index 72d13c58a415b111bd35e1e3c9ede2f4f4860495..95669ea678e71c11ccf08bf6ed585bf719f3700e 100644 |
| --- a/Source/core/html/forms/TextFieldInputType.cpp |
| +++ b/Source/core/html/forms/TextFieldInputType.cpp |
| @@ -39,7 +39,6 @@ |
| #include "core/dom/NodeRenderStyle.h" |
| #include "core/events/TextEvent.h" |
| #include "core/dom/shadow/ShadowRoot.h" |
| -#include "core/editing/Editor.h" |
| #include "core/editing/FrameSelection.h" |
| #include "core/editing/TextIterator.h" |
| #include "core/html/FormDataList.h" |
| @@ -47,6 +46,8 @@ |
| #include "core/html/shadow/ShadowElementNames.h" |
| #include "core/html/shadow/TextControlInnerElements.h" |
| #include "core/frame/Frame.h" |
| +#include "core/page/Chrome.h" |
| +#include "core/page/ChromeClient.h" |
| #include "core/page/Page.h" |
| #include "core/page/Settings.h" |
| #include "core/rendering/RenderLayer.h" |
| @@ -153,9 +154,12 @@ void TextFieldInputType::handleKeydownEvent(KeyboardEvent* event) |
| { |
| if (!element().focused()) |
| return; |
| - Frame* frame = element().document().frame(); |
| - if (!frame || !frame->editor().doTextFieldCommandFromEvent(&element(), event)) |
| - return; |
| + if (Frame* frame = element().document().frame()) { |
| + if (Page* page = frame->page()) { |
| + page->chrome().client().doTextFieldCommandFromEvent(&element(), event); |
|
tkent
2013/11/15 08:18:06
You can use InputType::chrome().
yosin_UTC9
2013/11/15 11:06:01
Done.
|
| + return; |
| + } |
| + } |
| event->setDefaultHandled(); |
| } |
| @@ -442,8 +446,10 @@ void TextFieldInputType::didSetValueByUserEdit(ValueChangeState state) |
| { |
| if (!element().focused()) |
| return; |
| - if (Frame* frame = element().document().frame()) |
| - frame->editor().textDidChangeInTextField(&element()); |
| + if (Frame* frame = element().document().frame()) { |
| + if (Page* page = frame->page()) |
| + page->chrome().client().textDidChangeInTextField(&element()); |
|
tkent
2013/11/15 08:18:06
ditto.
yosin_UTC9
2013/11/15 11:06:01
Done.
|
| + } |
| } |
| void TextFieldInputType::spinButtonStepDown() |