Fix input picker issue
[framework/web/webkit-efl.git] / Source / WebKit2 / WebProcess / WebPage / WebPage.cpp
index 73c7146..f4ef35d 100755 (executable)
@@ -302,6 +302,9 @@ WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
     , m_suspendedAnimationController(false)
 #endif
     , m_inspectorClient(0)
+#if ENABLE(TIZEN_ISF_PORT)
+    , m_prepareKeyDownEvent(false)
+#endif
 {
     ASSERT(m_pageID);
     // FIXME: This is a non-ideal location for this Setting and
@@ -557,22 +560,26 @@ EditorState WebPage::editorState() const
     result.hasComposition = frame->editor()->hasComposition();
     result.shouldIgnoreCompositionSelectionChange = frame->editor()->ignoreCompositionSelectionChange();
 
-#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) || ENABLE(TIZEN_ISF_PORT)
+#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
+    if (!result.shouldIgnoreCompositionSelectionChange) {
+        result.underlineState = frame->editor()->selectionHasStyle(CSSPropertyWebkitTextDecorationsInEffect, "underline");
+        result.italicState = frame->editor()->selectionHasStyle(CSSPropertyFontStyle, "italic");
+        result.boldState = frame->editor()->selectionHasStyle(CSSPropertyFontWeight, "bold");
+        result.bgColor = frame->editor()->selectionStartCSSPropertyValue(CSSPropertyBackgroundColor);
+        result.color = frame->editor()->selectionStartCSSPropertyValue(CSSPropertyColor);
+        result.fontSize = frame->editor()->selectionStartCSSPropertyValue(CSSPropertyFontSize);
+    }
+#endif
+
+#if ENABLE(TIZEN_ISF_PORT) || ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
     Element* rootEditableElement = frame->selection()->rootEditableElement();
     if (!rootEditableElement)
         return result;
 
     result.editorRect = nodeRect(rootEditableElement);
-
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-    result.bgColor = frame->editor()->selectionStartCSSPropertyValue(CSSPropertyBackgroundColor);
-    result.color = frame->editor()->selectionStartCSSPropertyValue(CSSPropertyColor);
-#endif
 #endif
 
 #if ENABLE(TIZEN_ISF_PORT)
-    result.isTapEventHandling = (currentEvent() && currentEvent()->type() == WebEvent::GestureSingleTap);
-
     if (!result.shouldIgnoreCompositionSelectionChange && result.isContentEditable) {
         result.inputMethodContextID = reinterpret_cast<uintptr_t>(rootEditableElement);
 
@@ -1085,6 +1092,13 @@ void WebPage::sendViewportAttributesChanged()
     Settings* settings = m_page->settings();
 
 #if OS(TIZEN)
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+    TIZEN_LOGI(" args type: [%d], scale: [%.1f, %.1f, %.1f], layout: [%.1f, %.1f], userScalable: [%.1f]"
+        , static_cast<int>(m_page->viewportArguments().type), m_page->viewportArguments().initialScale
+        , m_page->viewportArguments().minimumScale, m_page->viewportArguments().maximumScale
+        , m_page->viewportArguments().width, m_page->viewportArguments().height, m_page->viewportArguments().userScalable);
+#endif
+
     // As android and iphone does, we set layout width to 980 for desktop content
     int minimumLayoutFallbackWidth = settings->layoutFallbackWidth();
 #else
@@ -1141,6 +1155,10 @@ void WebPage::setViewportSize(const IntSize& size)
     if (m_viewportSize == size)
         return;
 
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+    TIZEN_LOGI(" viewportSize: [%d, %d]", size.width(), size.height());
+#endif
+
      m_viewportSize = size;
 
     sendViewportAttributesChanged();
@@ -1546,6 +1564,9 @@ void WebPage::pageDidScroll()
 #if USE(TILED_BACKING_STORE)
 void WebPage::pageDidRequestScroll(const IntPoint& point)
 {
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+    TIZEN_LOGI(" scroll position: [%d, %d]", point.x(), point.y());
+#endif
     send(Messages::WebPageProxy::PageDidRequestScroll(point));
 }
 #endif
@@ -1553,6 +1574,9 @@ void WebPage::pageDidRequestScroll(const IntPoint& point)
 #if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
 void WebPage::pageDidRequestRestoreVisibleContentRect(const IntPoint& point, float scale)
 {
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+    TIZEN_LOGI(" scale factor: [%.2f], scroll position: [%d, %d]", scale, point.x(), point.y());
+#endif
     send(Messages::WebPageProxy::pageDidRequestRestoreVisibleContentRect(point, scale));
 }
 #endif
@@ -1776,6 +1800,10 @@ void WebPage::keyEvent(const WebKeyboardEvent& keyboardEvent)
 {
     CurrentEvent currentEvent(keyboardEvent);
 
+#if ENABLE(TIZEN_ISF_PORT)
+    m_prepareKeyDownEvent = false;
+#endif
+
     bool handled = handleKeyEvent(keyboardEvent, m_page.get());
     // FIXME: Platform default behaviors should be performed during normal DOM event dispatch (in most cases, in default keydown event handler).
     if (!handled)