Bug 127801 - EFL port should stop using COMPILE_ASSERT_MATCHING_ENUM macros
Summary: EFL port should stop using COMPILE_ASSERT_MATCHING_ENUM macros
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryuan Choi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-28 14:28 PST by Anders Carlsson
Modified: 2014-02-04 23:18 PST (History)
8 users (show)

See Also:


Attachments
Patch (35.84 KB, patch)
2014-01-29 02:55 PST, Ryuan Choi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2014-01-28 14:28:10 PST
Instead of having COMPILE_ASSERT_MATCHING_ENUM macros, WebKit EFL should have functions that can map between different types. For example:

inline WKSameDocumentNavigationType toAPI(SameDocumentNavigationType type)
{
    WKFrameNavigationType wkType = kWKSameDocumentNavigationAnchorNavigation;

    switch (type) {
    case SameDocumentNavigationAnchorNavigation:
        wkType = kWKSameDocumentNavigationAnchorNavigation;
        break;
    case SameDocumentNavigationSessionStatePush:
        wkType = kWKSameDocumentNavigationSessionStatePush;
        break;
    case SameDocumentNavigationSessionStateReplace:
        wkType = kWKSameDocumentNavigationSessionStateReplace;
        break;
    case SameDocumentNavigationSessionStatePop:
        wkType = kWKSameDocumentNavigationSessionStatePop;
        break;
    }
    
    return wkType;
}

This allows us to change the enum values in WebCore without breaking the builds.
Comment 1 Ryuan Choi 2014-01-29 02:55:37 PST
Created attachment 222561 [details]
Patch
Comment 2 Anders Carlsson 2014-01-29 08:14:23 PST
Comment on attachment 222561 [details]
Patch

Thanks a lot for doing this!
Comment 3 WebKit Commit Bot 2014-01-29 12:12:59 PST
Comment on attachment 222561 [details]
Patch

Clearing flags on attachment: 222561

Committed r163033: <http://trac.webkit.org/changeset/163033>
Comment 4 WebKit Commit Bot 2014-01-29 12:13:04 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Gyuyoung Kim 2014-02-04 23:18:52 PST
(In reply to comment #1)
> Created an attachment (id=222561) [details]
> Patch

Thanks Ryuan :)