From a0736f6a72cbe853bca939fbc3e21da2c13c78f9 Mon Sep 17 00:00:00 2001 From: Yuni Jeong Date: Mon, 20 Aug 2012 01:05:51 +0900 Subject: [PATCH] Fix focusring issue in menu and button of Web UI Framwork. [Title] Fix focusring issue in menu and button of Web UI Framwork. [Issue#] P120814-6674, P120809-0079 [Problem] All button in Social magazine change color when we tap it, two color of highlighted [Cause] Focuse Ring is not drwan using tapHighlightColor of renderStyle. - CSS Property for tapHighlightColor : -webkit-tap-highlight-color [Solution] modified that focus-ring is drawn using tapHighlightColor. Change-Id: I25af2208a6ce063a33e039eba61eb2a7077b695f --- Source/WebKit2/Shared/WebHitTestResult.cpp | 4 ++++ Source/WebKit2/Shared/WebHitTestResult.h | 1 + Source/WebKit2/UIProcess/API/efl/FocusRing.cpp | 3 ++- Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) mode change 100644 => 100755 Source/WebKit2/UIProcess/API/efl/FocusRing.cpp diff --git a/Source/WebKit2/Shared/WebHitTestResult.cpp b/Source/WebKit2/Shared/WebHitTestResult.cpp index 65d4de9..c98ad20 100755 --- a/Source/WebKit2/Shared/WebHitTestResult.cpp +++ b/Source/WebKit2/Shared/WebHitTestResult.cpp @@ -53,6 +53,7 @@ void WebHitTestResult::Data::encode(CoreIPC::ArgumentEncoder* encoder) const #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING) encoder->encode(focusedRect); + encoder->encode(focusedColor); #endif if (hitTestMode & HitTestModeNodeData) { @@ -92,6 +93,9 @@ bool WebHitTestResult::Data::decode(CoreIPC::ArgumentDecoder* decoder, WebHitTes #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING) if (!decoder->decode(hitTestResultData.focusedRect)) return false; + + if (!decoder->decode(hitTestResultData.focusedColor)) + return false; #endif if (hitTestResultData.hitTestMode & HitTestModeNodeData) { diff --git a/Source/WebKit2/Shared/WebHitTestResult.h b/Source/WebKit2/Shared/WebHitTestResult.h index b5666a1..471ad1d 100755 --- a/Source/WebKit2/Shared/WebHitTestResult.h +++ b/Source/WebKit2/Shared/WebHitTestResult.h @@ -81,6 +81,7 @@ public: #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING) WebCore::IntRect focusedRect; + WebCore::Color focusedColor; #endif struct NodeData { diff --git a/Source/WebKit2/UIProcess/API/efl/FocusRing.cpp b/Source/WebKit2/UIProcess/API/efl/FocusRing.cpp old mode 100644 new mode 100755 index e3143b6..ef1f210 --- a/Source/WebKit2/UIProcess/API/efl/FocusRing.cpp +++ b/Source/WebKit2/UIProcess/API/efl/FocusRing.cpp @@ -93,7 +93,8 @@ void FocusRing::show() evas_object_del(m_focusRingObject); m_focusRingObject = evas_object_rectangle_add(evas_object_evas_get(m_viewWidget)); evas_object_repeat_events_set(m_focusRingObject, true); - evas_object_color_set(m_focusRingObject, 0, 0, 0, 50); + Color focusRingColor = hitTestResultData.focusedColor; + evas_object_color_set(m_focusRingObject, focusRingColor.red(), focusRingColor.green(), focusRingColor.blue(), focusRingColor.alpha()); evas_object_move(m_focusRingObject, focusRingRect.x(), focusRingRect.y()); evas_object_resize(m_focusRingObject, focusRingRect.width(), focusRingRect.height()); evas_object_show(m_focusRingObject); diff --git a/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp b/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp index b64a9a5..cd91184 100755 --- a/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp +++ b/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp @@ -742,6 +742,8 @@ void WebPage::hitTestResultAtPoint(const IntPoint& point, int hitTestMode, WebHi #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING) hitTestResultData.focusedRect = getFocusedRect(hitTestResult, m_page.get()); + if (hitTestResult.innerNode() && hitTestResult.innerNode()->renderer() && hitTestResult.innerNode()->renderer()->style()) + hitTestResultData.focusedColor = hitTestResult.innerNode()->renderer()->style()->tapHighlightColor(); #endif if (hitTestResultData.hitTestMode & WebHitTestResult::HitTestModeNodeData) { -- 2.7.4