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 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 } | 584 } |
585 | 585 |
586 bool WebAccessibilityObject::press() const | 586 bool WebAccessibilityObject::press() const |
587 { | 587 { |
588 if (isDetached()) | 588 if (isDetached()) |
589 return false; | 589 return false; |
590 | 590 |
591 return m_private->press(); | 591 return m_private->press(); |
592 } | 592 } |
593 | 593 |
| 594 // Deprecated in favor of role(). |
594 WebAccessibilityRole WebAccessibilityObject::roleValue() const | 595 WebAccessibilityRole WebAccessibilityObject::roleValue() const |
595 { | 596 { |
596 if (isDetached()) | 597 if (isDetached()) |
597 return WebKit::WebAccessibilityRoleUnknown; | 598 return WebKit::WebAccessibilityRoleUnknown; |
598 | 599 |
599 return static_cast<WebAccessibilityRole>(m_private->roleValue()); | 600 return static_cast<WebAccessibilityRole>(m_private->roleValue()); |
600 } | 601 } |
601 | 602 |
| 603 WebAXTypes::Role WebAccessibilityObject::role() const |
| 604 { |
| 605 if (isDetached()) |
| 606 return WebKit::WebAXTypes::UnknownRole; |
| 607 |
| 608 return static_cast<WebAXTypes::Role>(m_private->roleValue()); |
| 609 } |
| 610 |
602 unsigned WebAccessibilityObject::selectionEnd() const | 611 unsigned WebAccessibilityObject::selectionEnd() const |
603 { | 612 { |
604 if (isDetached()) | 613 if (isDetached()) |
605 return 0; | 614 return 0; |
606 | 615 |
607 return m_private->selectedTextRange().start + m_private->selectedTextRange()
.length; | 616 return m_private->selectedTextRange().start + m_private->selectedTextRange()
.length; |
608 } | 617 } |
609 | 618 |
610 unsigned WebAccessibilityObject::selectionStart() const | 619 unsigned WebAccessibilityObject::selectionStart() const |
611 { | 620 { |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 m_private = object; | 1021 m_private = object; |
1013 return *this; | 1022 return *this; |
1014 } | 1023 } |
1015 | 1024 |
1016 WebAccessibilityObject::operator WTF::PassRefPtr<WebCore::AccessibilityObject>()
const | 1025 WebAccessibilityObject::operator WTF::PassRefPtr<WebCore::AccessibilityObject>()
const |
1017 { | 1026 { |
1018 return m_private.get(); | 1027 return m_private.get(); |
1019 } | 1028 } |
1020 | 1029 |
1021 } // namespace WebKit | 1030 } // namespace WebKit |
OLD | NEW |