Fix the pre-Yosemite build.
[WebKit-https.git] / Tools / DumpRenderTree / win / AccessibilityUIElementWin.cpp
1 /*
2  * Copyright (C) 2008, 2013, 2014 Apple Inc. All Rights Reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24  */
25
26 #include "config.h"
27 #include "AccessibilityUIElement.h"
28
29 #include "AccessibilityController.h"
30 #include "DumpRenderTree.h"
31 #include "FrameLoadDelegate.h"
32 #include <JavaScriptCore/JSStringRef.h>
33 #include <JavaScriptCore/JSStringRefBSTR.h>
34 #include <wtf/text/WTFString.h>
35 #include <comutil.h>
36 #include <tchar.h>
37 #include <string>
38
39 using std::wstring;
40
41 static COMPtr<IAccessibleComparable> comparableObject(IAccessible* accessible)
42 {
43     COMPtr<IServiceProvider> serviceProvider(Query, accessible);
44     if (!serviceProvider)
45         return 0;
46     COMPtr<IAccessibleComparable> comparable;
47     serviceProvider->QueryService(SID_AccessibleComparable, __uuidof(IAccessibleComparable), reinterpret_cast<void**>(&comparable));
48     return comparable;
49 }
50
51 AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element)
52     : m_element(element)
53 {
54 }
55
56 AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement& other)
57     : m_element(other.m_element)
58 {
59 }
60
61 AccessibilityUIElement::~AccessibilityUIElement()
62 {
63 }
64
65 bool AccessibilityUIElement::isEqual(AccessibilityUIElement* otherElement)
66 {
67     COMPtr<IAccessibleComparable> comparable = comparableObject(m_element.get());
68     COMPtr<IAccessibleComparable> otherComparable = comparableObject(otherElement->m_element.get());
69     if (!comparable || !otherComparable)
70         return false;
71     BOOL isSame = FALSE;
72     if (FAILED(comparable->isSameObject(otherComparable.get(), &isSame)))
73         return false;
74     return isSame;
75 }
76
77 void AccessibilityUIElement::getLinkedUIElements(Vector<AccessibilityUIElement>&)
78 {
79 }
80
81 void AccessibilityUIElement::getDocumentLinks(Vector<AccessibilityUIElement>&)
82 {
83 }
84
85 void AccessibilityUIElement::getChildren(Vector<AccessibilityUIElement>& children)
86 {
87     if (!m_element)
88         return;
89
90     long childCount;
91     if (FAILED(m_element->get_accChildCount(&childCount)))
92         return;
93     for (long i = 0; i < childCount; ++i)
94         children.append(getChildAtIndex(i));
95 }
96
97 void AccessibilityUIElement::getChildrenWithRange(Vector<AccessibilityUIElement>& elementVector, unsigned location, unsigned length)
98 {
99     if (!m_element)
100         return;
101
102     long childCount;
103     unsigned appendedCount = 0;
104     if (FAILED(m_element->get_accChildCount(&childCount)))
105         return;
106     for (long i = location; i < childCount && appendedCount < length; ++i, ++appendedCount)
107         elementVector.append(getChildAtIndex(i));
108 }
109
110 int AccessibilityUIElement::childrenCount()
111 {
112     if (!m_element)
113         return 0;
114
115     long childCount;
116     if (FAILED(m_element->get_accChildCount(&childCount)))
117         return 0;
118
119     return childCount;
120 }
121
122 int AccessibilityUIElement::rowCount()
123 {
124     // FIXME: implement
125     return 0;
126 }
127  
128 int AccessibilityUIElement::columnCount()
129 {
130     // FIXME: implement
131     return 0;
132 }
133
134 AccessibilityUIElement AccessibilityUIElement::elementAtPoint(int x, int y)
135 {
136     return 0;
137 }
138
139 AccessibilityUIElement AccessibilityUIElement::linkedUIElementAtIndex(unsigned index)
140 {
141     // FIXME: implement
142     return 0;
143 }
144
145 AccessibilityUIElement AccessibilityUIElement::getChildAtIndex(unsigned index)
146 {
147     if (!m_element)
148         return nullptr;
149
150     COMPtr<IDispatch> child;
151     _variant_t vChild;
152     V_VT(&vChild) = VT_I4;
153     // In MSAA, index 0 is the object itself.
154     V_I4(&vChild) = index + 1;
155     if (FAILED(m_element->get_accChild(vChild.GetVARIANT(), &child)))
156         return nullptr;
157     return COMPtr<IAccessible>(Query, child);
158 }
159
160 unsigned AccessibilityUIElement::indexOfChild(AccessibilityUIElement* element)
161
162     // FIXME: implement
163     return 0;
164 }
165
166 JSStringRef AccessibilityUIElement::allAttributes()
167 {
168     return JSStringCreateWithCharacters(0, 0);
169 }
170
171 JSStringRef AccessibilityUIElement::attributesOfLinkedUIElements()
172 {
173     return JSStringCreateWithCharacters(0, 0);
174 }
175
176 JSStringRef AccessibilityUIElement::attributesOfDocumentLinks()
177 {
178     return JSStringCreateWithCharacters(0, 0);
179 }
180
181 AccessibilityUIElement AccessibilityUIElement::titleUIElement()
182 {
183     COMPtr<IAccessible> platformElement = platformUIElement();
184
185     COMPtr<IAccessibleComparable> comparable = comparableObject(platformElement.get());
186     if (!comparable)
187         return 0;
188
189     _variant_t value;
190     _bstr_t titleUIElementAttributeKey(L"AXTitleUIElementAttribute");
191     if (FAILED(comparable->get_attribute(titleUIElementAttributeKey, &value.GetVARIANT())))
192         return nullptr;
193
194     if (V_VT(&value) == VT_EMPTY)
195         return nullptr;
196
197     ASSERT(V_VT(&value) == VT_UNKNOWN);
198
199     if (V_VT(&value) != VT_UNKNOWN)
200         return nullptr;
201
202     COMPtr<IAccessible> titleElement(Query, value.punkVal);
203     if (value.punkVal)
204         value.punkVal->Release();
205
206     return titleElement;
207 }
208
209 AccessibilityUIElement AccessibilityUIElement::parentElement()
210 {
211     if (!m_element)
212         return 0;
213
214     COMPtr<IDispatch> parent;
215     m_element->get_accParent(&parent);
216
217     COMPtr<IAccessible> parentAccessible(Query, parent);
218     return parentAccessible;
219 }
220
221 JSStringRef AccessibilityUIElement::attributesOfChildren()
222 {
223     return JSStringCreateWithCharacters(0, 0);
224 }
225
226 JSStringRef AccessibilityUIElement::parameterizedAttributeNames()
227 {
228     return JSStringCreateWithCharacters(0, 0);
229 }
230
231 static VARIANT& self()
232 {
233     static _variant_t vSelf;
234     static bool haveInitialized;
235
236     if (!haveInitialized) {
237         V_VT(&vSelf) = VT_I4;
238         V_I4(&vSelf) = CHILDID_SELF;
239     }
240     return vSelf;
241 }
242
243 JSStringRef AccessibilityUIElement::role()
244 {
245     if (!m_element)
246         return JSStringCreateWithCharacters(0, 0);
247
248     _variant_t vRole;
249     if (FAILED(m_element->get_accRole(self(), &vRole.GetVARIANT())))
250         return JSStringCreateWithCharacters(nullptr, 0);
251
252     ASSERT(V_VT(&vRole) == VT_I4 || V_VT(&vRole) == VT_BSTR);
253
254     wstring result;
255     if (V_VT(&vRole) == VT_I4) {
256         unsigned roleTextLength = ::GetRoleText(V_I4(&vRole), nullptr, 0) + 1;
257
258         Vector<TCHAR> roleText(roleTextLength);
259
260         ::GetRoleText(V_I4(&vRole), roleText.data(), roleTextLength);
261
262         result = roleText.data();
263     } else if (V_VT(&vRole) == VT_BSTR)
264         result = wstring(V_BSTR(&vRole), ::SysStringLen(V_BSTR(&vRole)));
265
266     return JSStringCreateWithCharacters(result.data(), result.length());
267 }
268
269 JSStringRef AccessibilityUIElement::subrole()
270 {
271     return 0;
272 }
273
274 JSStringRef AccessibilityUIElement::roleDescription()
275 {
276     return 0;
277 }
278
279 JSStringRef AccessibilityUIElement::computedRoleString()
280 {
281     return 0;
282 }
283
284 JSStringRef AccessibilityUIElement::title()
285 {
286     if (!m_element)
287         return JSStringCreateWithCharacters(0, 0);
288
289     _bstr_t titleBSTR;
290     if (FAILED(m_element->get_accName(self(), &titleBSTR.GetBSTR())) || !titleBSTR.length())
291         return JSStringCreateWithCharacters(0, 0);
292
293     return JSStringCreateWithBSTR(titleBSTR);
294 }
295
296 JSStringRef AccessibilityUIElement::description()
297 {
298     if (!m_element)
299         return JSStringCreateWithCharacters(0, 0);
300
301     _bstr_t descriptionBSTR;
302     if (FAILED(m_element->get_accDescription(self(), &descriptionBSTR.GetBSTR())) || !descriptionBSTR.length())
303         return JSStringCreateWithCharacters(0, 0);
304     return JSStringCreateWithBSTR(descriptionBSTR);
305 }
306
307 JSStringRef AccessibilityUIElement::stringValue()
308 {
309     return JSStringCreateWithCharacters(0, 0);
310 }
311
312 JSStringRef AccessibilityUIElement::language()
313 {
314     return JSStringCreateWithCharacters(0, 0);
315 }
316
317 JSStringRef AccessibilityUIElement::helpText() const
318 {
319     if (!m_element)
320         return JSStringCreateWithCharacters(0, 0);
321
322     _bstr_t helpTextBSTR;
323     if (FAILED(m_element->get_accHelp(self(), &helpTextBSTR.GetBSTR())) || !helpTextBSTR.length())
324         return JSStringCreateWithCharacters(0, 0);
325     return JSStringCreateWithBSTR(helpTextBSTR);
326 }
327
328 double AccessibilityUIElement::x()
329 {
330     if (!m_element)
331         return 0;
332
333     long x, y, width, height;
334     if (FAILED(m_element->accLocation(&x, &y, &width, &height, self())))
335         return 0;
336     return x;
337 }
338
339 double AccessibilityUIElement::y()
340 {
341     if (!m_element)
342         return 0;
343
344     long x, y, width, height;
345     if (FAILED(m_element->accLocation(&x, &y, &width, &height, self())))
346         return 0;
347     return y;
348 }
349
350 double AccessibilityUIElement::width()
351 {
352     if (!m_element)
353         return 0;
354
355     long x, y, width, height;
356     if (FAILED(m_element->accLocation(&x, &y, &width, &height, self())))
357         return 0;
358     return width;
359 }
360
361 double AccessibilityUIElement::height()
362 {
363     if (!m_element)
364         return 0;
365
366     long x, y, width, height;
367     if (FAILED(m_element->accLocation(&x, &y, &width, &height, self())))
368         return 0;
369     return height;
370 }
371
372 double AccessibilityUIElement::clickPointX()
373 {
374     return 0;
375 }
376
377 double AccessibilityUIElement::clickPointY()
378 {
379     return 0;
380 }
381
382 JSStringRef AccessibilityUIElement::valueDescription()
383 {
384     return nullptr;
385 }
386
387 static DWORD accessibilityState(COMPtr<IAccessible> element)
388 {
389     _variant_t state;
390     if (FAILED(element->get_accState(self(), &state.GetVARIANT())))
391         return 0;
392
393     ASSERT(V_VT(&state) == VT_I4);
394
395     DWORD result = state.lVal;
396
397     return result;
398 }
399
400 bool AccessibilityUIElement::isFocused() const
401 {
402     // FIXME: implement
403     return false;
404 }
405
406 bool AccessibilityUIElement::isSelected() const
407 {
408     DWORD state = accessibilityState(m_element);
409     return (state & STATE_SYSTEM_SELECTED) == STATE_SYSTEM_SELECTED;
410 }
411
412 int AccessibilityUIElement::hierarchicalLevel() const
413 {
414     return 0;
415 }
416
417 bool AccessibilityUIElement::ariaIsGrabbed() const
418 {
419     return false;
420 }
421  
422 JSStringRef AccessibilityUIElement::ariaDropEffects() const
423 {
424     return 0;
425 }
426
427 bool AccessibilityUIElement::isExpanded() const
428 {
429     return false;
430 }
431
432 bool AccessibilityUIElement::isChecked() const
433 {
434     if (!m_element)
435         return false;
436
437     _variant_t vState;
438     if (FAILED(m_element->get_accState(self(), &vState.GetVARIANT())))
439         return false;
440
441     return vState.lVal & STATE_SYSTEM_CHECKED;
442 }
443
444 bool AccessibilityUIElement::isIndeterminate() const
445 {
446     // FIXME: implement
447     return false;
448 }
449
450 JSStringRef AccessibilityUIElement::orientation() const
451 {
452     return 0;
453 }
454
455 double AccessibilityUIElement::intValue() const
456 {
457     if (!m_element)
458         return 0;
459
460     _bstr_t valueBSTR;
461     if (FAILED(m_element->get_accValue(self(), &valueBSTR.GetBSTR())) || !valueBSTR.length())
462         return 0;
463
464     TCHAR* ignored;
465     return _tcstod(static_cast<TCHAR*>(valueBSTR), &ignored);
466 }
467
468 double AccessibilityUIElement::minValue()
469 {
470     return 0;
471 }
472
473 double AccessibilityUIElement::maxValue()
474 {
475     return 0;
476 }
477
478 bool AccessibilityUIElement::isPressActionSupported()
479 {
480     if (!m_element)
481         return 0;
482
483     _bstr_t valueBSTR;
484     if (FAILED(m_element->get_accDefaultAction(self(), &valueBSTR.GetBSTR())))
485         return false;
486
487     if (!valueBSTR.length())
488         return false;
489
490     return true;
491 }
492
493 bool AccessibilityUIElement::isIncrementActionSupported()
494 {
495     return false;
496 }
497
498 bool AccessibilityUIElement::isDecrementActionSupported()
499 {
500     return false;
501 }
502
503 bool AccessibilityUIElement::isEnabled()
504 {
505     DWORD state = accessibilityState(m_element);
506     return (state & STATE_SYSTEM_UNAVAILABLE) != STATE_SYSTEM_UNAVAILABLE;
507 }
508
509 bool AccessibilityUIElement::isRequired() const
510 {
511     return false;
512 }
513
514
515 int AccessibilityUIElement::insertionPointLineNumber()
516 {
517     return 0;
518 }
519
520 JSStringRef AccessibilityUIElement::attributesOfColumnHeaders()
521 {
522     return JSStringCreateWithCharacters(0, 0);
523 }
524
525 JSStringRef AccessibilityUIElement::attributesOfRowHeaders()
526 {
527     return JSStringCreateWithCharacters(0, 0);
528 }
529
530 JSStringRef AccessibilityUIElement::attributesOfColumns()
531 {
532     return JSStringCreateWithCharacters(0, 0);
533 }
534
535 JSStringRef AccessibilityUIElement::attributesOfRows()
536 {
537     return JSStringCreateWithCharacters(0, 0);
538 }
539
540 JSStringRef AccessibilityUIElement::attributesOfVisibleCells()
541 {
542     return JSStringCreateWithCharacters(0, 0);
543 }
544
545 JSStringRef AccessibilityUIElement::attributesOfHeader()
546 {
547     return JSStringCreateWithCharacters(0, 0);
548 }
549
550 int AccessibilityUIElement::indexInTable()
551 {
552     return 0;
553 }
554
555 JSStringRef AccessibilityUIElement::rowIndexRange()
556 {
557     return JSStringCreateWithCharacters(0, 0);
558 }
559
560 JSStringRef AccessibilityUIElement::columnIndexRange()
561 {
562     return JSStringCreateWithCharacters(0, 0);
563 }
564
565 int AccessibilityUIElement::lineForIndex(int)
566 {
567     return 0;
568 }
569
570 JSStringRef AccessibilityUIElement::boundsForRange(unsigned location, unsigned length)
571 {
572     return JSStringCreateWithCharacters(0, 0);
573 }
574
575 JSStringRef AccessibilityUIElement::stringForRange(unsigned, unsigned)
576 {
577     return JSStringCreateWithCharacters(0, 0);
578 }
579
580 JSStringRef AccessibilityUIElement::attributedStringForRange(unsigned, unsigned)
581 {
582     return JSStringCreateWithCharacters(0, 0);
583 }
584
585 bool AccessibilityUIElement::attributedStringRangeIsMisspelled(unsigned, unsigned)
586 {
587     return false;
588 }
589
590 unsigned AccessibilityUIElement::uiElementCountForSearchPredicate(JSContextRef context, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly, bool immediateDescendantsOnly)
591 {
592     return 0;
593 }
594
595 AccessibilityUIElement AccessibilityUIElement::uiElementForSearchPredicate(JSContextRef context, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly, bool immediateDescendantsOnly)
596 {
597     return 0;
598 }
599
600 JSStringRef AccessibilityUIElement::selectTextWithCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString, JSStringRef activity)
601 {
602     return 0;
603 }
604
605 AccessibilityUIElement AccessibilityUIElement::cellForColumnAndRow(unsigned column, unsigned row)
606 {
607     return 0;
608 }
609
610 JSStringRef AccessibilityUIElement::selectedTextRange()
611 {
612     return JSStringCreateWithCharacters(0, 0);    
613 }
614
615 void AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned length)
616 {
617 }
618
619 JSStringRef AccessibilityUIElement::stringAttributeValue(JSStringRef attribute)
620 {
621     // FIXME: implement
622     return JSStringCreateWithCharacters(0, 0);
623 }
624
625 double AccessibilityUIElement::numberAttributeValue(JSStringRef attribute)
626 {
627     // FIXME: implement
628     return 0;
629 }
630
631 bool AccessibilityUIElement::boolAttributeValue(JSStringRef attribute)
632 {
633     // FIXME: implement
634     return false;
635 }
636
637 bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
638 {
639     return false;
640 }
641
642 bool AccessibilityUIElement::isAttributeSupported(JSStringRef attribute)
643 {
644     return false;
645 }
646
647 void AccessibilityUIElement::increment()
648 {
649 }
650
651 void AccessibilityUIElement::decrement()
652 {
653 }
654
655 void AccessibilityUIElement::showMenu()
656 {
657     if (!m_element)
658         return;
659
660     ASSERT(hasPopup());
661     m_element->accDoDefaultAction(self());
662 }
663
664 void AccessibilityUIElement::press()
665 {
666     if (!m_element)
667         return;
668
669     m_element->accDoDefaultAction(self());
670 }
671
672 AccessibilityUIElement AccessibilityUIElement::disclosedRowAtIndex(unsigned index)
673 {
674     return 0;
675 }
676
677 AccessibilityUIElement AccessibilityUIElement::ariaOwnsElementAtIndex(unsigned index)
678 {
679     return 0;
680 }
681
682 AccessibilityUIElement AccessibilityUIElement::ariaFlowToElementAtIndex(unsigned index)
683 {
684     return 0;
685 }
686
687 AccessibilityUIElement AccessibilityUIElement::ariaControlsElementAtIndex(unsigned index)
688 {
689     return 0;
690 }
691
692 AccessibilityUIElement AccessibilityUIElement::selectedRowAtIndex(unsigned index)
693 {
694     return 0;
695 }
696
697 AccessibilityUIElement AccessibilityUIElement::rowAtIndex(unsigned index)
698 {
699     return 0;
700 }
701
702 AccessibilityUIElement AccessibilityUIElement::disclosedByRow()
703 {
704     return 0;
705 }
706
707 JSStringRef AccessibilityUIElement::accessibilityValue() const
708 {
709     if (!m_element)
710         return JSStringCreateWithCharacters(0, 0);
711
712     _bstr_t valueBSTR;
713     if (FAILED(m_element->get_accValue(self(), &valueBSTR.GetBSTR())) || !valueBSTR.length())
714         return JSStringCreateWithCharacters(0, 0);
715
716     return JSStringCreateWithBSTR(valueBSTR);
717 }
718
719
720 JSStringRef AccessibilityUIElement::documentEncoding()
721 {
722     return JSStringCreateWithCharacters(0, 0);
723 }
724
725 JSStringRef AccessibilityUIElement::documentURI()
726 {
727     return JSStringCreateWithCharacters(0, 0);
728 }
729
730 JSStringRef AccessibilityUIElement::url()
731 {
732     // FIXME: implement
733     return JSStringCreateWithCharacters(0, 0);
734 }
735
736 bool AccessibilityUIElement::addNotificationListener(JSObjectRef functionCallback)
737 {
738     if (!functionCallback)
739         return false;
740
741     sharedFrameLoadDelegate->accessibilityController()->winAddNotificationListener(m_element, functionCallback);
742     return true;
743 }
744
745 void AccessibilityUIElement::removeNotificationListener()
746 {
747     // FIXME: implement
748 }
749
750 bool AccessibilityUIElement::isFocusable() const
751 {
752     // FIXME: implement
753     return false;
754 }
755
756 bool AccessibilityUIElement::isSelectable() const
757 {
758     DWORD state = accessibilityState(m_element);
759     return (state & STATE_SYSTEM_SELECTABLE) == STATE_SYSTEM_SELECTABLE;
760 }
761
762 bool AccessibilityUIElement::isMultiSelectable() const
763 {
764     DWORD multiSelectable = STATE_SYSTEM_EXTSELECTABLE | STATE_SYSTEM_MULTISELECTABLE;
765     DWORD state = accessibilityState(m_element);
766     return (state & multiSelectable) == multiSelectable;
767 }
768
769 bool AccessibilityUIElement::isSelectedOptionActive() const
770 {
771     // FIXME: implement
772     return false;
773 }
774
775 bool AccessibilityUIElement::isVisible() const
776 {
777     DWORD state = accessibilityState(m_element);
778     return (state & STATE_SYSTEM_INVISIBLE) != STATE_SYSTEM_INVISIBLE;
779 }
780
781 bool AccessibilityUIElement::isOffScreen() const
782 {
783     DWORD state = accessibilityState(m_element);
784     return (state & STATE_SYSTEM_OFFSCREEN) == STATE_SYSTEM_OFFSCREEN;
785 }
786
787 bool AccessibilityUIElement::isCollapsed() const
788 {
789     DWORD state = accessibilityState(m_element);
790     return (state & STATE_SYSTEM_COLLAPSED) == STATE_SYSTEM_COLLAPSED;
791 }
792
793 bool AccessibilityUIElement::isIgnored() const
794 {
795     // FIXME: implement
796     return false;
797 }
798
799 bool AccessibilityUIElement::hasPopup() const
800 {
801     DWORD state = accessibilityState(m_element);
802     return (state & STATE_SYSTEM_HASPOPUP) == STATE_SYSTEM_HASPOPUP;
803 }
804
805 void AccessibilityUIElement::takeFocus()
806 {
807     if (!m_element)
808         return;
809
810     m_element->accSelect(SELFLAG_TAKEFOCUS, self());
811 }
812
813 void AccessibilityUIElement::takeSelection()
814 {
815     if (!m_element)
816         return;
817
818     m_element->accSelect(SELFLAG_TAKESELECTION, self());
819 }
820
821 void AccessibilityUIElement::addSelection()
822 {
823     if (!m_element)
824         return;
825
826     m_element->accSelect(SELFLAG_ADDSELECTION, self());
827 }
828
829 void AccessibilityUIElement::removeSelection()
830 {
831     if (!m_element)
832         return;
833
834     m_element->accSelect(SELFLAG_REMOVESELECTION, self());
835 }
836
837 void AccessibilityUIElement::scrollToMakeVisible()
838 {
839     // FIXME: implement
840 }
841
842 void AccessibilityUIElement::scrollToMakeVisibleWithSubFocus(int x, int y, int width, int height)
843 {
844     // FIXME: implement
845 }
846
847 void AccessibilityUIElement::scrollToGlobalPoint(int x, int y)
848 {
849     // FIXME: implement
850 }
851
852 JSStringRef AccessibilityUIElement::classList() const
853 {
854     // FIXME: implement
855     return 0;
856 }
857
858 unsigned AccessibilityUIElement::selectedChildrenCount() const
859 {
860     // FIXME: implement
861     return 0;
862 }
863
864 AccessibilityUIElement AccessibilityUIElement::selectedChildAtIndex(unsigned) const
865 {
866     // FIXME: implement
867     return 0;
868 }
869
870 void AccessibilityUIElement::columnHeaders(Vector<AccessibilityUIElement>&) const
871 {
872     // FIXME: implement
873 }
874
875 void AccessibilityUIElement::rowHeaders(Vector<AccessibilityUIElement>&) const
876 {
877     // FIXME: implement
878 }