Bug 79800 - [Qt] Fix build for WK2, do not use enum type if values can be outside the enum
Summary: [Qt] Fix build for WK2, do not use enum type if values can be outside the enum
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Caio Marcelo de Oliveira Filho
URL:
Keywords:
Depends on:
Blocks: 78821
  Show dependency treegraph
 
Reported: 2012-02-28 08:49 PST by Caio Marcelo de Oliveira Filho
Modified: 2012-03-02 09:07 PST (History)
6 users (show)

See Also:


Attachments
Patch (4.59 KB, patch)
2012-02-28 08:51 PST, Caio Marcelo de Oliveira Filho
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Caio Marcelo de Oliveira Filho 2012-02-28 08:49:00 PST
[Qt] Fix build for WK2, do not use enum type if values can be outside the enum
Comment 1 Caio Marcelo de Oliveira Filho 2012-02-28 08:51:09 PST
Created attachment 129269 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2012-02-28 08:55:32 PST
Comment on attachment 129269 [details]
Patch

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

> Source/WebKit2/ChangeLog:10
> +        We have two different enums called NavigationRequestAction. If we use one of them
> +        to store the variables, compilers can rightfully warn about comparison with
> +        values from other enums.

why do we have that? ain't they namespaced?

> Source/WebKit2/ChangeLog:12
> +        We might revist the strategy of exposing different enumerations in experimental,

revisit
Comment 3 Csaba Osztrogonác 2012-02-28 09:00:23 PST
Comment on attachment 129269 [details]
Patch

rs=me to fix the build now, but we _really_ need to refactor using two NavigationRequestAction enum. :-/
Comment 4 Caio Marcelo de Oliveira Filho 2012-02-28 09:03:47 PST
Committed r109113: <http://trac.webkit.org/changeset/109113>
Comment 5 Caio Marcelo de Oliveira Filho 2012-02-28 09:09:19 PST
Comment on attachment 129269 [details]
Patch

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

>> Source/WebKit2/ChangeLog:10
>> +        values from other enums.
> 
> why do we have that? ain't they namespaced?

We can't choose one or other to be the type of the property since the values come from different enums. Namespacing is not an 
issue here. The QtWebKit API exposes a property that takes values from two different enums.
Comment 6 Csaba Osztrogonác 2012-02-28 09:12:57 PST
Reopen, because we need a proper fix instead of workaround.
Comment 7 Caio Marcelo de Oliveira Filho 2012-03-02 09:07:19 PST
(In reply to comment #6)
> Reopen, because we need a proper fix instead of workaround.

I prefer closing this since it was intended just to revert the code back to its previous state. See bug 80164 for changes that deal with the workaround.