(object->*function)(replyArgs.argument1, replyArgs.argument2);
}
+template<typename C, typename MF, typename R1, typename R2, typename R3>
+void callMemberFunction(const Arguments0&, Arguments3<R1, R2, R3>& replyArgs, C* object, MF function)
+{
+ (object->*function)(replyArgs.argument1, replyArgs.argument2, replyArgs.argument3);
+}
+
template<typename C, typename MF, typename P1>
void callMemberFunction(const Arguments1<P1>& args, Arguments0&, C* object, MF function)
{
#endif
void editorStateChanged(const EditorState&);
-
// Back/Forward list management
void backForwardAddItem(uint64_t itemID);
void backForwardGoToItem(uint64_t itemID, SandboxExtension::Handle&);
return false;
bool result = false;
- process()->sendSync(Messages::WebPage::GetSelectionHandlers(), Messages::WebPage::GetSelectionHandlers::Reply(leftRect, rightRect), m_pageID);
+ IntRect updateEditorRect(0, 0, 0, 0);
+ process()->sendSync(Messages::WebPage::GetSelectionHandlers(), Messages::WebPage::GetSelectionHandlers::Reply(leftRect, rightRect, updateEditorRect), m_pageID);
if (!leftRect.size().isZero() || !rightRect.size().isZero())
result = true;
-
+ if(m_editorState.editorRect != updateEditorRect) {
+ m_editorState.editorRect = updateEditorRect;
+ m_editorState.updateEditorRectOnly = true;
+ }
return result;
}
void selectClosestWord(const WebCore::IntPoint&, bool& result);
void setLeftSelection(const WebCore::IntPoint&, const int direction, int& result);
void setRightSelection(const WebCore::IntPoint&, const int direction, int& result);
- void getSelectionHandlers(WebCore::IntRect& leftRect, WebCore::IntRect& rightRect);
+ void getSelectionHandlers(WebCore::IntRect& leftRect, WebCore::IntRect& rightRect, WebCore::IntRect& updateEditorRect);
void getSelectionText(String& result);
void selectionRangeClear(bool& result);
void selectionClearAllSelection(WebCore::Frame* frame);
SelectClosestWord(WebCore::IntPoint point) -> (bool result)
SetLeftSelection(WebCore::IntPoint point, int direction) -> (int result)
SetRightSelection(WebCore::IntPoint point, int direction) -> (int result)
- GetSelectionHandlers() -> (WebCore::IntRect leftRect, WebCore::IntRect rightRect)
+ GetSelectionHandlers() -> (WebCore::IntRect leftRect, WebCore::IntRect rightRect, WebCore::IntRect updateEditorRect)
GetSelectionText() -> (String result)
SelectionRangeClear() -> (bool result)
ScrollContentByCharacter(WebCore::IntPoint point, int direction) -> (bool result)
// This changes just the 'start' and 'end' positions of the VisibleSelection
// Find handlers positions
- IntRect leftRect, rightRect;
- getSelectionHandlers(leftRect, rightRect);
+ IntRect leftRect, rightRect, updatedEditorRect;
+ getSelectionHandlers(leftRect, rightRect, updatedEditorRect);
if (leftRect.size().isZero() && rightRect.size().isZero()) {
// Sometimes there is no selected text, but isNone() returns TRUE
// in this case ewk_frame_selection_handlers_get() returns FALSE and handlers are invalid
return;
IntPoint pos = frameView->windowToContents(point);
- IntRect leftRect, rightRect;
- getSelectionHandlers(leftRect, rightRect);
+ IntRect leftRect, rightRect, updatedEditorRect;
+ getSelectionHandlers(leftRect, rightRect, updatedEditorRect);
if (selectionEndNode->rendererIsEditable() && !selectionEndNode->rendererIsRichlyEditable()) {
const int boundariesWidth = 2;
}
}
-void WebPage::getSelectionHandlers(IntRect& leftRect, IntRect& rightRect)
+void WebPage::getSelectionHandlers(IntRect& leftRect, IntRect& rightRect, WebCore::IntRect& updatedEditorRect)
{
Frame* focusedFrame = m_page->focusController()->focusedOrMainFrame();
+ updatedEditorRect = m_editorState.editorRect;
if (!focusedFrame->selection()->isRange())
return;
calcFocusedRects(rootEditableElement, rects);
IntRect editorRect = unionRect(rects);
-#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
- if (m_editorState.editorRect != editorRect) {
- EditorState state = editorState();
- state.updateEditorRectOnly = true;
- setEditorState(state);
- send(Messages::WebPageProxy::EditorStateChanged(state));
- }
-#endif
-
+ if (m_editorState.editorRect != editorRect)
+ updatedEditorRect = editorRect;
if (leftRect.maxY() > editorRect.maxY()) {
leftRect.setY(editorRect.y());
leftRect.setHeight(editorRect.height());
}
}
}
-
// prevent from selecting zero-length selection
if (leftRect.x() == rightRect.x() + rightRect.width()
&& leftRect.y() == rightRect.y())