Bug 52010 - [Qt] Plugin API to support platform's input widgets.
Summary: [Qt] Plugin API to support platform's input widgets.
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2011-01-06 12:43 PST by Ragner Magalhaes
Modified: 2014-02-03 03:17 PST (History)
7 users (show)

See Also:


Attachments
Patch 01 (18.24 KB, patch)
2011-01-06 16:01 PST, Ragner Magalhaes
kling: review-
Details | Formatted Diff | Diff
Color plugin (64.93 KB, image/png)
2011-01-06 16:02 PST, Ragner Magalhaes
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ragner Magalhaes 2011-01-06 12:43:20 PST
On mobile platforms, QtWebKit should enable the user to bring up the platform's date, time or date and time picker widgets.
Comment 1 Kenneth Rohde Christiansen 2011-01-06 12:52:06 PST
We kind of support this with WebKit2 already, by adding some additional InputMethodHints. The user than then reimplement:

virtual void	inputMethodEvent ( QInputMethodEvent * event )

and popup the pickers, sending events just like the virtual keyboard (they are input fields after all)
Comment 2 Ragner Magalhaes 2011-01-06 16:01:16 PST
Created attachment 78185 [details]
Patch 01
Comment 3 Ragner Magalhaes 2011-01-06 16:02:10 PST
Created attachment 78186 [details]
Color plugin
Comment 4 Andreas Kling 2011-04-26 15:44:04 PDT
Comment on attachment 78185 [details]
Patch 01

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

I really don't like using strings for determining the tag names and input types, can we extend QWebElement to expose the WebCore InputType somehow?

> WebKit/qt/Api/qwebkitplatformplugin.h:122
> +    virtual ~QWebInputView() {}

Coding style, {} -> { }

> WebKit/qt/Api/qwebkitplatformplugin.h:125
> +    virtual void setWebElement(QWebElement) = 0;

QWebElement -> const QWebElement&

> WebKit/qt/WebCoreSupport/ChromeClientQt.cpp:691
> +    if (element.isNull() || element.tagName() != "INPUT")

"INPUT" should be wrapped in a QLatin1String. Also, the tagName() may not be all-uppercase, in non-HTML documents for example.

> WebKit/qt/WebCoreSupport/ChromeClientQt.cpp:696
> +    QWebInputView* result = 0;
> +
> +    result = m_platformPlugin.createInputView(element.attribute("type"));

No need for the temporary 0 assignment.
"type" should be wrapped in a QLatin1String.

> WebKit/qt/WebCoreSupport/ChromeClientQt.h:188
> +        QWebInputView *createInputView(QWebElement) const;

QWebElement -> const QWebElement&
Comment 5 Jocelyn Turcotte 2014-02-03 03:17:09 PST
=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.