Bug 28132

Summary: FrameLoadType / WebFrameLoadType enums are out of sync
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: WebKit APIAssignee: Nikolas Zimmermann <zimmermann>
Severity: Normal CC: darin, mjs, staikos
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Description Flags
Initial patch
mjs: review-
Updated patch
Updated patch v2 mjs: review+

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.