commit | 75b1a0639ed109b1f52600956adbe559ac61cc03 | [log] [tgz] |
---|---|---|
author | Greg Thompson <grt@chromium.org> | Mon Sep 18 00:08:36 2023 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Sep 18 00:08:36 2023 |
tree | 925f3102ba1811c3008d3f861c8fd66904309791 | |
parent | 193699f41e6bc53f5e30ba5bb5ef8551151d722a [diff] |
[Windows] Do not include string terminator in GetWindowText WindowEnumerator::GetWindowText was including the trailing string terminator in the body of the returned string. This CL fixes that as well as makes several other changes: - WindowEnumeratorTest.EnumerateTopLevelWindows had the same bug in its independent implementation of GetWindowText. It is also fixed. - WindowEnumerator has been whittled down to a single function, so there's no need for a class anymore. It's now simply base::win::EnumerateChildWindows, which is a little easier to use. - base/win/window_enumerator.h no longer includes windows.h. - GetWindowText has been renamed to GetWindowTextString so that it doesn't accidentally get renamed to GetWindowTextW by windows.h. - GetWindowTextString also handles the case where the actual text is fewer characters than reported by GetWindowTextLength. MSDN explains a few cases where this could happen. Bug: 1482637 Change-Id: I8cb9b5706fb43bdb10e79afc9c832d9a4e5ee6af Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4868390 Auto-Submit: Greg Thompson <grt@chromium.org> Reviewed-by: S Ganesh <ganesh@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Commit-Queue: Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1197669}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.