Bug 42885 - [WINCE] Merge PasteboardWince.cpp into PasteboardWin.cpp
Summary: [WINCE] Merge PasteboardWince.cpp into PasteboardWin.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-23 03:12 PDT by Patrick R. Gansterer
Modified: 2010-07-23 10:11 PDT (History)
2 users (show)

See Also:


Attachments
Patch (5.39 KB, patch)
2010-07-23 03:14 PDT, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff
Patch (improved version) (6.07 KB, patch)
2010-07-23 04:17 PDT, Patrick R. Gansterer
aroben: review-
Details | Formatted Diff | Diff
Patch (6.45 KB, patch)
2010-07-23 08:50 PDT, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.