Bug 148451 - [Win] Expose "Inverted Colors" option in WinLauncher
Summary: [Win] Expose "Inverted Colors" option in WinLauncher
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: PC All
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords:
Depends on:
Blocks: 148461
  Show dependency treegraph
 
Reported: 2015-08-25 16:33 PDT by Brent Fulgham
Modified: 2015-08-25 20:47 PDT (History)
0 users

See Also:


Attachments
Patch (3.85 KB, patch)
2015-08-25 16:36 PDT, Brent Fulgham
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2015-08-25 16:33:33 PDT
WebKit supports an inverted color mode for Accessibility. This option is not accessible in WinLauncher, which makes experimenting with the feature difficult.

This patch adds a menu option to the "View" menu so that you can run WinLauncher with inverted colors.
Comment 1 Brent Fulgham 2015-08-25 16:36:15 PDT
Created attachment 259899 [details]
Patch
Comment 2 Said Abou-Hallawa 2015-08-25 17:10:38 PDT
Comment on attachment 259899 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=259899&action=review

> Tools/WinLauncher/Common.cpp:494
> +        case IDM_INVERT_COLORS:

WinProc() and ToggleMenuItem() checks for the same set of wmIds. Can't we make ToggleMenuItem() returns true if handles the wmId and false if it does not? The default case of switch (wmId) in WinProc can be like this:

        default:
            if (!ToggleMenuItem(hWnd, mId))
                return CallWindowProc(parentProc, hWnd, message, wParam, lParam);
        }
Comment 3 Brent Fulgham 2015-08-25 17:16:13 PDT
Committed r188939: <http://trac.webkit.org/changeset/188939>
Comment 4 Brent Fulgham 2015-08-25 19:42:59 PDT
(In reply to comment #2)
> Comment on attachment 259899 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=259899&action=review
> 
> > Tools/WinLauncher/Common.cpp:494
> > +        case IDM_INVERT_COLORS:
> 
> WinProc() and ToggleMenuItem() checks for the same set of wmIds. Can't we
> make ToggleMenuItem() returns true if handles the wmId and false if it does
> not? The default case of switch (wmId) in WinProc can be like this:
> 
>         default:
>             if (!ToggleMenuItem(hWnd, mId))
>                 return CallWindowProc(parentProc, hWnd, message, wParam,
> lParam);
>         }

That's a great idea! I'll try to put a patch together for that.

Thanks!