[webkit-reviews] review granted: [Bug 74080] Upsteam the Qt changes to the EditorState : [Attachment 118373] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 8 06:24:51 PST 2011


Simon Hausmann <hausmann at webkit.org> has granted Kenneth Rohde Christiansen
<kenneth at webkit.org>'s request for review:
Bug 74080: Upsteam the Qt changes to the EditorState
https://bugs.webkit.org/show_bug.cgi?id=74080

Attachment 118373: Patch
https://bugs.webkit.org/attachment.cgi?id=118373&action=review

------- Additional Comments from Simon Hausmann <hausmann at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=118373&action=review


r=me with one change

> Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp:193
> +    EditorState state = m_page->editorState();
>  
> -	   ExceptionCode ec = 0;
> -	   RefPtr<Range> tempRange = range->cloneRange(ec);
> -	   tempRange->setStart(tempRange->startContainer(ec),
tempRange->startOffset(ec) + location, ec);
> -	   IntRect caretRect =
frame->view()->contentsToWindow(frame->editor()->firstRectForRange(tempRange.ge
t()));
> -	   IntRect nodeRect =
frame->view()->contentsToWindow(scope->getRect());
> -
> -	   m_page->send(Messages::WebPageProxy::FocusEditableArea(caretRect,
nodeRect));
> -    }
> +#if PLATFORM(QT)
> +    if (Element* scope = frame->selection()->rootEditableElement())
> +	  
m_page->send(Messages::WebPageProxy::FocusEditableArea(state.microFocus,
scope->getRect()));
>  #endif
>  
>     
m_page->send(Messages::WebPageProxy::EditorStateChanged(m_page->editorState()))
;

The last call there should use the newly introduced state variable instead of
requesting editorState() again.


More information about the webkit-reviews mailing list