summaryrefslogtreecommitdiffstats
path: root/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2010-11-18 17:33:13 -0800
committerRussell Brenner <russellbrenner@google.com>2010-12-02 13:47:21 -0800
commit6b70adc33054f8aee8c54d0f460458a9df11b8a5 (patch)
tree103a13998c33944d6ab3b8318c509a037e639460 /WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
parentbdf4ebc8e70b2d221b6ee7a65660918ecb1d33aa (diff)
downloadexternal_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.zip
external_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.tar.gz
external_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.tar.bz2
Merge WebKit at r72274: Initial merge by git.
Change-Id: Ie51f0b4a16da82942bd516dce59cfb79ebbe25fb
Diffstat (limited to 'WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp')
-rw-r--r--WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
index 96937fd..5b771b2 100644
--- a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
+++ b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
@@ -35,6 +35,16 @@
using std::wstring;
+static COMPtr<IAccessibleComparable> comparableObject(IAccessible* accessible)
+{
+ COMPtr<IServiceProvider> serviceProvider(Query, accessible);
+ if (!serviceProvider)
+ return 0;
+ COMPtr<IAccessibleComparable> comparable;
+ serviceProvider->QueryService(SID_AccessibleComparable, __uuidof(IAccessibleComparable), reinterpret_cast<void**>(&comparable));
+ return comparable;
+}
+
AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element)
: m_element(element)
{
@@ -49,6 +59,18 @@ AccessibilityUIElement::~AccessibilityUIElement()
{
}
+bool AccessibilityUIElement::isEqual(AccessibilityUIElement* otherElement)
+{
+ COMPtr<IAccessibleComparable> comparable = comparableObject(m_element.get());
+ COMPtr<IAccessibleComparable> otherComparable = comparableObject(otherElement->m_element.get());
+ if (!comparable || !otherComparable)
+ return false;
+ BOOL isSame = FALSE;
+ if (FAILED(comparable->isSameObject(otherComparable.get(), &isSame)))
+ return false;
+ return isSame;
+}
+
void AccessibilityUIElement::getLinkedUIElements(Vector<AccessibilityUIElement>&)
{
}