mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1187417 - (Part 2) Check for ProxyAccessible in mozAccessible size r=tbsaunde
This commit is contained in:
parent
8c44000823
commit
0e4cfe6db9
@ -873,11 +873,14 @@ ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
|
||||
|
||||
AccessibleWrap* accWrap = [self getGeckoAccessible];
|
||||
if (!accWrap)
|
||||
nsIntRect rect;
|
||||
if (AccessibleWrap* accWrap = [self getGeckoAccessible])
|
||||
rect = accWrap->Bounds();
|
||||
else if (ProxyAccessible* proxy = [self getProxyAccessible])
|
||||
rect = proxy->Bounds();
|
||||
else
|
||||
return nil;
|
||||
|
||||
nsIntRect rect = accWrap->Bounds();
|
||||
CGFloat scaleFactor =
|
||||
nsCocoaUtils::GetBackingScaleFactor([[NSScreen screens] objectAtIndex:0]);
|
||||
return [NSValue valueWithSize:NSMakeSize(static_cast<CGFloat>(rect.width) / scaleFactor,
|
||||
|
Loading…
Reference in New Issue
Block a user