[webkit-reviews] review denied: [Bug 109422] [Qt] Add Page Visibility API support : [Attachment 208125] New QWebPage API (with test): void QWebPage::setVisibilityState(QWebPage::PageVisibilityState state) (3)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 5 08:36:51 PDT 2013
Jocelyn Turcotte <jocelyn.turcotte at digia.com> has denied Benjamin Dupont
<bdupont at nds.com>'s request for review:
Bug 109422: [Qt] Add Page Visibility API support
https://bugs.webkit.org/show_bug.cgi?id=109422
Attachment 208125: New QWebPage API (with test): void
QWebPage::setVisibilityState(QWebPage::PageVisibilityState state) (3)
https://bugs.webkit.org/attachment.cgi?id=208125&action=review
------- Additional Comments from Jocelyn Turcotte <jocelyn.turcotte at digia.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=208125&action=review
> Source/WebKit/qt/ChangeLog:3
> + [Qt] Add Page Visibility API support
Ideally this patch should also enable PAGE_VISIBILITY_API by default in the
build, but this can also be done in a separate patch as long as you do it soon.
> Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp:159
> + result = WebCore::PageVisibilityStatePrerender;
> + break;
you can replace the temporary result variable by "return
WebCore::PageVisibilityStatePrerender;" directly and also remove the breaks and
the final return.
> Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp:247
> +
page->setVisibilityState(webPageVisibilityStateToWebCoreVisibilityState(m_visib
ilityState), true);
Page::m_visibilityState is already initialized to PageVisibilityStateVisible,
I'm not sure I see a use for this.
> Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp:339
> + if (!page)
> + return;
By looking at the rest of the code I'd say that you can expect page to be
non-null here, am I right?
> Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp:349
> + return m_visibilityState;
Why not use WebCore::Page::visibilityState() directly instead?
> Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.h:136
> + // Must match with values of PageVisibilityState enum from
PageVisibilityState.h.
It's not true anymore, it must however match QWebPage::PageVisibilityState.
> Source/WebKit/qt/WidgetApi/qwebpage.cpp:3142
> + Returns the current page visibility state of the current page.
"of the current page" is unneeded extra information. I think it's obvious.
> Source/WebKit/qt/WidgetApi/qwebpage.cpp:3152
> + This method is used to change the page visibility state of the current
page.
ditto
> Source/WebKit/qt/WidgetApi/qwebpage.cpp:3153
> + It should be called by Qt applications who want to notify Javascript
application
grammar: "JavaScript applications" or "the JavaScript application"
> Source/WebKit/qt/WidgetApi/qwebpage.cpp:3154
> + that the visibility state has changed (eg. by reimplementing setVisible
function of QWidget).
- eg. --> e.g.
- "the setVisible function" or simply "QWidget::setVisible" (the later should
also add a link automatically in the doc)
The rest of the method documentaion is pretty good and descriptive :)
> Source/WebKit/qt/WidgetApi/qwebpage.h:220
> + enum PageVisibilityState {
VisibilityState would be fine and match with the property name. "Page" isn't
helpful here.
More information about the webkit-reviews
mailing list