Bug 141391 - AX: [Win] OBJID_CLIENT comparisons broken in 64-bit Builds
Summary: AX: [Win] OBJID_CLIENT comparisons broken in 64-bit Builds
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-02-09 10:20 PST by Brent Fulgham
Modified: 2015-02-09 12:27 PST (History)
2 users (show)

See Also:


Attachments
Patch (1.18 KB, patch)
2015-02-09 10:23 PST, Brent Fulgham
andersca: 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-02-09 10:20:19 PST
In all builds (64-bit and 32-bit), OBJID_CLIENT is defined as (LONG) 0xFFFFFFFC. However, testing indicates that the lParam value passed to WebKit from the operating system is sometimes passed as 0x0FFFFFFFC, and sometimes as 0xFFFFFFFFFFFFFFFC (depending on client software). This is probably a bug at the client program level (or perhaps even Windows itself), but we can guard against as follows:

Instead of checking:

lParam != OBJID_CLIENT

we can truncate the value:

static_cast<LONG>(lParam) != OBJID_CLIENT

This will have no effect on our 32-bit builds, and ensure that our 64-bit builds are insulated against this problem.
Comment 1 Radar WebKit Bug Importer 2015-02-09 10:20:46 PST
<rdar://problem/19767342>
Comment 2 Brent Fulgham 2015-02-09 10:23:48 PST
Created attachment 246275 [details]
Patch
Comment 3 Brent Fulgham 2015-02-09 12:27:52 PST
Committed r179841: <http://trac.webkit.org/changeset/179841>