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

Side by Side Diff: third_party/WebKit/Source/core/dom/DocumentOrderedMap.h

Issue 1939303002: Enable accessible name of a control to include multiple <label> elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't modify visited set when computing aria-labelledby Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void add(const AtomicString&, Element*); 51 void add(const AtomicString&, Element*);
52 void remove(const AtomicString&, Element*); 52 void remove(const AtomicString&, Element*);
53 53
54 bool contains(const AtomicString&) const; 54 bool contains(const AtomicString&) const;
55 bool containsMultiple(const AtomicString&) const; 55 bool containsMultiple(const AtomicString&) const;
56 // concrete instantiations of the get<>() method template 56 // concrete instantiations of the get<>() method template
57 Element* getElementById(const AtomicString&, const TreeScope*) const; 57 Element* getElementById(const AtomicString&, const TreeScope*) const;
58 const HeapVector<Member<Element>>& getAllElementsById(const AtomicString&, c onst TreeScope*) const; 58 const HeapVector<Member<Element>>& getAllElementsById(const AtomicString&, c onst TreeScope*) const;
59 Element* getElementByMapName(const AtomicString&, const TreeScope*) const; 59 Element* getElementByMapName(const AtomicString&, const TreeScope*) const;
60 Element* getElementByLowercasedMapName(const AtomicString&, const TreeScope* ) const; 60 Element* getElementByLowercasedMapName(const AtomicString&, const TreeScope* ) const;
61 Element* getElementByLabelForAttribute(const AtomicString&, const TreeScope* ) const;
62 61
63 DECLARE_TRACE(); 62 DECLARE_TRACE();
64 63
65 #if DCHECK_IS_ON() 64 #if DCHECK_IS_ON()
66 // While removing a ContainerNode, ID lookups won't be precise should the tr ee 65 // While removing a ContainerNode, ID lookups won't be precise should the tr ee
67 // have elements with duplicate IDs contained in the element being removed. 66 // have elements with duplicate IDs contained in the element being removed.
68 // Rare trees, but ID lookups may legitimately fail across such removals; 67 // Rare trees, but ID lookups may legitimately fail across such removals;
69 // this scope object informs DocumentOrderedMaps about the transitory 68 // this scope object informs DocumentOrderedMaps about the transitory
70 // state of the underlying tree. 69 // state of the underlying tree.
71 class RemoveScope { 70 class RemoveScope {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 115
117 inline bool DocumentOrderedMap::containsMultiple(const AtomicString& id) const 116 inline bool DocumentOrderedMap::containsMultiple(const AtomicString& id) const
118 { 117 {
119 Map::const_iterator it = m_map.find(id); 118 Map::const_iterator it = m_map.find(id);
120 return it != m_map.end() && it->value->count > 1; 119 return it != m_map.end() && it->value->count > 1;
121 } 120 }
122 121
123 } // namespace blink 122 } // namespace blink
124 123
125 #endif // DocumentOrderedMap_h 124 #endif // DocumentOrderedMap_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698