Bug 74080 - Upsteam the Qt changes to the EditorState
Summary: Upsteam the Qt changes to the EditorState
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-08 05:28 PST by Kenneth Rohde Christiansen
Modified: 2011-12-08 14:02 PST (History)
8 users (show)

See Also:


Attachments
Patch (13.06 KB, patch)
2011-12-08 05:29 PST, Kenneth Rohde Christiansen
gustavo.noronha: commit-queue-
Details | Formatted Diff | Diff
Patch (16.82 KB, patch)
2011-12-08 05:42 PST, Kenneth Rohde Christiansen
hausmann: review+
hausmann: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Rohde Christiansen 2011-12-08 05:28:50 PST
SSIA
Comment 1 Kenneth Rohde Christiansen 2011-12-08 05:29:43 PST
Created attachment 118369 [details]
Patch
Comment 2 Collabora GTK+ EWS bot 2011-12-08 05:38:42 PST
Comment on attachment 118369 [details]
Patch

Attachment 118369 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/10800213
Comment 3 Kenneth Rohde Christiansen 2011-12-08 05:40:34 PST
kling help me you xcode expert you...
Comment 4 Kenneth Rohde Christiansen 2011-12-08 05:42:25 PST
Created attachment 118373 [details]
Patch

Forgot to add the file :-)
Comment 5 Simon Hausmann 2011-12-08 06:24:51 PST
Comment on attachment 118373 [details]
Patch

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.get()));
> -        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.
Comment 6 Kenneth Rohde Christiansen 2011-12-08 06:27:36 PST
Comment on attachment 118373 [details]
Patch

Landed in r102334
Comment 8 Simon Hausmann 2011-12-08 08:08:00 PST
I think I fixed that in http://trac.webkit.org/changeset/102341

Gotta run. Can somebody close this bug report after checking the bot results? thanks :)
Comment 9 Csaba Osztrogonác 2011-12-08 08:18:41 PST
(In reply to comment #8)
> I think I fixed that in http://trac.webkit.org/changeset/102341
> 
> Gotta run. Can somebody close this bug report after checking the bot results? thanks :)

Yes, it fixed the bug.
Comment 10 Kenneth Rohde Christiansen 2011-12-08 14:02:11 PST
(In reply to comment #7)
> It made 9 editing tests crash: http://build.webkit.sed.hu/results/x86-32%20Linux%20Qt%20Release%20WebKit2/r102334%20%2816707%29/results.html

I wonder if those are due to full document editing... need to have a look at that some time.