Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Side by Side Diff: Source/modules/accessibility/AXLayoutObject.cpp

Issue 1214183002: ancestorForWhichThisIsAPresentationalChild shouldn't create parent AXObject Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698