Bug 37013 - [Chromium] The popup type (select or suggestion) should be passed to the WebClient::createPopupMenu() method
Summary: [Chromium] The popup type (select or suggestion) should be passed to the WebC...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Jay Campan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-01 23:59 PDT by Jay Campan
Modified: 2010-04-02 12:12 PDT (History)
5 users (show)

See Also:


Attachments
Adding the popup type to the WebClient::createPopupMenu() method (7.66 KB, patch)
2010-04-02 00:13 PDT, Jay Campan
abarth: review-
Details | Formatted Diff | Diff
Fixed style issues (7.85 KB, patch)
2010-04-02 00:30 PDT, Jay Campan
abarth: review-
Details | Formatted Diff | Diff
Fixed compilation issue and cleaned-up (4.57 KB, patch)
2010-04-02 09:47 PDT, Jay Campan
no flags Details | Formatted Diff | Diff
Added missing file... (6.71 KB, patch)
2010-04-02 09:51 PDT, Jay Campan
fishd: review+
fishd: commit-queue-
Details | Formatted Diff | Diff
Applied fishd suggested changes (6.68 KB, patch)
2010-04-02 10:06 PDT, Jay Campan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jay Campan 2010-04-01 23:59:21 PDT
Chromium on Linux needs to know when it displays a popup whether it is a select or a autofill/autocomplete.
For that reason, the popup type (select or suggestion) should be passed to the WebClient::createPopupMenu() method.
Comment 1 Jay Campan 2010-04-02 00:13:49 PDT
Created attachment 52389 [details]
Adding the popup type to the WebClient::createPopupMenu() method
Comment 2 WebKit Review Bot 2010-04-02 00:16:04 PDT
Attachment 52389 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebKit/chromium/src/ChromeClientImpl.cpp:705:  A case label should not be indented, but line up with its switch statement.  [whitespace/indent] [4]
WebKit/chromium/public/WebPopupType.h:1:  One or more unexpected \r (^M) found; better to use only a \n  [whitespace/carriage_return] [1]
Suppressing further [whitespace/carriage_return] reports for this file.
Total errors found: 45 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 WebKit Review Bot 2010-04-02 00:23:32 PDT
Attachment 52389 [details] did not build on chromium:
Build output: http://webkit-commit-queue.appspot.com/results/1658102
Comment 4 Adam Barth 2010-04-02 00:26:19 PDT
Comment on attachment 52389 [details]
Adding the popup type to the WebClient::createPopupMenu() method

Looks like this patch could use a tune-up.
Comment 5 Jay Campan 2010-04-02 00:30:41 PDT
Created attachment 52395 [details]
Fixed style issues
Comment 6 WebKit Review Bot 2010-04-02 00:35:18 PDT
Attachment 52395 [details] did not build on chromium:
Build output: http://webkit-commit-queue.appspot.com/results/1614186
Comment 7 Adam Barth 2010-04-02 09:41:50 PDT
Comment on attachment 52395 [details]
Fixed style issues

This patch doesn't compile.

Also, we'll need fishd to review changes to the WebKit API.
Comment 8 Jay Campan 2010-04-02 09:47:49 PDT
Created attachment 52418 [details]
Fixed compilation issue and cleaned-up
Comment 9 Jay Campan 2010-04-02 09:51:00 PDT
Created attachment 52419 [details]
Added missing file...
Comment 10 Darin Fisher (:fishd, Google) 2010-04-02 09:53:46 PDT
Comment on attachment 52419 [details]
Added missing file...

> Index: WebKit/chromium/public/WebPopupType.h
...
> + * Copyright (C) 2009 Google Inc. All rights reserved.

2009 -> 2010


> Index: WebKit/chromium/src/ChromeClientImpl.cpp
...
> +namespace {
> +
> +// Converts a WebCore::PopupContainerType to a WebKit::WebPopupType.
> +WebKit::WebPopupType convertPopupType(WebCore::PopupContainer::PopupType type)
> +{
> +    switch (type) {
> +    case PopupContainer::Select:
> +        return WebKit::WebPopupTypeSelect;
> +    case PopupContainer::Suggestion:
> +        return WebKit::WebPopupTypeSuggestion;
> +    default:
> +        ASSERT_NOT_REACHED();
> +        return WebKit::WebPopupTypeNone;
> +    }
> +}
> +
> +} // namespace
> +
>  namespace WebKit {

In webkit code, it would be more commonplace for convertPopupType to be
a static method in the WebKit namespace.  Then you can do away with the
WebKit:: prefix, and you can also do away with the WebCore:: prefix due
to the using declaration at the top of this file.


> +        // TODO(jcivelli): Remove the deprecated methods once the Chromium side
> +        //                 use the new method.

nit: WebKit style is to just add a FIXME comment without the (username) bit.

R=me otherwise.  Please fix these nits before committing.
Comment 11 Jay Campan 2010-04-02 10:06:59 PDT
Created attachment 52420 [details]
Applied fishd suggested changes
Comment 12 WebKit Commit Bot 2010-04-02 12:11:56 PDT
Comment on attachment 52420 [details]
Applied fishd suggested changes

Clearing flags on attachment: 52420

Committed r57014: <http://trac.webkit.org/changeset/57014>
Comment 13 WebKit Commit Bot 2010-04-02 12:12:02 PDT
All reviewed patches have been landed.  Closing bug.