| 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 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 // case SeparatorRole: | 1237 // case SeparatorRole: |
| 1238 return true; | 1238 return true; |
| 1239 default: | 1239 default: |
| 1240 return false; | 1240 return false; |
| 1241 } | 1241 } |
| 1242 } | 1242 } |
| 1243 | 1243 |
| 1244 AXObject* AXLayoutObject::ancestorForWhichThisIsAPresentationalChild() const | 1244 AXObject* AXLayoutObject::ancestorForWhichThisIsAPresentationalChild() const |
| 1245 { | 1245 { |
| 1246 // Walk the parent chain looking for a parent that has presentational childr
en | 1246 // Walk the parent chain looking for a parent that has presentational childr
en |
| 1247 AXObject* parent = parentObject(); | 1247 AXObject* parent = parentObjectIfExists(); |
| 1248 while (parent) { | 1248 while (parent) { |
| 1249 if (parent->ariaRoleHasPresentationalChildren()) | 1249 if (parent->ariaRoleHasPresentationalChildren()) |
| 1250 break; | 1250 break; |
| 1251 | 1251 |
| 1252 // The descendants of a AXMenuList that are AXLayoutObjects are all | 1252 // The descendants of a AXMenuList that are AXLayoutObjects are all |
| 1253 // presentational. (The real descendants are a AXMenuListPopup and | 1253 // presentational. (The real descendants are a AXMenuListPopup and |
| 1254 // AXMenuListOptions, which are not AXLayoutObjects.) | 1254 // AXMenuListOptions, which are not AXLayoutObjects.) |
| 1255 if (parent->isMenuList()) | 1255 if (parent->isMenuList()) |
| 1256 break; | 1256 break; |
| 1257 | 1257 |
| (...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2508 if (label && label->layoutObject()) { | 2508 if (label && label->layoutObject()) { |
| 2509 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); | 2509 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); |
| 2510 result.unite(labelRect); | 2510 result.unite(labelRect); |
| 2511 } | 2511 } |
| 2512 } | 2512 } |
| 2513 | 2513 |
| 2514 return result; | 2514 return result; |
| 2515 } | 2515 } |
| 2516 | 2516 |
| 2517 } // namespace blink | 2517 } // namespace blink |
| OLD | NEW |