Bug 76174 - [Qt] Zoom in to the focused node only when vkb starts becoming visible
Summary: [Qt] Zoom in to the focused node only when vkb starts becoming visible
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kenneth Rohde Christiansen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-12 07:06 PST by Kenneth Rohde Christiansen
Modified: 2012-01-18 07:37 PST (History)
3 users (show)

See Also:


Attachments
Patch (9.58 KB, patch)
2012-01-12 07:08 PST, Kenneth Rohde Christiansen
no flags Details | Formatted Diff | Diff
Patch (9.61 KB, patch)
2012-01-13 02:15 PST, Kenneth Rohde Christiansen
no flags Details | Formatted Diff | Diff
Patch (10.65 KB, patch)
2012-01-13 04:11 PST, Kenneth Rohde Christiansen
hausmann: review+
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 2012-01-12 07:06:59 PST
SSIA
Comment 1 Kenneth Rohde Christiansen 2012-01-12 07:08:28 PST
Created attachment 122236 [details]
Patch
Comment 2 Simon Hausmann 2012-01-12 07:12:42 PST
Comment on attachment 122236 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=122236&action=review

> Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp:442
> +void QtWebPageEventHandler::inputPanelVisibleChanged()
> +{
> +    if (!m_interactionEngine || !qApp->inputPanel()->visible())
> +        return;
> +
> +    const EditorState& editor = m_webPageProxy->editorState();
> +    m_interactionEngine->focusEditableArea(QRectF(editor.cursorRect), QRectF(editor.editorRect));

You're unconditionally connecting to the inputPanel's signal. Shouldn't the focusEditableArea call only be done if we have the focus? Perhaps we should also only connect when we receive focus and disconnect when we loose it?
Comment 3 Kenneth Rohde Christiansen 2012-01-12 07:13:38 PST
You are rigth, I will fix that!
Comment 4 Kenneth Rohde Christiansen 2012-01-13 02:15:14 PST
Created attachment 122399 [details]
Patch
Comment 5 Kenneth Rohde Christiansen 2012-01-13 04:11:31 PST
Created attachment 122408 [details]
Patch
Comment 6 Kenneth Rohde Christiansen 2012-01-18 07:37:49 PST
Landed in 105275