Bug 46039

Summary: [Qt] QtTestBrowser: Make nodesFromRect testable.
Product: WebKit Reporter: Antonio Gomes <tonikitoo>
Component: Tools / TestsAssignee: Antonio Gomes <tonikitoo>
Status: RESOLVED WONTFIX    
Severity: Normal CC: diegohcg, kenneth, luiz, webkit-ews
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on: 44088, 44089    
Bug Blocks: 40477    
Attachments:
Description Flags
patch v1 (it will fail to build until 44088 and 44089 land) kling: review-

Description Antonio Gomes 2010-09-18 09:30:08 PDT
Bug 44088 and bug 44089 are adding to QtWebKit and ability to make use of Document::nodesFromRect() to improve the touch experience on mobile devices.

To make it easier to validate the implementation of both bugs, I added testing support for it to the QtTestBrowser.
Comment 1 Antonio Gomes 2010-09-18 09:34:45 PDT
Created attachment 68012 [details]
patch v1 (it will fail to build until 44088 and 44089 land)
Comment 2 Early Warning System Bot 2010-09-18 17:31:31 PDT
Attachment 68012 [details] did not build on qt:
Build output: http://queues.webkit.org/results/4027062
Comment 3 Antonio Gomes 2010-09-18 17:39:57 PDT
(In reply to comment #2)
> Attachment 68012 [details] did not build on qt:
> Build output: http://queues.webkit.org/results/4027062

Expected
Comment 4 Andreas Kling 2010-10-06 20:49:40 PDT
Comment on attachment 68012 [details]
patch v1 (it will fail to build until 44088 and 44089 land)

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

> WebKitTools/QtTestBrowser/launcherwindow.cpp:88
> +    // Inspector set up.

setup

> WebKitTools/QtTestBrowser/launcherwindow.cpp:98
> +    // Zooming set up.

setup

> WebKitTools/QtTestBrowser/launcherwindow.cpp:358
> +    paddingNone->setChecked((m_windowOptions.tapPaddingArea == gTapPaddingAreaNone) ? true : false);

"? true : false" is redundant.

> WebKitTools/QtTestBrowser/launcherwindow.cpp:362
> +    padding10x10->setChecked((m_windowOptions.tapPaddingArea == gTapPaddingArea10x10) ? true : false);

Ditto.

> WebKitTools/QtTestBrowser/launcherwindow.cpp:366
> +    padding10x15->setChecked((m_windowOptions.tapPaddingArea == gTapPaddingArea10x15) ? true : false);

Ditto.

> WebKitTools/QtTestBrowser/launcherwindow.cpp:829
> +        QStringList size = padding.split("x");

I don't particularly like the name "size" for a string list.
Also, nit: padding.split('x') rather than padding.split("x")

> WebKitTools/QtTestBrowser/webview.cpp:249
> +    case QEvent::GraphicsSceneHoverLeave:
> +        if (m_showTapPaddingArea)
> +            moveMouseCursorOffscreen();
> +    default:

Missing break statement.