Bug 79800

Summary: [Qt] Fix build for WK2, do not use enum type if values can be outside the enum
Product: WebKit Reporter: Caio Marcelo de Oliveira Filho <cmarcelo>
Component: New BugsAssignee: Caio Marcelo de Oliveira Filho <cmarcelo>
Status: RESOLVED FIXED    
Severity: Normal CC: hausmann, kenneth, menard, ossy, webkit.review.bot, zoltan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 78821    
Attachments:
Description Flags
Patch none

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.