Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / html / ime / InputMethodContext.cpp
index 40f2aab..6100512 100644 (file)
 #include "config.h"
 #include "core/html/ime/InputMethodContext.h"
 
+#include "core/dom/Document.h"
 #include "core/dom/Text.h"
 #include "core/editing/InputMethodController.h"
-#include "core/frame/Frame.h"
+#include "core/events/Event.h"
+#include "core/frame/LocalFrame.h"
 
-namespace WebCore {
+namespace blink {
 
-PassOwnPtr<InputMethodContext> InputMethodContext::create(HTMLElement* element)
+PassOwnPtrWillBeRawPtr<InputMethodContext> InputMethodContext::create(HTMLElement* element)
 {
-    return adoptPtr(new InputMethodContext(element));
+    return adoptPtrWillBeRefCountedGarbageCollected(new InputMethodContext(element));
 }
 
 InputMethodContext::InputMethodContext(HTMLElement* element)
@@ -85,7 +87,7 @@ void InputMethodContext::confirmComposition()
 
 bool InputMethodContext::hasFocus() const
 {
-    Frame* frame = m_element->document().frame();
+    LocalFrame* frame = m_element->document().frame();
     if (!frame)
         return false;
 
@@ -185,4 +187,10 @@ void InputMethodContext::dispatchCandidateWindowHideEvent()
     dispatchEvent(Event::create(EventTypeNames::candidatewindowhide));
 }
 
-} // namespace WebCore
+void InputMethodContext::trace(Visitor* visitor)
+{
+    visitor->trace(m_element);
+    EventTargetWithInlineData::trace(visitor);
+}
+
+} // namespace blink