Commit 3ffbf436 authored by Suproteem Sarkar's avatar Suproteem Sarkar Committed by Commit Bot

Mini-patch modified GetPatternProvider to cast to provider interface

R=nektar@chromium.org,dmazzoni@chromium.org

Bug: 847971
Change-Id: Id18111cedd06a6c5964682e114de03fc9c0d9567
Reviewed-on: https://chromium-review.googlesource.com/1130161Reviewed-by: default avatarNektarios Paisios <nektar@chromium.org>
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575921}
parent 770507fd
......@@ -2981,21 +2981,21 @@ STDMETHODIMP AXPlatformNodeWin::GetPatternProvider(PATTERNID pattern_id,
case UIA_ExpandCollapsePatternId:
if (SupportsExpandCollapse(data.role)) {
AddRef();
*result = static_cast<IRawElementProviderSimple*>(this);
*result = static_cast<IExpandCollapseProvider*>(this);
}
break;
case UIA_GridPatternId:
if (IsTableLikeRole(data.role)) {
AddRef();
*result = static_cast<IRawElementProviderSimple*>(this);
*result = static_cast<IGridProvider*>(this);
}
break;
case UIA_GridItemPatternId:
if (IsCellOrTableHeaderRole(data.role)) {
AddRef();
*result = static_cast<IRawElementProviderSimple*>(this);
*result = static_cast<IGridItemProvider*>(this);
}
break;
......@@ -3003,16 +3003,16 @@ STDMETHODIMP AXPlatformNodeWin::GetPatternProvider(PATTERNID pattern_id,
break;
case UIA_RangeValuePatternId:
*result = static_cast<IRawElementProviderSimple*>(this);
AddRef();
*result = static_cast<IRangeValueProvider*>(this);
break;
case UIA_ScrollPatternId:
break;
case UIA_ScrollItemPatternId:
*result = static_cast<IRawElementProviderSimple*>(this);
AddRef();
*result = static_cast<IScrollItemProvider*>(this);
break;
case UIA_SynchronizedInputPatternId:
......@@ -3021,14 +3021,14 @@ STDMETHODIMP AXPlatformNodeWin::GetPatternProvider(PATTERNID pattern_id,
case UIA_TablePatternId:
if (IsTableLikeRole(data.role)) {
AddRef();
*result = static_cast<IRawElementProviderSimple*>(this);
*result = static_cast<ITableProvider*>(this);
}
break;
case UIA_TableItemPatternId:
if (IsCellOrTableHeaderRole(data.role)) {
AddRef();
*result = static_cast<IRawElementProviderSimple*>(this);
*result = static_cast<ITableItemProvider*>(this);
}
break;
......@@ -3042,27 +3042,27 @@ STDMETHODIMP AXPlatformNodeWin::GetPatternProvider(PATTERNID pattern_id,
case UIA_SelectionItemPatternId:
if (IsUIASelectable(data.role)) {
AddRef();
*result = static_cast<IRawElementProviderSimple*>(this);
*result = static_cast<ISelectionItemProvider*>(this);
}
break;
case UIA_SelectionPatternId:
if (IsContainerWithSelectableChildrenRole(data.role)) {
AddRef();
*result = static_cast<IRawElementProviderSimple*>(this);
*result = static_cast<ISelectionProvider*>(this);
}
break;
case UIA_TogglePatternId:
if (SupportsToggle(data.role)) {
AddRef();
*result = static_cast<IRawElementProviderSimple*>(this);
*result = static_cast<IToggleProvider*>(this);
}
break;
case UIA_ValuePatternId:
*result = static_cast<IRawElementProviderSimple*>(this);
AddRef();
*result = static_cast<IValueProvider*>(this);
break;
case UIA_WindowPatternId:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment