Bug 42885

Summary: [WINCE] Merge PasteboardWince.cpp into PasteboardWin.cpp
Product: WebKit Reporter: Patrick R. Gansterer <paroga>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch (improved version)
aroben: review-
Patch none

Description Patrick R. Gansterer 2010-07-23 03:12:50 PDT
see patch
Comment 1 Patrick R. Gansterer 2010-07-23 03:14:58 PDT
Created attachment 62403 [details]
Patch
Comment 2 Patrick R. Gansterer 2010-07-23 04:17:23 PDT
Created attachment 62409 [details]
Patch (improved version)

This patch has an additional "#if !defined(NO_ALPHABLEND)" around the AlphaBlend function like in GraphicsContextWince.
Comment 3 Adam Roben (:aroben) 2010-07-23 08:31:48 PDT
Comment on attachment 62409 [details]
Patch (improved version)

>  Pasteboard::Pasteboard()
> -{ 
> -    // make a dummy HWND to be the Windows clipboard's owner
> -    WNDCLASSEX wcex = {0};
> +{
> +    HWND hWndParent = 0;
> +#if OS(WINCE)
> +    WNDCLASS wcex;
> +    memset(&wcex, 0, sizeof(WNDCLASS));
> +#else
> +    WNDCLASSEX wcex;
> +    memset(&wcex, 0, sizeof(WNDCLASSEX));
>      wcex.cbSize = sizeof(WNDCLASSEX);
> +#endif
>      wcex.lpfnWndProc    = PasteboardOwnerWndProc;
> -    wcex.hInstance      = WebCore::instanceHandle();
>      wcex.lpszClassName  = L"PasteboardOwnerWindowClass";
> -    ::RegisterClassEx(&wcex);
> +#if OS(WINCE)
> +    RegisterClass(&wcex);
> +#else
> +    RegisterClassEx(&wcex);
> +    hWndParent = HWND_MESSAGE;
> +#endif

I think we can make non-CE Windows use WNDCLASS and RegisterClass, too. I think the reduced complexity is worth it.

Why was the setting of the hInstance member removed?
Comment 4 Patrick R. Gansterer 2010-07-23 08:50:52 PDT
Created attachment 62430 [details]
Patch

> (From update of attachment 62409 [details])
> Why was the setting of the hInstance member removed?
By accident. Added again.
Comment 5 WebKit Commit Bot 2010-07-23 10:11:21 PDT
Comment on attachment 62430 [details]
Patch

Clearing flags on attachment: 62430

Committed r63985: <http://trac.webkit.org/changeset/63985>
Comment 6 WebKit Commit Bot 2010-07-23 10:11:25 PDT
All reviewed patches have been landed.  Closing bug.