Bug 31116 - WebInspector: Corrects InspectorBackent::platform() on Windows.
Summary: WebInspector: Corrects InspectorBackent::platform() on Windows.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 2000
: P3 Normal
Assignee: Nobody
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2009-11-04 06:33 PST by Jocelyn Turcotte
Modified: 2009-11-04 13:44 PST (History)
7 users (show)

See Also:


Attachments
Patch (1.14 KB, patch)
2009-11-04 06:38 PST, Jocelyn Turcotte
no flags Details | Formatted Diff | Diff
Alternate solution patch: webkit port identifier (5.59 KB, patch)
2009-11-04 13:23 PST, Jocelyn Turcotte
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jocelyn Turcotte 2009-11-04 06:33:42 PST
This allows Qt on Windows to use platform-qt in the inspector.
Comment 1 Jocelyn Turcotte 2009-11-04 06:38:08 PST
Created attachment 42482 [details]
Patch
Comment 2 Jocelyn Turcotte 2009-11-04 06:39:13 PST
I suppose that Gtk and Wx would expect the same behavior.
Comment 3 Eric Seidel (no email) 2009-11-04 10:11:44 PST
Looks OK, but I would think better would be to move the WIN_OS option to the end of the list, if it really should be a WIN_OS fallback for platforms based on WIN_OS.
Comment 4 Timothy Hatcher 2009-11-04 10:17:48 PST
I am not sure what the difference between WIN and WIN_OS is.
Comment 5 Adam Roben (:aroben) 2009-11-04 10:23:20 PST
(In reply to comment #4)
> I am not sure what the difference between WIN and WIN_OS is.

WIN_OS is true for any platform building on the Windows operating system. WIN is mostly only true for Apple's Windows port, though it's possible Brent Fulgham's Cairo/libCurl-based Windows port also sets WIN to true.
Comment 6 Eric Seidel (no email) 2009-11-04 10:25:15 PST
Oh, you're not alone. :)

Sadly our PLATFORM macros are horribly confusing and you might get different answers from different people on different days. :)

My understanding is that PLATFORM(WIN) is the Apple windows port, and PLATFORM(WIN_OS) is platforms which sit on top of the win32 api.  The story is even more confusing on the mac.  Maciej talked about a proposal to fix this long ago, I'm not sure what happened to that.
Comment 7 Jocelyn Turcotte 2009-11-04 13:23:35 PST
Created attachment 42516 [details]
Alternate solution patch: webkit port identifier

If we want to keep a WIN_OS wide platform identifier, I would rather use this solution instead.

Unlike the PLATFORM macro on the C++ side, InspectorController.platform() returns a single value that must identify both the webkit flavor and the OS.

Tell me if you prefer this solution or the first one, which should use identifers like qt-windows, qt-mac, gtk-linux if needed to switch different behavior/appearance of the inspector on different OS.
Comment 8 Jocelyn Turcotte 2009-11-04 13:27:57 PST
Details that might be usefull: currently, the only values returned by
platform() that gets used in the code are "mac-*" and "qt"
Comment 9 WebKit Commit Bot 2009-11-04 13:44:15 PST
Comment on attachment 42516 [details]
Alternate solution patch: webkit port identifier

Clearing flags on attachment: 42516

Committed r50528: <http://trac.webkit.org/changeset/50528>
Comment 10 WebKit Commit Bot 2009-11-04 13:44:20 PST
All reviewed patches have been landed.  Closing bug.