[Title] Remove focus ring from unfocusable element.
[Issue#] N_SE-54263
[Problem] Focus ring appeared on unfocusable element.
[Cause] Show focus ring forcely when focus ui mode was enabled.
[Solution] Initialize focused node when focus ui mode was enabled.
Change-Id: I8d07c9b7b00bd33be3d5aff24dd35138c33fe696
#if ENABLE(TIZEN_FOCUS_UI)
if (type == EWK_TOUCH_START)
- impl->page()->setSpatialNavigationEnabled(false);
+ impl->page()->setFocusUIEnabled(false);
#endif
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) && ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
, m_contentSuspendedByInspector(false)
#endif
#if ENABLE(TIZEN_FOCUS_UI)
- , m_spatialNavigationEnabled(false)
+ , m_focusUIEnabled(false)
#endif
{
#ifndef NDEBUG
#endif
#if ENABLE(TIZEN_FOCUS_UI)
- void setSpatialNavigationEnabled(bool);
+ void setFocusUIEnabled(bool);
#endif
private:
#endif
#if ENABLE(TIZEN_FOCUS_UI)
- bool m_spatialNavigationEnabled;
+ bool m_focusUIEnabled;
#endif
};
EwkViewImpl::pages(pages);
for (size_t i = 0; i < pages.size(); ++i)
- pages[i]->setSpatialNavigationEnabled(false);
+ pages[i]->setFocusUIEnabled(false);
}
#endif
} else {
{
#if ENABLE(TIZEN_FOCUS_UI)
if (s_shouldUseExternalKeyboard && strncmp(downEvent->keyname, "XF86", 4))
- m_viewImpl->page()->setSpatialNavigationEnabled(true);
+ m_viewImpl->page()->setFocusUIEnabled(true);
#endif
#if ENABLE(TIZEN_ISF_PORT)
#endif
#if ENABLE(TIZEN_FOCUS_UI)
- m_viewImpl->page()->setSpatialNavigationEnabled(false);
+ m_viewImpl->page()->setFocusUIEnabled(false);
#endif
if (!m_context || !m_focused)
canUpdate |= ScreenReaderProxy::screenReader().isActive(viewImpl);
#endif
#if ENABLE(TIZEN_FOCUS_UI)
- canUpdate |= m_spatialNavigationEnabled;
+ canUpdate |= m_focusUIEnabled;
#endif
if (canUpdate)
#endif
#if ENABLE(TIZEN_FOCUS_UI)
-void WebPageProxy::setSpatialNavigationEnabled(bool enabled)
+void WebPageProxy::setFocusUIEnabled(bool enabled)
{
- if (m_spatialNavigationEnabled == enabled)
+ if (m_focusUIEnabled == enabled)
return;
- m_spatialNavigationEnabled = enabled;
+ m_focusUIEnabled = enabled;
if (enabled)
static_cast<PageClientImpl*>(m_pageClient)->viewImpl()->focusRing()->setImage(FOCUS_UI_FOCUS_RING_IMAGE_PATH, 4, 2);
else
static_cast<PageClientImpl*>(m_pageClient)->viewImpl()->focusRing()->setImage(String(), 0, 0);
- process()->send(Messages::WebPage::SetSpatialNavigationEnabled(enabled), m_pageID);
+ process()->send(Messages::WebPage::SetFocusUIEnabled(enabled), m_pageID);
}
#endif
} // namespace WebKit
#endif
#if ENABLE(TIZEN_FOCUS_UI)
- void setSpatialNavigationEnabled(bool);
+ void setFocusUIEnabled(bool);
#endif
private:
#endif
#if ENABLE(TIZEN_FOCUS_UI)
- SetSpatialNavigationEnabled(bool enabled)
+ SetFocusUIEnabled(bool enabled)
#endif
}
}
#if ENABLE(TIZEN_FOCUS_UI)
-void WebPage::setSpatialNavigationEnabled(bool enabled)
+void WebPage::setFocusUIEnabled(bool enabled)
{
m_page->settings()->setSpatialNavigationEnabled(enabled);
PlatformMouseEvent fakeMouseMove(IntPoint(-1, -1), IntPoint(-1, -1), NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime());
frame->eventHandler()->mouseMoved(fakeMouseMove);
}
+ setFocusedNode(frame && frame->document() ? frame->document()->focusedNode() : 0);
} else
setFocusedNode(0);
}