Remove deprecated old Reader code
[profile/ivi/webkit-efl.git] / Source / WebKit2 / WebProcess / WebPage / efl / WebPageEfl.cpp
index a2eed01..b64a9a5 100755 (executable)
 #include "RenderLayer.h"
 #include "WebGraphicsLayer.h"
 #endif
+
+#if ENABLE(TIZEN_ISF_PORT)
+#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;
@@ -573,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