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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp

Issue 2688893002: Migrate WTF::HashSet::add() to ::insert() [continued] (Closed)
Patch Set: rebase, fix one platform-specific reference Created 3 years, 10 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) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, Google 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 return 0; 420 return 0;
421 } 421 }
422 422
423 // There should only be one banner/contentInfo per page. If header/footer are 423 // There should only be one banner/contentInfo per page. If header/footer are
424 // being used within an article, aside, nave, section, blockquote, details, 424 // being used within an article, aside, nave, section, blockquote, details,
425 // fieldset, figure, td, or main, then it should not be exposed as whole 425 // fieldset, figure, td, or main, then it should not be exposed as whole
426 // page's banner/contentInfo. 426 // page's banner/contentInfo.
427 static HashSet<QualifiedName>& getLandmarkRolesNotAllowed() { 427 static HashSet<QualifiedName>& getLandmarkRolesNotAllowed() {
428 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, landmarkRolesNotAllowed, ()); 428 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, landmarkRolesNotAllowed, ());
429 if (landmarkRolesNotAllowed.isEmpty()) { 429 if (landmarkRolesNotAllowed.isEmpty()) {
430 landmarkRolesNotAllowed.add(articleTag); 430 landmarkRolesNotAllowed.insert(articleTag);
431 landmarkRolesNotAllowed.add(asideTag); 431 landmarkRolesNotAllowed.insert(asideTag);
432 landmarkRolesNotAllowed.add(navTag); 432 landmarkRolesNotAllowed.insert(navTag);
433 landmarkRolesNotAllowed.add(sectionTag); 433 landmarkRolesNotAllowed.insert(sectionTag);
434 landmarkRolesNotAllowed.add(blockquoteTag); 434 landmarkRolesNotAllowed.insert(blockquoteTag);
435 landmarkRolesNotAllowed.add(detailsTag); 435 landmarkRolesNotAllowed.insert(detailsTag);
436 landmarkRolesNotAllowed.add(fieldsetTag); 436 landmarkRolesNotAllowed.insert(fieldsetTag);
437 landmarkRolesNotAllowed.add(figureTag); 437 landmarkRolesNotAllowed.insert(figureTag);
438 landmarkRolesNotAllowed.add(tdTag); 438 landmarkRolesNotAllowed.insert(tdTag);
439 landmarkRolesNotAllowed.add(mainTag); 439 landmarkRolesNotAllowed.insert(mainTag);
440 } 440 }
441 return landmarkRolesNotAllowed; 441 return landmarkRolesNotAllowed;
442 } 442 }
443 443
444 bool AXNodeObject::isDescendantOfElementType( 444 bool AXNodeObject::isDescendantOfElementType(
445 HashSet<QualifiedName>& tagNames) const { 445 HashSet<QualifiedName>& tagNames) const {
446 if (!getNode()) 446 if (!getNode())
447 return false; 447 return false;
448 448
449 for (Element* parent = getNode()->parentElement(); parent; 449 for (Element* parent = getNode()->parentElement(); parent;
(...skipping 2665 matching lines...) Expand 10 before | Expand all | Expand 10 after
3115 return String(); 3115 return String();
3116 return toTextControlElement(node)->strippedPlaceholder(); 3116 return toTextControlElement(node)->strippedPlaceholder();
3117 } 3117 }
3118 3118
3119 DEFINE_TRACE(AXNodeObject) { 3119 DEFINE_TRACE(AXNodeObject) {
3120 visitor->trace(m_node); 3120 visitor->trace(m_node);
3121 AXObject::trace(visitor); 3121 AXObject::trace(visitor);
3122 } 3122 }
3123 3123
3124 } // namespace blink 3124 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698