[Webkit-unassigned] [Bug 127800] New: WebKitGTK+ should stop using COMPILE_ASSERT_MATCHING_ENUM macros
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 28 14:29:58 PST 2014
https://bugs.webkit.org/show_bug.cgi?id=127800
Summary: WebKitGTK+ should stop using
COMPILE_ASSERT_MATCHING_ENUM macros
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit Gtk
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: andersca at apple.com
Instead of having COMPILE_ASSERT_MATCHING_ENUM macros, WebKitGTK+ 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.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list