Bug 28132 - FrameLoadType / WebFrameLoadType enums are out of sync
Summary: FrameLoadType / WebFrameLoadType enums are out of sync
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nikolas Zimmermann
Depends on:
Reported: 2009-08-09 10:22 PDT by Nikolas Zimmermann
Modified: 2009-08-09 15:12 PDT (History)
3 users (show)

See Also:

Initial patch (4.71 KB, patch)
2009-08-09 10:26 PDT, Nikolas Zimmermann
mjs: review-
Details | Formatted Diff | Diff
Updated patch (3.10 KB, patch)
2009-08-09 14:02 PDT, Nikolas Zimmermann
no flags Details | Formatted Diff | Diff
Updated patch v2 (3.48 KB, patch)
2009-08-09 14:52 PDT, Nikolas Zimmermann
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolas Zimmermann 2009-08-09 10:22:19 PDT
WebCore/loader/FrameLoaderTypes.h defines the FrameLoadType enum.
WebKit/mac/WebView/WebFramePrivate.h and WebKit/win/Interfaces/IWebFramePrivate.idl define their own public WebFrameLoadType enum.

The enums are out of sync at the moment, and it's very dangerous because The FrameLoadType -> WebFrameLoadType conversions happen as c-casts.
Comment 1 Nikolas Zimmermann 2009-08-09 10:26:23 PDT
Created attachment 34425 [details]
Initial patch
Comment 2 Nikolas Zimmermann 2009-08-09 13:39:15 PDT
A quick scan, when these problems have been introduced:

#1) WebFrameLoadTypeReloadAllowingStaleData (affecting mac & win) http://trac.webkit.org/changeset/40353/trunk/WebCore/loader/FrameLoaderTypes.h

#2) WebFrameLoadTypeReloadFromOrigin (affecting win only)
Comment 3 Maciej Stachowiak 2009-08-09 13:52:47 PDT
Comment on attachment 34425 [details]
Initial patch

This changes public API headers and may break source and/or binary compat. The better way to do this would be to restore the old value to FrameLoadType, even though it is unused. As discussed on IRC. r- for now, awaiting new patch.
Comment 4 Nikolas Zimmermann 2009-08-09 14:02:34 PDT
Created attachment 34429 [details]
Updated patch

Fix Maciej's comments.
Comment 5 Nikolas Zimmermann 2009-08-09 14:15:31 PDT
Comment on attachment 34429 [details]
Updated patch

Clearing review patch. This won't compile, the new enum value is not handled in the switch'es in FrameLoader. Need to find a better solution.
Comment 6 Nikolas Zimmermann 2009-08-09 14:52:17 PDT
Created attachment 34431 [details]
Updated patch v2
Comment 7 Maciej Stachowiak 2009-08-09 14:56:42 PDT
Comment on attachment 34431 [details]
Updated patch v2

Comment 8 Nikolas Zimmermann 2009-08-09 15:12:07 PDT
Landed in r46965.