| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // treated as having no role or to be removed from the accessibility tree, but | 57 // treated as having no role or to be removed from the accessibility tree, but |
| 58 // does not cause the content contained within the element to be removed from | 58 // does not cause the content contained within the element to be removed from |
| 59 // the accessibility tree. | 59 // the accessibility tree. |
| 60 if (IsParentPresentationalRole()) | 60 if (IsParentPresentationalRole()) |
| 61 return kStaticTextRole; | 61 return kStaticTextRole; |
| 62 | 62 |
| 63 return kListBoxOptionRole; | 63 return kListBoxOptionRole; |
| 64 } | 64 } |
| 65 | 65 |
| 66 bool AXListBoxOption::IsParentPresentationalRole() const { | 66 bool AXListBoxOption::IsParentPresentationalRole() const { |
| 67 AXObject* parent = ParentObject(); | 67 AXObjectImpl* parent = ParentObject(); |
| 68 if (!parent) | 68 if (!parent) |
| 69 return false; | 69 return false; |
| 70 | 70 |
| 71 LayoutObject* layout_object = parent->GetLayoutObject(); | 71 LayoutObject* layout_object = parent->GetLayoutObject(); |
| 72 if (!layout_object) | 72 if (!layout_object) |
| 73 return false; | 73 return false; |
| 74 | 74 |
| 75 if (layout_object->IsListBox() && parent->HasInheritedPresentationalRole()) | 75 if (layout_object->IsListBox() && parent->HasInheritedPresentationalRole()) |
| 76 return true; | 76 return true; |
| 77 | 77 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 if (!GetNode()) | 181 if (!GetNode()) |
| 182 return 0; | 182 return 0; |
| 183 | 183 |
| 184 if (isHTMLOptionElement(GetNode())) | 184 if (isHTMLOptionElement(GetNode())) |
| 185 return toHTMLOptionElement(GetNode())->OwnerSelectElement(); | 185 return toHTMLOptionElement(GetNode())->OwnerSelectElement(); |
| 186 | 186 |
| 187 return 0; | 187 return 0; |
| 188 } | 188 } |
| 189 | 189 |
| 190 } // namespace blink | 190 } // namespace blink |
| OLD | NEW |