OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 } | 592 } |
593 | 593 |
594 bool WebAccessibilityObject::press() const | 594 bool WebAccessibilityObject::press() const |
595 { | 595 { |
596 if (isDetached()) | 596 if (isDetached()) |
597 return false; | 597 return false; |
598 | 598 |
599 return m_private->press(); | 599 return m_private->press(); |
600 } | 600 } |
601 | 601 |
| 602 // Deprecated in favor of role(). |
602 WebAccessibilityRole WebAccessibilityObject::roleValue() const | 603 WebAccessibilityRole WebAccessibilityObject::roleValue() const |
603 { | 604 { |
604 if (isDetached()) | 605 if (isDetached()) |
605 return WebKit::WebAccessibilityRoleUnknown; | 606 return WebKit::WebAccessibilityRoleUnknown; |
606 | 607 |
607 return static_cast<WebAccessibilityRole>(m_private->roleValue()); | 608 return static_cast<WebAccessibilityRole>(m_private->roleValue()); |
608 } | 609 } |
609 | 610 |
| 611 WebAXRole WebAccessibilityObject::role() const |
| 612 { |
| 613 if (isDetached()) |
| 614 return WebKit::WebAXRoleUnknown; |
| 615 |
| 616 return static_cast<WebAXRole>(m_private->roleValue()); |
| 617 } |
| 618 |
610 unsigned WebAccessibilityObject::selectionEnd() const | 619 unsigned WebAccessibilityObject::selectionEnd() const |
611 { | 620 { |
612 if (isDetached()) | 621 if (isDetached()) |
613 return 0; | 622 return 0; |
614 | 623 |
615 return m_private->selectedTextRange().start + m_private->selectedTextRange()
.length; | 624 return m_private->selectedTextRange().start + m_private->selectedTextRange()
.length; |
616 } | 625 } |
617 | 626 |
618 unsigned WebAccessibilityObject::selectionStart() const | 627 unsigned WebAccessibilityObject::selectionStart() const |
619 { | 628 { |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 m_private = object; | 1029 m_private = object; |
1021 return *this; | 1030 return *this; |
1022 } | 1031 } |
1023 | 1032 |
1024 WebAccessibilityObject::operator WTF::PassRefPtr<WebCore::AccessibilityObject>()
const | 1033 WebAccessibilityObject::operator WTF::PassRefPtr<WebCore::AccessibilityObject>()
const |
1025 { | 1034 { |
1026 return m_private.get(); | 1035 return m_private.get(); |
1027 } | 1036 } |
1028 | 1037 |
1029 } // namespace WebKit | 1038 } // namespace WebKit |
OLD | NEW |