feedTouchEvents(type);
}
#endif
-
-void EwkViewImpl::didChangeScrollAndScale(const WebCore::IntPoint& previousScrollPosition, float previousScale)
-{
-#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
- if (!focusRing)
- return;
-
- if (!focusRing->rect().isEmpty())
- focusRing->updateScrollAndScale(previousScrollPosition, previousScale);
-#endif
-}
#endif //#if OS(TIZEN)
#if ENABLE(TOUCH_EVENTS) && ENABLE(TIZEN_GESTURE)
void feedTouchEventsByType(Ewk_Touch_Event_Type);
#endif
-
- void didChangeScrollAndScale(const WebCore::IntPoint&, float);
#endif
// FIXME: Make members private for encapsulation.
#include "ewk_context_private.h"
#endif
+#if ENABLE(TIZEN_SCREEN_READER)
+#include "ScreenReaderProxy.h"
+#endif
+
using namespace WebCore;
using namespace std;
#else
m_viewImpl->redrawRegion(rect);
#endif
+
+#if ENABLE(TIZEN_SCREEN_READER)
+ if (rect.intersects(ewkViewGetFocusRing(m_viewImpl->view())->rect()))
+ m_viewImpl->page()->recalcScreenReaderFocusRect();
+#endif
}
void PageClientImpl::displayView()
void PageClientImpl::setVisibleContentRect(const IntRect& newRect, float newScale, const FloatPoint& trajectory)
{
-#if OS(TIZEN)
+#if ENABLE(TIZEN_SCREEN_READER)
IntPoint previousScrollPosition(scrollPosition());
float previousScale = m_scaleFactor;
#endif
#endif
displayViewport();
-#if OS(TIZEN)
- if (scrollPosition() != previousScrollPosition || m_scaleFactor != previousScale)
- m_viewImpl->didChangeScrollAndScale(previousScrollPosition, previousScale);
+#if ENABLE(TIZEN_SCREEN_READER)
+ if (ScreenReaderProxy::screenReader().isEnabled()
+ && (scrollPosition() != previousScrollPosition || m_scaleFactor != previousScale))
+ ewkViewGetFocusRing(m_viewImpl->view())->updateScrollAndScale(previousScrollPosition, previousScale);
#endif
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
#if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
updateScrollbar();
#endif
+
+#if ENABLE(TIZEN_SCREEN_READER)
+ m_viewImpl->page()->recalcScreenReaderFocusRect();
+#endif
}
void PageClientImpl::drawContents()
#endif
drawContents();
m_viewImpl->redrawRegion(rect);
+
+#if ENABLE(TIZEN_SCREEN_READER)
+ if (rect.intersects(ewkViewGetFocusRing(m_viewImpl->view())->rect()))
+ m_viewImpl->page()->recalcScreenReaderFocusRect();
+#endif
}
void PageClientEvasGL::displayViewport()
#if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
updateScrollbar();
#endif
+
+#if ENABLE(TIZEN_SCREEN_READER)
+ m_viewImpl->page()->recalcScreenReaderFocusRect();
+#endif
}
void PageClientEvasGL::drawContents()
#if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
impl->pageClient->frameRectChanged();
#endif
+#if ENABLE(TIZEN_SCREEN_READER)
+ impl->pageProxy->recalcScreenReaderFocusRect();
+#endif
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
impl->pageClient->updateTextSelectionHandlesAndContextMenu(true);
#endif
void InputMethodContextEfl::updateTextInputState()
{
const EditorState& editor = m_viewImpl->page()->editorState();
- if (editor.shouldIgnoreCompositionSelectionChange || editor.updateEditorRectOnly)
+ if (editor.shouldIgnoreCompositionSelectionChange)
return;
if (editor.isContentEditable && m_useInputMethod)
if (dirtyRect.isEmpty())
return;
-#if OS(TIZEN)
- m_webPage->didChangeContents(dirtyRect);
-#endif
-
if (m_layerTreeHost) {
ASSERT(m_dirtyRegion.isEmpty());
if (!m_isPaintingEnabled)
return;
-#if OS(TIZEN)
- m_webPage->didChangeContents(scrollRect);
-#endif
-
if (m_layerTreeHost) {
ASSERT(m_scrollRect.isEmpty());
ASSERT(m_scrollOffset.isEmpty());
void useSettingsFont();
#endif
-#if OS(TIZEN)
- void didChangeContents(const WebCore::IntRect&);
-#endif
-
private:
WebPage(uint64_t pageID, const WebPageCreationParameters&);
frame->eventHandler()->handleTouchEvent(platform(touchEndEvent));
}
-static void sendScreenReaderFocusRect(WebPage* page, ScreenReader* screenReader)
+static void sendScreenReaderFocusRect(WebPage* page, Node* node)
{
- Node* node = screenReader->getFocusedNode();
- IntRect rect;
-
- if (node) {
- bool isImage = false;
- if (node->isElementNode()) {
- Element* element = static_cast<Element*>(node);
- isImage = !element->getAttribute(element->imageSourceAttributeName()).isEmpty();
- }
- rect = getNodeRect(node, node, isImage);
+ bool isImage = false;
+ if (node->isElementNode()) {
+ Element* element = static_cast<Element*>(node);
+ isImage = !element->getAttribute(element->imageSourceAttributeName()).isEmpty();
}
- screenReader->setFocusedRect(rect);
- page->send(Messages::WebPageProxy::DidScreenReaderFocusRectChanged(rect));
+ page->send(Messages::WebPageProxy::DidScreenReaderFocusRectChanged(getNodeRect(node, node, isImage)));
}
void WebPage::moveScreenReaderFocus(bool forward, bool& result)
if (!m_screenReader)
m_screenReader = ScreenReader::create(this);
- result = m_screenReader->moveFocus(forward);
- sendScreenReaderFocusRect(this, m_screenReader.get());
+ if (!m_screenReader->moveFocus(forward)) {
+ result = false;
+ send(Messages::WebPageProxy::DidScreenReaderFocusRectChanged(IntRect()));
+ return;
+ } else {
+ result = true;
+ sendScreenReaderFocusRect(this, m_screenReader->getFocusedNode());
+ }
}
void WebPage::moveScreenReaderFocusByPoint(const IntPoint& point)
if (!m_screenReader->moveFocus(point))
return;
- sendScreenReaderFocusRect(this, m_screenReader.get());
+ sendScreenReaderFocusRect(this, m_screenReader->getFocusedNode());
}
void WebPage::recalcScreenReaderFocusRect()
if (!m_screenReader || !m_screenReader->getFocusedNode())
return;
- sendScreenReaderFocusRect(this, m_screenReader.get());
+ sendScreenReaderFocusRect(this, m_screenReader->getFocusedNode());
}
void WebPage::updateScreenReaderFocus(RenderObject* object)
else if (!m_screenReader->rendererWillBeDestroyed(object))
return;
- sendScreenReaderFocusRect(this, m_screenReader.get());
+ send(Messages::WebPageProxy::DidScreenReaderFocusRectChanged(IntRect()));
}
void WebPage::clearScreenReader()
frameView->forceLayout();
}
#endif
-
-void WebPage::didChangeContents(const IntRect& rect)
-{
-#if ENABLE(TIZEN_ISF_PORT)
- if (m_editorState.isContentEditable && rect.intersects(m_editorState.editorRect)) {
- m_editorState = editorState();
- m_editorState.updateEditorRectOnly = true;
- send(Messages::WebPageProxy::EditorStateChanged(m_editorState));
- }
-#endif
-
-#if ENABLE(TIZEN_SCREEN_READER)
- if (m_screenReader && rect.intersects(m_screenReader->focusedRect()))
- recalcScreenReaderFocusRect();
-#endif
-}
#endif // #if OS(TIZEN)
} // namespace WebKit
void ScreenReader::clearFocus()
{
m_focusedObject = 0;
- m_focusedRect = IntRect();
m_hasFocus = false;
m_page->send(Messages::WebPageProxy::DidScreenReaderTextChanged(emptyString()));
}
bool rendererWillBeDestroyed(WebCore::RenderObject*);
void clearFocus();
- const WebCore::IntRect& focusedRect() const { return m_focusedRect; }
- void setFocusedRect(const WebCore::IntRect& rect) { m_focusedRect = rect; }
-
private:
ScreenReader(WebPage*);
WebPage* m_page;
WebCore::RenderObject* m_focusedObject;
- WebCore::IntRect m_focusedRect;
bool m_hasFocus;
bool m_isForward;