Remove deprecated old Reader code
[profile/ivi/webkit-efl.git] / Source / WebKit2 / WebProcess / WebPage / efl / WebPageEfl.cpp
index 1079e1f..b64a9a5 100755 (executable)
 #include "WebEditorClient.h"
 #endif
 
+#if ENABLE(TIZEN_DATALIST_ELEMENT)
+#include "HTMLCollection.h"
+#include "HTMLDataListElement.h"
+#include "HTMLOptionElement.h"
+#endif
+
 #endif // #if OS(TIZEN)
 
 using namespace WebCore;
@@ -543,15 +549,6 @@ void WebPage::deleteSurroundingPosition(bool& result)
 
     frame->editor()->deleteWithDirection(DirectionBackward, CharacterGranularity, false, true);
 }
-
-void WebPage::handleInputMethodForFocusedNode()
-{
-    Frame* frame = m_page->focusController()->focusedOrMainFrame();
-    if (frame
-        && frame->document()
-        && frame->document()->focusedNode())
-        corePage()->editorClient()->setInputMethodState(frame->document()->focusedNode()->shouldUseInputMethod());
-}
 #endif
 
 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
@@ -587,9 +584,32 @@ void  WebPage::getFocusedInputElementValue(String& inputValue)
 }
 #endif
 
-#if ENABLE(TIZEN_READER)
-void WebPage::checkPageForReader(uint64_t callbackID)
+#if ENABLE(TIZEN_DATALIST_ELEMENT)
+void WebPage::getFocusedInputElementDataList(Vector<String>& optionList)
 {
+    Frame* frame = m_page->focusController()->focusedOrMainFrame();
+    if (!frame || !frame->document())
+        return;
+
+    Node* node = frame->document()->focusedNode();
+    if (!node)
+        return;
+
+    HTMLInputElement* input = node->toInputElement();
+    if (!input)
+        return;
+
+    HTMLDataListElement* dataList = static_cast<HTMLDataListElement*>(input->list());
+    if (!dataList)
+        return;
+
+    RefPtr<HTMLCollection> options = static_cast<HTMLDataListElement*>(dataList)->options();
+    for (unsigned i = 0; Node* node = options->item(i); i++) {
+        ASSERT(node->hasTagName(optionTag));
+        HTMLOptionElement* optionElement = static_cast<HTMLOptionElement*>(node);
+        String value = optionElement->value();
+        optionList.append(value);
+    }
 }
 #endif