#endif
#if OS(TIZEN)
- void didChangeContents(const WebCore::IntRect&);
+ void didChangeContents();
#endif
#if ENABLE(TIZEN_FOCUS_UI)
#endif
#if ENABLE(TIZEN_ISF_PORT)
- void updateEditorStateRect(const WebCore::Frame*, EditorState&) const;
+ bool updateEditorStateRect(const WebCore::Frame*, EditorState&) const;
#endif
#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
frame->editor()->deleteWithDirection(DirectionBackward, CharacterGranularity, false, true);
}
-void WebPage::updateEditorStateRect(const Frame* frame, EditorState& state) const
+bool WebPage::updateEditorStateRect(const Frame* frame, EditorState& state) const
{
ASSERT(frame->selection()->rootEditableElement());
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
Vector<IntRect> rects;
calcFocusedRects(frame->selection()->rootEditableElement(), rects);
- state.editorRect = unionRect(rects);
+ IntRect rect = unionRect(rects);
+ if (state.editorRect == rect)
+ return false;
+
+ state.editorRect = rect;
#endif
if (frame->selection()->isCaret())
state.selectionRect = frame->view()->contentsToWindow(frame->selection()->absoluteCaretBounds());
else if (frame->selection()->isRange())
state.selectionRect = frame->view()->contentsToWindow(enclosingIntRect(frame->selection()->bounds(false)));
+
+ return true;
}
#endif
}
#endif
-void WebPage::didChangeContents(const IntRect& rect)
+void WebPage::didChangeContents()
{
if (!m_page)
return;
return;
#if ENABLE(TIZEN_ISF_PORT) || ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
- if (m_editorState.isContentEditable && rect.intersects(m_editorState.editorRect) && frame->selection()->rootEditableElement()) {
- IntRect previousEditorRect = m_editorState.editorRect;
- updateEditorStateRect(frame, m_editorState);
-
- if (m_editorState.editorRect != previousEditorRect) {
- m_editorState.updateEditorRectOnly = true;
- send(Messages::WebPageProxy::EditorStateChanged(m_editorState));
- }
+ if (m_editorState.isContentEditable && frame->selection()->rootEditableElement() && updateEditorStateRect(frame, m_editorState)) {
+ m_editorState.updateEditorRectOnly = true;
+ send(Messages::WebPageProxy::EditorStateChanged(m_editorState));
}
#endif