WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
72910
[Qt] [WK2] Move PageUIClient related code to QtWebPageUIClient
https://bugs.webkit.org/show_bug.cgi?id=72910
Summary
[Qt] [WK2] Move PageUIClient related code to QtWebPageUIClient
Caio Marcelo de Oliveira Filho
Reported
2011-11-21 13:43:01 PST
[Qt] [WK2] Move PageUIClient related code to QtWebPageUIClient
Attachments
Patch
(23.28 KB, patch)
2011-11-21 13:52 PST
,
Caio Marcelo de Oliveira Filho
no flags
Details
Formatted Diff
Diff
Patch
(23.16 KB, patch)
2011-11-21 20:59 PST
,
Caio Marcelo de Oliveira Filho
no flags
Details
Formatted Diff
Diff
Patch
(23.02 KB, patch)
2011-11-21 23:28 PST
,
Caio Marcelo de Oliveira Filho
kling
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Caio Marcelo de Oliveira Filho
Comment 1
2011-11-21 13:52:58 PST
Created
attachment 116129
[details]
Patch
Andreas Kling
Comment 2
2011-11-21 14:41:12 PST
Comment on
attachment 116129
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=116129&action=review
Love it! r=me with some nitpicking.
> Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h:115 > + // FIXME: Remove scoped pointer when possible.
When will this be possible?
> Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h:116 > + QScopedPointer<QtWebPageUIClient> m_pageUIClient;
Per Qt API style, this member should not have the "m_" prefix.
> Source/WebKit2/UIProcess/qt/QtWebPageUIClient.cpp:95 > + if (!wkSelectedFileNames.isEmpty())
This check can be removed.
> Source/WebKit2/UIProcess/qt/QtWebPageUIClient.cpp:96 > + for (unsigned i = 0; wkSelectedFileNames.size(); ++i)
Vector::size() returns size_t, not unsigned.
> Source/WebKit2/UIProcess/qt/QtWebPageUIClient.h:39 > + // WKPageUIClient callbacks.
Let's make these private instead of public.
> Source/WebKit2/UIProcess/qt/QtWebPageUIClient.h:43 > + static void setStatusText(WKPageRef, WKStringRef text, const void *clientInfo);
Nit: The 'text' argument name is unnecessary.
> Source/WebKit2/UIProcess/qt/QtWebPageUIClient.h:49 > + void runJavaScriptAlert(const QString& alertText); > + bool runJavaScriptConfirm(const QString& message); > + QString runJavaScriptPrompt(const QString& message, const QString& defaultValue, bool& ok);
Nit: The 'alertText' argument name should probably also be called 'message'.
Rafael Brandao
Comment 3
2011-11-21 14:51:55 PST
Comment on
attachment 116129
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=116129&action=review
>> Source/WebKit2/UIProcess/qt/QtWebPageUIClient.cpp:96 >> + for (unsigned i = 0; wkSelectedFileNames.size(); ++i) > > Vector::size() returns size_t, not unsigned.
I don't get this line. This is an infinite loop isn't? Probably missing the for condition "i < wkSelectedFileNames.size()".
Caio Marcelo de Oliveira Filho
Comment 4
2011-11-21 20:59:55 PST
Created
attachment 116175
[details]
Patch
Caio Marcelo de Oliveira Filho
Comment 5
2011-11-21 21:06:14 PST
Comment on
attachment 116129
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=116129&action=review
>> Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h:115 >> + // FIXME: Remove scoped pointer when possible. > > When will this be possible?
I had the plan of making this object directly a member instead of (smart)pointer. For this to happen, we need to make sure we can create the QtWebPageProxy in the initalization list. But this is an unrelated change, let's not do it now.
>> Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h:116 >> + QScopedPointer<QtWebPageUIClient> m_pageUIClient; > > Per Qt API style, this member should not have the "m_" prefix.
Fixed.
>> Source/WebKit2/UIProcess/qt/QtWebPageUIClient.cpp:95 >> + if (!wkSelectedFileNames.isEmpty()) > > This check can be removed.
Fixed. Note that this and next comment refer to code in functions that were just moved from QtWebPageProxy. I fixed them anyway.
>>> Source/WebKit2/UIProcess/qt/QtWebPageUIClient.cpp:96 >>> + for (unsigned i = 0; wkSelectedFileNames.size(); ++i) >> >> Vector::size() returns size_t, not unsigned. > > I don't get this line. This is an infinite loop isn't? Probably missing the for condition "i < wkSelectedFileNames.size()".
Fixed the size_t and the bug, nice catch Rafael :-)
>> Source/WebKit2/UIProcess/qt/QtWebPageUIClient.h:39 >> + // WKPageUIClient callbacks. > > Let's make these private instead of public.
Fixed.
>> Source/WebKit2/UIProcess/qt/QtWebPageUIClient.h:43 >> + static void setStatusText(WKPageRef, WKStringRef text, const void *clientInfo); > > Nit: The 'text' argument name is unnecessary.
Fixed.
>> Source/WebKit2/UIProcess/qt/QtWebPageUIClient.h:49 >> + QString runJavaScriptPrompt(const QString& message, const QString& defaultValue, bool& ok); > > Nit: The 'alertText' argument name should probably also be called 'message'.
Fixed.
Caio Marcelo de Oliveira Filho
Comment 6
2011-11-21 23:28:52 PST
Created
attachment 116181
[details]
Patch
Alexis Menard (darktears)
Comment 7
2011-11-22 03:33:50 PST
(In reply to
comment #3
)
> (From update of
attachment 116129
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=116129&action=review
> > >> Source/WebKit2/UIProcess/qt/QtWebPageUIClient.cpp:96 > >> + for (unsigned i = 0; wkSelectedFileNames.size(); ++i) > > > > Vector::size() returns size_t, not unsigned. > > I don't get this line. This is an infinite loop isn't? Probably missing the for condition "i < wkSelectedFileNames.size()".
I remembered you ran the API tests. We do have an awesome coverage :D. ahaha
Caio Marcelo de Oliveira Filho
Comment 8
2011-11-22 04:03:38 PST
(In reply to
comment #7
)
> I remembered you ran the API tests. We do have an awesome coverage :D. ahaha
This will be easier to test when we move to QML for the file selection dialog. Stay tuned ;)
Andreas Kling
Comment 9
2011-11-22 04:14:13 PST
Comment on
attachment 116181
[details]
Patch Woosh!
Caio Marcelo de Oliveira Filho
Comment 10
2011-11-22 05:21:58 PST
Committed
r100990
: <
http://trac.webkit.org/changeset/100990
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug