Chromium Code Reviews| Index: ui/views/win/hwnd_message_handler.cc |
| diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc |
| index e4f55bfffd422f370514d8798259a5b763d98ecc..fd4cea6f9f4a809a73002482fc1ab9b3ac985bfa 100644 |
| --- a/ui/views/win/hwnd_message_handler.cc |
| +++ b/ui/views/win/hwnd_message_handler.cc |
| @@ -45,9 +45,6 @@ |
| namespace views { |
| namespace { |
| -// A version of the OBJID_CLIENT constant that works in 64-bit mode too. |
| -static const LPARAM kObjIdClient = static_cast<ULONG>(OBJID_CLIENT); |
| - |
| // MoveLoopMouseWatcher is used to determine if the user canceled or completed a |
| // move. win32 doesn't appear to offer a way to determine the result of a move, |
| // so we install hooks to determine if we got a mouse up and assume the move |
| @@ -1419,8 +1416,13 @@ LRESULT HWNDMessageHandler::OnGetObject(UINT message, |
| LPARAM l_param) { |
| LRESULT reference_result = static_cast<LRESULT>(0L); |
| + // Only the lower 32 bits of l_param are valid when checking the object id |
| + // because it sometimes gets sign-extended incorrectly (but not always). |
| + DWORD_PTR unsigned_l_param = static_cast<DWORD_PTR>(l_param); |
| + DWORD obj_id = static_cast<DWORD>(unsigned_l_param); |
|
jschuh
2014/06/19 09:15:19
Ditto.
|
| + |
| // Accessibility readers will send an OBJID_CLIENT message |
| - if (kObjIdClient == l_param) { |
| + if (OBJID_CLIENT == obj_id) { |
| // Retrieve MSAA dispatch object for the root view. |
| base::win::ScopedComPtr<IAccessible> root( |
| delegate_->GetNativeViewAccessible()); |