OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 20 matching lines...) Expand all Loading... |
31 namespace WebCore { | 31 namespace WebCore { |
32 | 32 |
33 using namespace HTMLNames; | 33 using namespace HTMLNames; |
34 | 34 |
35 AXMenuListOption::AXMenuListOption() | 35 AXMenuListOption::AXMenuListOption() |
36 { | 36 { |
37 } | 37 } |
38 | 38 |
39 void AXMenuListOption::setElement(HTMLElement* element) | 39 void AXMenuListOption::setElement(HTMLElement* element) |
40 { | 40 { |
41 ASSERT_ARG(element, element->hasTagName(optionTag)); | 41 ASSERT_ARG(element, isHTMLOptionElement(element)); |
42 m_element = element; | 42 m_element = element; |
43 } | 43 } |
44 | 44 |
45 Element* AXMenuListOption::actionElement() const | 45 Element* AXMenuListOption::actionElement() const |
46 { | 46 { |
47 return m_element.get(); | 47 return m_element.get(); |
48 } | 48 } |
49 | 49 |
50 bool AXMenuListOption::isEnabled() const | 50 bool AXMenuListOption::isEnabled() const |
51 { | 51 { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 return grandparent->elementRect(); | 104 return grandparent->elementRect(); |
105 } | 105 } |
106 | 106 |
107 String AXMenuListOption::stringValue() const | 107 String AXMenuListOption::stringValue() const |
108 { | 108 { |
109 return toHTMLOptionElement(m_element)->text(); | 109 return toHTMLOptionElement(m_element)->text(); |
110 } | 110 } |
111 | 111 |
112 } // namespace WebCore | 112 } // namespace WebCore |
OLD | NEW |