#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;
}
#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