Bug 127801

Summary: EFL port should stop using COMPILE_ASSERT_MATCHING_ENUM macros
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: WebKit EFLAssignee: Ryuan Choi <ryuan.choi>
Status: RESOLVED FIXED    
Severity: Normal CC: bunhere, cdumez, commit-queue, gyuyoung.kim, gyuyoung.kim, lucas.de.marchi, rakuco, ryuan.choi
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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 :)