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

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

Issue 19098002: Introduce isHTMLHtmlElement and toHTMLHtmlElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 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 | Source/core/css/CSSDefaultStyleSheets.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 21 matching lines...) Expand all
32 #include "core/accessibility/AXObjectCache.h" 32 #include "core/accessibility/AXObjectCache.h"
33 #include "core/accessibility/AccessibilityImageMapLink.h" 33 #include "core/accessibility/AccessibilityImageMapLink.h"
34 #include "core/accessibility/AccessibilitySVGRoot.h" 34 #include "core/accessibility/AccessibilitySVGRoot.h"
35 #include "core/accessibility/AccessibilitySpinButton.h" 35 #include "core/accessibility/AccessibilitySpinButton.h"
36 #include "core/accessibility/AccessibilityTable.h" 36 #include "core/accessibility/AccessibilityTable.h"
37 #include "core/dom/NodeTraversal.h" 37 #include "core/dom/NodeTraversal.h"
38 #include "core/editing/FrameSelection.h" 38 #include "core/editing/FrameSelection.h"
39 #include "core/editing/RenderedPosition.h" 39 #include "core/editing/RenderedPosition.h"
40 #include "core/editing/VisibleUnits.h" 40 #include "core/editing/VisibleUnits.h"
41 #include "core/editing/htmlediting.h" 41 #include "core/editing/htmlediting.h"
42 #include "core/html/HTMLHtmlElement.h"
42 #include "core/html/HTMLImageElement.h" 43 #include "core/html/HTMLImageElement.h"
43 #include "core/html/HTMLLabelElement.h" 44 #include "core/html/HTMLLabelElement.h"
44 #include "core/html/HTMLOptionElement.h" 45 #include "core/html/HTMLOptionElement.h"
45 #include "core/html/HTMLSelectElement.h" 46 #include "core/html/HTMLSelectElement.h"
46 #include "core/html/HTMLTextAreaElement.h" 47 #include "core/html/HTMLTextAreaElement.h"
47 #include "core/loader/ProgressTracker.h" 48 #include "core/loader/ProgressTracker.h"
48 #include "core/page/Page.h" 49 #include "core/page/Page.h"
49 #include "core/platform/LocalizedStrings.h" 50 #include "core/platform/LocalizedStrings.h"
50 #include "core/rendering/HitTestResult.h" 51 #include "core/rendering/HitTestResult.h"
51 #include "core/rendering/RenderFieldset.h" 52 #include "core/rendering/RenderFieldset.h"
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 if (node && node->hasTagName(asideTag)) 426 if (node && node->hasTagName(asideTag))
426 return LandmarkComplementaryRole; 427 return LandmarkComplementaryRole;
427 428
428 if (node && node->hasTagName(sectionTag)) 429 if (node && node->hasTagName(sectionTag))
429 return DocumentRegionRole; 430 return DocumentRegionRole;
430 431
431 if (node && node->hasTagName(addressTag)) 432 if (node && node->hasTagName(addressTag))
432 return LandmarkContentInfoRole; 433 return LandmarkContentInfoRole;
433 434
434 // The HTML element should not be exposed as an element. That's what the Ren derView element does. 435 // The HTML element should not be exposed as an element. That's what the Ren derView element does.
435 if (node && node->hasTagName(htmlTag)) 436 if (node && isHTMLHtmlElement(node))
436 return IgnoredRole; 437 return IgnoredRole;
437 438
438 // There should only be one banner/contentInfo per page. If header/footer ar e being used within an article or section 439 // There should only be one banner/contentInfo per page. If header/footer ar e being used within an article or section
439 // then it should not be exposed as whole page's banner/contentInfo 440 // then it should not be exposed as whole page's banner/contentInfo
440 if (node && node->hasTagName(headerTag) && !isDescendantOfElementType(articl eTag) && !isDescendantOfElementType(sectionTag)) 441 if (node && node->hasTagName(headerTag) && !isDescendantOfElementType(articl eTag) && !isDescendantOfElementType(sectionTag))
441 return LandmarkBannerRole; 442 return LandmarkBannerRole;
442 if (node && node->hasTagName(footerTag) && !isDescendantOfElementType(articl eTag) && !isDescendantOfElementType(sectionTag)) 443 if (node && node->hasTagName(footerTag) && !isDescendantOfElementType(articl eTag) && !isDescendantOfElementType(sectionTag))
443 return FooterRole; 444 return FooterRole;
444 445
445 if (m_renderer->isBlockFlow()) 446 if (m_renderer->isBlockFlow())
(...skipping 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after
2512 if (label && label->renderer()) { 2513 if (label && label->renderer()) {
2513 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2514 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2514 result.unite(labelRect); 2515 result.unite(labelRect);
2515 } 2516 }
2516 } 2517 }
2517 2518
2518 return result; 2519 return result;
2519 } 2520 }
2520 2521
2521 } // namespace WebCore 2522 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/CSSDefaultStyleSheets.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698