Bug 25807 - #ifdef properly the WebCore/platform/gtk/KeyboardCodes.h
Summary: #ifdef properly the WebCore/platform/gtk/KeyboardCodes.h
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-14 14:37 PDT by Fridrich Strba
Modified: 2009-05-30 16:22 PDT (History)
0 users

See Also:


Attachments
patch that ifdefs properly the codes for windows platforms (1.55 KB, patch)
2009-05-14 14:38 PDT, Fridrich Strba
zecke: review-
Details | Formatted Diff | Diff
sharing the Qt KeyboardCodes.h and removing the Gtk+ KeyboardCodes.h (28.44 KB, patch)
2009-05-28 08:46 PDT, Fridrich Strba
no flags Details | Formatted Diff | Diff
using svn-create-patch (42.12 KB, patch)
2009-05-29 00:11 PDT, Fridrich Strba
zecke: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fridrich Strba 2009-05-14 14:37:43 PDT
Some of the keyboard codes are already part of win32 api, so the WebCore/platform/gtk/KeyboardCodes.h does not compile since we are redefining already defined codes. Following patch ifdefs correctly the different defines for building well on Windows. We do exactly what keyboard codes for other platforms do.
Comment 1 Fridrich Strba 2009-05-14 14:38:29 PDT
Created attachment 30357 [details]
patch that ifdefs properly the codes for windows platforms
Comment 2 Holger Freyther 2009-05-14 20:24:16 PDT
Comment on attachment 30357 [details]
patch that ifdefs properly the codes for windows platforms

No, that is way too ugly this way. Please let us go back to the problem and then talk about solutions.

So your problem is:
   - Some VK_ are already there

My questions:
   - Why do you have a define for WIN_CE? There is no Gtk+ port to Windows CE?!

Proposed change:
   - Make the change with one #if !PLATFORM(GTK) block instead of squattering that ugly thing all around. Alternatively create a cleaned KeyboardCodesGtkWin32.h and include that from KeyEventGtk.cpp
Comment 3 Fridrich Strba 2009-05-14 23:03:55 PDT
What I did here is exactly what is done in the qt platform KeyboardCodes.h
Comment 4 Fridrich Strba 2009-05-15 01:17:22 PDT
Sorry, to answer your questions:
1) some of the VK_ are there in win32 api in winuser.h
2) the WIN_CE is there only to be compliant with what the other platforms that are used on Windows do.
3) I can make the proposed change, no problem, I can remove the WIN_CE define too. I was just wondering whether doing consistently the same thing in all places was not a superior solution.
Comment 5 Holger Freyther 2009-05-28 06:51:57 PDT
(In reply to comment #3)
> What I did here is exactly what is done in the qt platform KeyboardCodes.h

Okay, could you create a patch that is moving this header file to WebCore/platform, change the Gtk+ buildsystem and remove the original Gtk+ header?
Comment 6 Fridrich Strba 2009-05-28 08:46:43 PDT
Created attachment 30739 [details]
sharing the Qt KeyboardCodes.h and removing the Gtk+ KeyboardCodes.h
Comment 7 Fridrich Strba 2009-05-28 08:52:51 PDT
OK, it seems like the svn diff does not handle nice svn mv. If landing, svn mv WebCore/platform/qt/KeyboardCodes.h WebCore/platform/KeyboardCodes.h; svn rm WebCore/platform/gtk/KeyboardCodes.h and then patch the WebCore/GNUmakefile.am and WebCore/ChangeLog
Comment 8 Holger Freyther 2009-05-28 18:15:50 PDT
(In reply to comment #7)
> OK, it seems like the svn diff does not handle nice svn mv. If landing, svn mv
> WebCore/platform/qt/KeyboardCodes.h WebCore/platform/KeyboardCodes.h; svn rm
> WebCore/platform/gtk/KeyboardCodes.h and then patch the WebCore/GNUmakefile.am
> and WebCore/ChangeLog

Right, please use svn-create-patch. :)
Comment 9 Fridrich Strba 2009-05-29 00:11:01 PDT
Created attachment 30766 [details]
using svn-create-patch
Comment 10 Holger Freyther 2009-05-29 18:20:30 PDT
Comment on attachment 30766 [details]
using svn-create-patch


> +        The two KeyboardCodes.h files are basically identical and the
> +        qt one is properly #ifdef-ed for different win32 systems. Share
> +		them between Qt and Gtk implementations

tabs... the pre-commit hook will curse me :)
Comment 11 Brent Fulgham 2009-05-30 15:51:43 PDT
Assign to me for landing.
Comment 12 Brent Fulgham 2009-05-30 16:22:06 PDT
Landed in @r44291.