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

Side by Side Diff: Source/core/accessibility/AXRenderObject.cpp

Issue 183183005: Add an accessibility role for the iframe element (re-land). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 8 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 | « Source/core/accessibility/AXObject.h ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 if (node && node->hasTagName(addressTag)) 383 if (node && node->hasTagName(addressTag))
384 return ContentInfoRole; 384 return ContentInfoRole;
385 385
386 if (node && node->hasTagName(dialogTag)) 386 if (node && node->hasTagName(dialogTag))
387 return DialogRole; 387 return DialogRole;
388 388
389 // The HTML element should not be exposed as an element. That's what the Ren derView element does. 389 // The HTML element should not be exposed as an element. That's what the Ren derView element does.
390 if (isHTMLHtmlElement(node)) 390 if (isHTMLHtmlElement(node))
391 return IgnoredRole; 391 return IgnoredRole;
392 392
393 if (node && node->hasTagName(iframeTag))
394 return IframeRole;
395
393 // There should only be one banner/contentInfo per page. If header/footer ar e being used within an article or section 396 // There should only be one banner/contentInfo per page. If header/footer ar e being used within an article or section
394 // then it should not be exposed as whole page's banner/contentInfo 397 // then it should not be exposed as whole page's banner/contentInfo
395 if (node && node->hasTagName(headerTag) && !isDescendantOfElementType(articl eTag) && !isDescendantOfElementType(sectionTag)) 398 if (node && node->hasTagName(headerTag) && !isDescendantOfElementType(articl eTag) && !isDescendantOfElementType(sectionTag))
396 return BannerRole; 399 return BannerRole;
397 if (node && node->hasTagName(footerTag) && !isDescendantOfElementType(articl eTag) && !isDescendantOfElementType(sectionTag)) 400 if (node && node->hasTagName(footerTag) && !isDescendantOfElementType(articl eTag) && !isDescendantOfElementType(sectionTag))
398 return FooterRole; 401 return FooterRole;
399 402
400 if (isHTMLAnchorElement(node) && isClickable()) 403 if (isHTMLAnchorElement(node) && isClickable())
401 return LinkRole; 404 return LinkRole;
402 405
(...skipping 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after
2344 if (label && label->renderer()) { 2347 if (label && label->renderer()) {
2345 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2348 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2346 result.unite(labelRect); 2349 result.unite(labelRect);
2347 } 2350 }
2348 } 2351 }
2349 2352
2350 return result; 2353 return result;
2351 } 2354 }
2352 2355
2353 } // namespace WebCore 2356 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/accessibility/AXObject.h ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698