WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
129263
WebKitFindOptions shouldn't expose WEBKIT_FIND_OPTIONS_SHOW_{OVERLAY,FIND_INDICATOR,HIGHLIGHT}
https://bugs.webkit.org/show_bug.cgi?id=129263
Summary
WebKitFindOptions shouldn't expose WEBKIT_FIND_OPTIONS_SHOW_{OVERLAY,FIND_IND...
Enrique Ocaña
Reported
2014-02-24 11:48:40 PST
The values mentioned in the summary are used only for internal operations and shouldn't be available to API users in Source/WebKit2/UIProcess/API/gtk/WebKitFindController.h
Attachments
Patch
(8.75 KB, patch)
2014-02-24 12:05 PST
,
Enrique Ocaña
no flags
Details
Formatted Diff
Diff
Patch
(8.68 KB, patch)
2014-02-25 11:10 PST
,
Enrique Ocaña
no flags
Details
Formatted Diff
Diff
Patch
(8.93 KB, patch)
2014-02-26 05:03 PST
,
Enrique Ocaña
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Enrique Ocaña
Comment 1
2014-02-24 12:05:23 PST
Created
attachment 225079
[details]
Patch
WebKit Commit Bot
Comment 2
2014-02-24 12:07:30 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See
http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Enrique Ocaña
Comment 3
2014-02-25 06:26:56 PST
Sergio and I talked yesterday about trying to convert early from WebKitFindOptions to WebKit::FindOptions in webKitFindControllerPerform(), store the result in the uint32_t temporary variable and then operate on it using WebKit::FindOptions values. However, I've realized that some functions such as webkit_find_controller_search_next() store values from the WebKit::FindOptions domain in WebKitFindController->priv->findOptions. This made me think that the only reasonable way to address this issue is to change the semantics of WebKitFindController->priv->findOptions: Before, it was considered to be in the WebKitFindOptions domain. Now, it's considered to be in the WebKit::FindOptions domain. This means that now we need an additional toWebKitFindOptions() method to perform the conversion in the WebKit::FindOptions --> WebKitFindOptions way, so that we car return the value in webkit_find_controller_get_options(). I've renamed the old method that converted WebKitFindOptions --> WebKit::FindOptions as toFindOptions(). I hope this justification to be useful for the review process.
Sergio Villar Senin
Comment 4
2014-02-25 09:11:18 PST
Comment on
attachment 225079
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=225079&action=review
Almost there. I'd suggest some changes tough.
> Source/WebKit2/ChangeLog:7 > +
You still need a short description of the problem/fix here even if you add specific comments per file.
> Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp:99 > +
I don't see the point of having two functions. Let's just have the one receiving a uint32_t and let it do all the conversion, we don't need an extra cast and a function call (even if it's inline)
> Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp:112 > }
Same here, I think we only use the second one, so let's keep that and move the implementation of the conversion there.
> Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp:433 > + webKitFindControllerSetSearchData(findController, searchText, toFindOptions(static_cast<WebKitFindOptions>(findOptions)), maxMatchCount);
Just call the uint32_t version, you don't need the cast.
> Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp:490 > + webKitFindControllerSetSearchData(findController, searchText, toFindOptions(static_cast<WebKitFindOptions>(findOptions)), maxMatchCount);
Ditto.
Enrique Ocaña
Comment 5
2014-02-25 11:10:20 PST
Created
attachment 225163
[details]
Patch
Sergio Villar Senin
Comment 6
2014-02-26 03:38:52 PST
Comment on
attachment 225163
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=225163&action=review
r=me provided you fix the issues I mention.
> Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp:86 > +namespace FindOptions {
Let's use a different function name instead of adding another namespace, see bellow.
> Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp:88 > +static inline WebKit::FindOptions toFindOptions(uint32_t type)
I'd suggest toWebFindOptions for example. BTW, I spot this in the previous review but forgot to add a comment. Let's change the name of the argument, "type" does not mean anything, we need a more meaningful name like findOptions for example.
> Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp:97 > +static inline WebKitFindOptions toWebKitFindOptions(uint32_t type)
Same thing about the name of the argument.
> Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp:106 > +} // namespace WebKitFindController
We can remove this then.
Enrique Ocaña
Comment 7
2014-02-26 05:03:13 PST
Created
attachment 225248
[details]
Patch
WebKit Commit Bot
Comment 8
2014-02-26 05:46:03 PST
Comment on
attachment 225248
[details]
Patch Clearing flags on attachment: 225248 Committed
r164715
: <
http://trac.webkit.org/changeset/164715
>
WebKit Commit Bot
Comment 9
2014-02-26 05:46:06 PST
All reviewed patches have been landed. Closing bug.
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