Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 | 68 |
| 69 virtual bool isListBoxOption() const OVERRIDE { return true; } | 69 virtual bool isListBoxOption() const OVERRIDE { return true; } |
| 70 virtual bool canHaveChildren() const OVERRIDE { return false; } | 70 virtual bool canHaveChildren() const OVERRIDE { return false; } |
| 71 virtual bool computeAccessibilityIsIgnored() const OVERRIDE; | 71 virtual bool computeAccessibilityIsIgnored() const OVERRIDE; |
| 72 | 72 |
| 73 HTMLSelectElement* listBoxOptionParentNode() const; | 73 HTMLSelectElement* listBoxOptionParentNode() const; |
| 74 int listBoxOptionIndex() const; | 74 int listBoxOptionIndex() const; |
| 75 AXObject* listBoxOptionAXObject(HTMLElement*) const; | 75 AXObject* listBoxOptionAXObject(HTMLElement*) const; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 inline AXListBoxOption* toAXListBoxOption(AXObject* object) | 78 DEFINE_AX_OBJECT_TYPE_CASTS(AXListBoxOption, isListBoxOption()); |
|
r.kasibhatla
2013/10/21 12:28:31
Wouldn't it be better to construct even isFoo from
tkent
2013/10/21 22:06:11
We should go ahead with this CL as is, and discuss
| |
| 79 { | |
| 80 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isListBoxOption()); | |
| 81 return static_cast<AXListBoxOption*>(object); | |
| 82 } | |
| 83 | |
| 84 inline const AXListBoxOption* toAXListBoxOption(const AXObject* object) | |
| 85 { | |
| 86 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isListBoxOption()); | |
| 87 return static_cast<const AXListBoxOption*>(object); | |
| 88 } | |
| 89 | |
| 90 // This will catch anyone doing an unnecessary cast. | |
| 91 void toAXListBoxOption(const AXListBoxOption*); | |
| 92 | 79 |
| 93 } // namespace WebCore | 80 } // namespace WebCore |
| 94 | 81 |
| 95 #endif // AXListBoxOption_h | 82 #endif // AXListBoxOption_h |
| OLD | NEW |