Bug 186378 - [Win][MiniBrowser] Remove gMainWindow global variable
Summary: [Win][MiniBrowser] Remove gMainWindow global variable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks: 184770
  Show dependency treegraph
 
Reported: 2018-06-06 19:27 PDT by Fujii Hironori
Modified: 2018-06-06 23:27 PDT (History)
6 users (show)

See Also:


Attachments
Patch (9.45 KB, patch)
2018-06-06 19:47 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (9.52 KB, patch)
2018-06-06 23:19 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2018-06-06 19:27:17 PDT
[Win][MiniBrowser] Remove gMainWindow global variable
Comment 1 Fujii Hironori 2018-06-06 19:47:06 PDT
Created attachment 342107 [details]
Patch
Comment 2 Ryosuke Niwa 2018-06-06 22:33:31 PDT
Comment on attachment 342107 [details]
Patch

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

> Tools/MiniBrowser/win/Common.cpp:139
> +            int strLen = GetWindowText(GetDlgItem(hDlg, IDC_AUTH_USER), str, 256);

Can we use WTF_ARRAY_LENGTH or sizeof(str) / sizeof(*str) or std::size instead of hard-coding 256 twice?

> Tools/MiniBrowser/win/Common.cpp:143
> +            strLen = GetWindowText(GetDlgItem(hDlg, IDC_AUTH_PASSWORD), str, 256);

Ditto.
Comment 3 Fujii Hironori 2018-06-06 23:09:38 PDT
Thank you very much! I will fix them.
Comment 4 Fujii Hironori 2018-06-06 23:19:48 PDT
Created attachment 342124 [details]
Patch
Comment 5 Fujii Hironori 2018-06-06 23:26:08 PDT
Committed r232574: <https://trac.webkit.org/changeset/232574>
Comment 6 Radar WebKit Bug Importer 2018-06-06 23:27:16 PDT
<rdar://problem/40882765>