Improved the routine for getting text style state.
authorYuni Jeong <yhnet.jung@samsung.com>
Mon, 24 Jun 2013 12:56:21 +0000 (21:56 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Tue, 25 Jun 2013 01:12:24 +0000 (01:12 +0000)
[Title] Improved the routine for getting text style state.
[Issue#] N_SE-41795, WEB-3055
[Problem] Overhead occurs when key event is handled.
[Cause] Request sync message fer getting text style state too often.
[Solution] Removed syne message for getting text style state and
           Moved the routine for getting text style state to EditorStateChanged message.

Change-Id: Ie1c132e64f0511d04bfe8c52e95c304afa214253

17 files changed:
Source/WebKit2/Shared/EditorState.cpp
Source/WebKit2/Shared/EditorState.h
Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp
Source/WebKit2/UIProcess/API/efl/PageClientImpl.h
Source/WebKit2/UIProcess/API/efl/ewk_text_style.cpp
Source/WebKit2/UIProcess/API/efl/ewk_text_style.h
Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
Source/WebKit2/UIProcess/API/efl/ewk_view_private.h
Source/WebKit2/UIProcess/API/efl/tizen/TextSelection.cpp
Source/WebKit2/UIProcess/API/efl/tizen/TextSelection.h
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp

index 5011976..d9ab33d 100755 (executable)
@@ -53,8 +53,12 @@ void EditorState::encode(CoreIPC::ArgumentEncoder* encoder) const
     encoder->encode(editorRect);
     encoder->encode(updateEditorRectOnly);
 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
+    encoder->encode(underlineState);
+    encoder->encode(italicState);
+    encoder->encode(boldState);
     encoder->encode(bgColor);
     encoder->encode(color);
+    encoder->encode(fontSize);
 #endif
 #endif
 
@@ -118,11 +122,23 @@ bool EditorState::decode(CoreIPC::ArgumentDecoder* decoder, EditorState& result)
         return false;
 
 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
+    if (!decoder->decode(result.underlineState))
+        return false;
+
+    if (!decoder->decode(result.italicState))
+        return false;
+
+    if (!decoder->decode(result.boldState))
+        return false;
+
     if (!decoder->decode(result.bgColor))
         return false;
 
     if (!decoder->decode(result.color))
         return false;
+
+    if (!decoder->decode(result.fontSize))
+        return false;
 #endif
 #endif
 
index b9c80ee..2ea188d 100755 (executable)
@@ -49,6 +49,9 @@ struct EditorState {
 #endif
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
         , updateEditorRectOnly(false)
+        , underlineState(0)
+        , italicState(0)
+        , boldState(0)
 #endif
 #if PLATFORM(QT)
         , cursorPosition(0)
@@ -77,8 +80,12 @@ struct EditorState {
     WebCore::IntRect editorRect;
     bool updateEditorRectOnly;
 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
+    int underlineState;
+    int italicState;
+    int boldState;
     WTF::String bgColor;
     WTF::String color;
+    WTF::String fontSize;
 #endif
 #endif
 #if PLATFORM(QT)
index e775199..faadbdb 100755 (executable)
@@ -1437,47 +1437,6 @@ void PageClientImpl::findScrollableNode(const IntPoint& point)
 }
 #endif
 
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-void PageClientImpl::didGetTextStyleStateForSelection(int underlineState, int italicState, int boldState)
-{
-    WebCore::IntPoint startPoint, endPoint;
-    WebCore::IntRect leftRect, rightRect;
-
-    WebCore::IntRect caretRect;
-    m_viewImpl->page()->getCaretPosition(caretRect);
-    if (!caretRect.isEmpty()) {
-        startPoint.setX(caretRect.x());
-        startPoint.setY(caretRect.y() + caretRect.height());
-
-        endPoint.setX(caretRect.x() + caretRect.width());
-        endPoint.setY(caretRect.y() + caretRect.height());
-    }
-#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    else if (m_viewImpl->page()->getSelectionHandlers(leftRect, rightRect)) {
-        startPoint.setX(leftRect.x());
-        startPoint.setY(leftRect.y() + leftRect.height());
-
-        endPoint.setX(rightRect.x() + rightRect.width());
-        endPoint.setY(rightRect.y() + rightRect.height());
-    }
-#endif
-
-    startPoint.scale(scaleFactor(), scaleFactor());
-    endPoint.scale(scaleFactor(), scaleFactor());
-
-    int viewPositionX, viewPositionY;
-    evas_object_geometry_get(m_viewImpl->view(), &viewPositionX, &viewPositionY, NULL, NULL);
-
-    startPoint.move(-scrollPosition().x(),  -scrollPosition().y());
-    startPoint.move(viewPositionX, viewPositionY);
-
-    endPoint.move(-scrollPosition().x(),  -scrollPosition().y());
-    endPoint.move(viewPositionX, viewPositionY);
-
-    ewkViewDidGetTextStyleStateForSelection(m_viewImpl->view(), underlineState, italicState, boldState, startPoint, endPoint);
-}
-#endif
-
 void PageClientImpl::didFindZoomableArea(const IntPoint& target, const IntRect& area)
 {
     ewk_view_zoomable_area_set(m_viewImpl->view(), target, area);
index a1ba4bf..20f8866 100755 (executable)
@@ -230,9 +230,6 @@ public:
     void setBackgroundColor(double red, double green, double blue, double alpha);
     TIZEN_VIRTUAL bool makeContextCurrent() { return true; }
 #endif
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-    void didGetTextStyleStateForSelection(int underlineState, int italicState, int boldState);
-#endif
 
     virtual void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&);
 
index 04b50e9..91fade1 100644 (file)
@@ -45,16 +45,19 @@ struct _Ewk_Text_Style {
         int b;
         int a;
     } color;
+
+    const char* fontSize;
+    Eina_Bool hasComposition;
 };
 
 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-Ewk_Text_Style* ewkTextStyleCreate(int underlineState, int italicState, int boldState, const WebCore::IntPoint& startPoint, const WebCore::IntPoint& endPoint, const String& bgColor, const String& color)
+Ewk_Text_Style* ewkTextStyleCreate(const EditorState editorState, const WebCore::IntPoint& startPoint, const WebCore::IntPoint& endPoint)
 {
     Ewk_Text_Style* textStyle = new Ewk_Text_Style;
 
-    textStyle->underlineState = static_cast<Ewk_Text_Style_State>(underlineState);
-    textStyle->italicState = static_cast<Ewk_Text_Style_State>(italicState);
-    textStyle->boldState = static_cast<Ewk_Text_Style_State>(boldState);
+    textStyle->underlineState = static_cast<Ewk_Text_Style_State>(editorState.underlineState);
+    textStyle->italicState = static_cast<Ewk_Text_Style_State>(editorState.italicState);
+    textStyle->boldState = static_cast<Ewk_Text_Style_State>(editorState.boldState);
 
     textStyle->position.startPoint.x = startPoint.x();
     textStyle->position.startPoint.y = startPoint.y();
@@ -63,38 +66,41 @@ Ewk_Text_Style* ewkTextStyleCreate(int underlineState, int italicState, int bold
 
     // for example - rgba(255, 255, 255, 255)
     // for example - rgb(255, 255, 255)
-    if (equalIgnoringCase(bgColor.left(3), "rgb")) {
-        size_t startPos = bgColor.find("(");
-        size_t endPos = bgColor.find(")");
+    if (equalIgnoringCase(editorState.bgColor.left(3), "rgb")) {
+        size_t startPos = editorState.bgColor.find("(");
+        size_t endPos = editorState.bgColor.find(")");
 
-        String value = bgColor.substring(startPos + 1, endPos - startPos - 1);
+        String value = editorState.bgColor.substring(startPos + 1, endPos - startPos - 1);
         Vector<String> colorValues;
         value.split(",", colorValues);
         textStyle->bgColor.r = colorValues[0].toInt();
         textStyle->bgColor.g = colorValues[1].toInt();
         textStyle->bgColor.b = colorValues[2].toInt();
-        if (equalIgnoringCase(bgColor.left(4), "rgba"))
+        if (equalIgnoringCase(editorState.bgColor.left(4), "rgba"))
             textStyle->bgColor.a = colorValues[3].toInt();
         else
             textStyle->bgColor.a = 255;
     }
 
-    if (equalIgnoringCase(color.left(3), "rgb")) {
-        size_t startPos = color.find("(");
-        size_t endPos = color.find(")");
+    if (equalIgnoringCase(editorState.color.left(3), "rgb")) {
+        size_t startPos = editorState.color.find("(");
+        size_t endPos = editorState.color.find(")");
 
-        String value = color.substring(startPos + 1, endPos - startPos - 1);
+        String value = editorState.color.substring(startPos + 1, endPos - startPos - 1);
         Vector<String> colorValues;
         value.split(",", colorValues);
         textStyle->color.r = colorValues[0].toInt();
         textStyle->color.g = colorValues[1].toInt();
         textStyle->color.b = colorValues[2].toInt();
-        if (equalIgnoringCase(color.left(4), "rgba"))
+        if (equalIgnoringCase(editorState.color.left(4), "rgba"))
             textStyle->color.a = colorValues[3].toInt();
         else
             textStyle->color.a = 255;
     }
 
+    textStyle->fontSize = eina_stringshare_add(editorState.fontSize.utf8().data());
+    textStyle->hasComposition = editorState.hasComposition;
+
     return textStyle;
 }
 
@@ -102,6 +108,9 @@ void ewkTextStyleDelete(Ewk_Text_Style* textStyle)
 {
     EINA_SAFETY_ON_NULL_RETURN(textStyle);
 
+    if (textStyle->fontSize)
+        eina_stringshare_del(textStyle->fontSize);
+
     delete textStyle;
 }
 #endif
@@ -195,3 +204,15 @@ Eina_Bool ewk_text_style_color_get(Ewk_Text_Style* textStyle, int* r, int* g, in
     return false;
 #endif
 }
+
+const char* ewk_text_style_font_size_get(Ewk_Text_Style* textStyle)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, 0);
+    return textStyle->fontSize;
+}
+
+Eina_Bool ewk_text_style_has_composition_get(Ewk_Text_Style* textStyle)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, false);
+    return textStyle->hasComposition;
+}
index 3846418..2fefdab 100644 (file)
@@ -41,6 +41,8 @@ EAPI Ewk_Text_Style_State ewk_text_style_bold_get(Ewk_Text_Style* text_style);
 EAPI Eina_Bool ewk_text_style_position_get(Ewk_Text_Style* text_style, Evas_Point* start_point, Evas_Point* end_point);
 EAPI Eina_Bool ewk_text_style_bg_color_get(Ewk_Text_Style* textStyle, int* r, int* g, int* b, int* a);
 EAPI Eina_Bool ewk_text_style_color_get(Ewk_Text_Style* textStyle, int* r, int* g, int* b, int* a);
+EAPI const char* ewk_text_style_font_size_get(Ewk_Text_Style* textStyle);
+EAPI Eina_Bool ewk_text_style_has_composition_get(Ewk_Text_Style* textStyle);
 
 #ifdef __cplusplus
 }
index b1d163a..85223e2 100644 (file)
@@ -4170,14 +4170,13 @@ void ewk_view_touch_event_handler_result_set(Evas_Object* ewkView, WebKit::WebEv
 }
 
 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-void  ewkViewDidGetTextStyleStateForSelection(Evas_Object* ewkView, int underlineState, int italicState, int boldState, const IntPoint& startPoint, const IntPoint& endPoint)
+void  ewkViewTextStyleState(Evas_Object* ewkView, const IntPoint& startPoint, const IntPoint& endPoint)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
 
     EditorState editorState = impl->page()->editorState();
-
-    Ewk_Text_Style* textStyle = ewkTextStyleCreate(underlineState, italicState, boldState, startPoint, endPoint, editorState.bgColor, editorState.color);
+    Ewk_Text_Style* textStyle = ewkTextStyleCreate(editorState, startPoint, endPoint);
     evas_object_smart_callback_call(ewkView, "text,style,state", static_cast<void*>(textStyle));
     ewkTextStyleDelete(textStyle);
 }
index 1ccce62..f4bdcad 100755 (executable)
@@ -229,8 +229,8 @@ void ewkViewDataListHideRequest(Evas_Object* ewkView, Ewk_Input_Type inputType);
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-void  ewkViewDidGetTextStyleStateForSelection(Evas_Object* ewkView, int underlineState, int italicState, int boldState, const WebCore::IntPoint& startPoint, const WebCore::IntPoint& endPoint);
-Ewk_Text_Style* ewkTextStyleCreate(int underlineState, int italicState, int boldState, const WebCore::IntPoint& startPoint, const WebCore::IntPoint& endPoint, const String& bgColor, const String& color);
+void  ewkViewTextStyleState(Evas_Object* ewkView, const WebCore::IntPoint& startPoint, const WebCore::IntPoint& endPoint);
+Ewk_Text_Style* ewkTextStyleCreate(const WebKit::EditorState editorState, const WebCore::IntPoint& startPoint, const WebCore::IntPoint& endPoint);
 void ewkTextStyleDelete(Ewk_Text_Style* textStyle);
 #endif
 
index 726a020..3bbe3d3 100644 (file)
@@ -99,6 +99,11 @@ void TextSelection::update()
     if (editorState.updateEditorRectOnly)
         return;
 
+#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
+    if (!editorState.shouldIgnoreCompositionSelectionChange)
+        informTextStyleState();
+#endif
+
     if (isTextSelectionMode()) {
         if (!editorState.selectionIsRange) {
             if (editorState.isContentEditable && !evas_object_focus_get(m_viewImpl->view())) {
@@ -114,30 +119,13 @@ void TextSelection::update()
 
                 setIsTextSelectionMode(false);
             }
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-            m_viewImpl->page()->getTextStyleStateForSelection();
-#endif
         } else {
             if (!isTextSelectionDowned() && !isTextSelectionHandleDowned()) {
                 updateHandlers();
                 showContextMenu();
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-                m_viewImpl->page()->getTextStyleStateForSelection();
-#endif
-            }
-        }
-    }
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-    else {
-        if (editorState.isContentEditable && !editorState.selectionIsRange) {
-            WebCore::IntRect caretRect;
-            m_viewImpl->page()->getCaretPosition(caretRect);
-            if (!caretRect.isEmpty()) {
-                m_viewImpl->page()->getTextStyleStateForSelection();
             }
         }
     }
-#endif
 }
 
 void TextSelection::setIsTextSelectionMode(bool isTextSelectionMode)
@@ -415,9 +403,6 @@ void TextSelection::handleMouseUp(TextSelectionHandle* /* handle */, const IntPo
 {
     hideMagnifier();
     showContextMenu();
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-    m_viewImpl->page()->getTextStyleStateForSelection();
-#endif
 }
 
 bool TextSelection::isMagnifierVisible()
@@ -604,10 +589,6 @@ void TextSelection::textSelectionUp(const IntPoint& point, bool isStartedTextSel
         showContextMenu();
     } else if (!isStartedTextSelectionFromOutside)
         setIsTextSelectionMode(false);
-
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-    m_viewImpl->page()->getTextStyleStateForSelection();
-#endif
 }
 
 #if ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
@@ -704,6 +685,37 @@ void TextSelection::changeContextMenuPosition(WebCore::IntPoint& position)
         position.setY(position.y() - handleRect.height());
     }
 }
+
+#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
+void TextSelection::informTextStyleState()
+{
+    WebCore::IntPoint startPoint, endPoint;
+    WebCore::IntRect leftRect, rightRect;
+
+    WebCore::IntRect caretRect;
+    m_viewImpl->page()->getCaretPosition(caretRect);
+    if (!caretRect.isEmpty()) {
+        startPoint.setX(caretRect.x());
+        startPoint.setY(caretRect.y() + caretRect.height());
+
+        endPoint.setX(caretRect.x() + caretRect.width());
+        endPoint.setY(caretRect.y() + caretRect.height());
+    }
+    else if (m_viewImpl->page()->getSelectionHandlers(leftRect, rightRect)) {
+        startPoint.setX(leftRect.x());
+        startPoint.setY(leftRect.y() + leftRect.height());
+
+        endPoint.setX(rightRect.x() + rightRect.width());
+        endPoint.setY(rightRect.y() + rightRect.height());
+    }
+
+    AffineTransform toEvasTransform = m_viewImpl->transformToScene();
+    WebCore::IntPoint startEvasPoint = toEvasTransform.mapPoint(startPoint);
+    WebCore::IntPoint endEvasPoint = toEvasTransform.mapPoint(endPoint);
+
+    ewkViewTextStyleState(m_viewImpl->view(), startEvasPoint, endEvasPoint);
+}
+#endif
 } // namespace WebKit
 
 #endif // TIZEN_WEBKIT2_TEXT_SELECTION
index ec90e1a..fa3802b 100644 (file)
@@ -112,6 +112,10 @@ private:
     static Eina_Bool showTimerCallback(void* data);
     void showHandlesAndContextMenu();
 
+#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
+    void informTextStyleState();
+#endif
+
 private:
     EwkViewImpl* m_viewImpl;
     TextSelectionHandle* m_leftHandle;
index f3f8b2c..4f0db4a 100755 (executable)
@@ -972,11 +972,6 @@ public:
     void didRenderFrame();
 #endif
 
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-    void getTextStyleStateForSelection();
-    void didGetTextStyleStateForSelection(int underlineState, int italicState, int boldState);
-#endif
-
 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
     void widgetMapped(uint64_t nativeWindowId);
 #endif
index d9196ed..3eb8354 100755 (executable)
@@ -444,10 +444,6 @@ messages -> WebPageProxy {
 
     SetBackgroundColor(double red, double green, double blue, double alpha)
 
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-    DidGetTextStyleStateForSelection(int underlineState, int italicState, int boldState)
-#endif
-
 #if ENABLE(SCREEN_ORIENTATION_SUPPORT) && ENABLE(TIZEN_SCREEN_ORIENTATION_SUPPORT)
     LockOrientation(int32_t orientation) -> (bool result)
     UnlockOrientation()
index 8a9f092..e492cc1 100755 (executable)
@@ -825,18 +825,6 @@ bool WebPageProxy::makeContextCurrent()
 }
 #endif
 
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-void WebPageProxy::getTextStyleStateForSelection()
-{
-    process()->send(Messages::WebPage::GetTextStyleStateForSelection(), m_pageID, 0);
-}
-
-void WebPageProxy::didGetTextStyleStateForSelection(int underlineState, int italicState, int boldState)
-{
-    static_cast<PageClientImpl*>(m_pageClient)->didGetTextStyleStateForSelection(underlineState, italicState, boldState);
-}
-#endif
-
 #if ENABLE(TIZEN_ICON_DATABASE)
 void WebPageProxy::didReceiveIcon()
 {
index 535829e..a0dcc7a 100755 (executable)
@@ -557,17 +557,23 @@ 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)
index 147122f..47d3108 100644 (file)
@@ -740,10 +740,6 @@ public:
     WebCore::HTTPHeaderMap customHeaders();
 #endif
 
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-    void getTextStyleStateForSelection();
-#endif
-
 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
     uint64_t nativeWindowHandle() { return m_nativeWindowHandle; }
 #endif
index 4db498e..c271034 100644 (file)
@@ -421,10 +421,6 @@ messages -> WebPage {
     CreatePagesToPDF(WebCore::IntSize surfaceSize, WebCore::IntSize contentsSize, WTF::String fileName)
 #endif
 
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-    GetTextStyleStateForSelection()
-#endif
-
 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
     WidgetMapped(int64_t id)
 #endif
index 96e9cd2..3fdc1ec 100644 (file)
@@ -1177,19 +1177,6 @@ void WebPage::resumePlugin()
 }
 #endif
 
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-void WebPage::getTextStyleStateForSelection()
-{
-    Frame* frame = m_page->focusController()->focusedOrMainFrame();
-
-    int underlineState = frame->editor()->selectionHasStyle(CSSPropertyWebkitTextDecorationsInEffect, "underline");
-    int italicState = frame->editor()->selectionHasStyle(CSSPropertyFontStyle, "italic");
-    int boldState = frame->editor()->selectionHasStyle(CSSPropertyFontWeight, "bold");
-
-    send(Messages::WebPageProxy::DidGetTextStyleStateForSelection(underlineState, italicState, boldState));
-}
-#endif
-
 #if ENABLE(TIZEN_MULTIPLE_SELECT)
 void WebPage::didChangeSelectedIndexForActivePopupMenuMultiple(Vector<int32_t> newIndex)
 {