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

Side by Side Diff: Source/core/dom/TreeScope.cpp

Issue 112843002: Make calls to AtomicString(const String&) explicit in dom/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 Google Inc. All Rights Reserved.
3 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // as a container. 302 // as a container.
303 // See https://bugs.webkit.org/show_bug.cgi?id=82697 303 // See https://bugs.webkit.org/show_bug.cgi?id=82697
304 m_selection = DOMSelection::create(this); 304 m_selection = DOMSelection::create(this);
305 return m_selection.get(); 305 return m_selection.get();
306 } 306 }
307 307
308 Element* TreeScope::findAnchor(const String& name) 308 Element* TreeScope::findAnchor(const String& name)
309 { 309 {
310 if (name.isEmpty()) 310 if (name.isEmpty())
311 return 0; 311 return 0;
312 if (Element* element = getElementById(name)) 312 if (Element* element = getElementById(AtomicString(name)))
313 return element; 313 return element;
314 ASSERT(rootNode()); 314 ASSERT(rootNode());
315 for (Element* element = ElementTraversal::firstWithin(*rootNode()); element; element = ElementTraversal::next(*element)) { 315 for (Element* element = ElementTraversal::firstWithin(*rootNode()); element; element = ElementTraversal::next(*element)) {
316 if (isHTMLAnchorElement(element)) { 316 if (isHTMLAnchorElement(element)) {
317 HTMLAnchorElement* anchor = toHTMLAnchorElement(element); 317 HTMLAnchorElement* anchor = toHTMLAnchorElement(element);
318 if (rootNode()->document().inQuirksMode()) { 318 if (rootNode()->document().inQuirksMode()) {
319 // Quirks mode, case insensitive comparison of names. 319 // Quirks mode, case insensitive comparison of names.
320 if (equalIgnoringCase(anchor->name(), name)) 320 if (equalIgnoringCase(anchor->name(), name))
321 return anchor; 321 return anchor;
322 } else { 322 } else {
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 result = element; 492 result = element;
493 for (ShadowRoot* shadowRoot = element->youngestShadowRoot(); shadowRoot; shadowRoot = shadowRoot->olderShadowRoot()) { 493 for (ShadowRoot* shadowRoot = element->youngestShadowRoot(); shadowRoot; shadowRoot = shadowRoot->olderShadowRoot()) {
494 if (Element* shadowResult = shadowRoot->getElementByAccessKey(key)) 494 if (Element* shadowResult = shadowRoot->getElementByAccessKey(key))
495 result = shadowResult; 495 result = shadowResult;
496 } 496 }
497 } 497 }
498 return result; 498 return result;
499 } 499 }
500 500
501 } // namespace WebCore 501 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698