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

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

Issue 23464095: WTF::notFound looks too much like a local variable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 m_imageMapsByName->remove(name, imageMap); 201 m_imageMapsByName->remove(name, imageMap);
202 } 202 }
203 203
204 HTMLMapElement* TreeScope::getImageMap(const String& url) const 204 HTMLMapElement* TreeScope::getImageMap(const String& url) const
205 { 205 {
206 if (url.isNull()) 206 if (url.isNull())
207 return 0; 207 return 0;
208 if (!m_imageMapsByName) 208 if (!m_imageMapsByName)
209 return 0; 209 return 0;
210 size_t hashPos = url.find('#'); 210 size_t hashPos = url.find('#');
211 String name = (hashPos == notFound ? url : url.substring(hashPos + 1)).impl( ); 211 String name = (hashPos == kNotFound ? url : url.substring(hashPos + 1)).impl ();
212 if (rootNode()->document().isHTMLDocument()) 212 if (rootNode()->document().isHTMLDocument())
213 return toHTMLMapElement(m_imageMapsByName->getElementByLowercasedMapName (AtomicString(name.lower()).impl(), this)); 213 return toHTMLMapElement(m_imageMapsByName->getElementByLowercasedMapName (AtomicString(name.lower()).impl(), this));
214 return toHTMLMapElement(m_imageMapsByName->getElementByMapName(AtomicString( name).impl(), this)); 214 return toHTMLMapElement(m_imageMapsByName->getElementByMapName(AtomicString( name).impl(), this));
215 } 215 }
216 216
217 Node* nodeFromPoint(Document* document, int x, int y, LayoutPoint* localPoint) 217 Node* nodeFromPoint(Document* document, int x, int y, LayoutPoint* localPoint)
218 { 218 {
219 Frame* frame = document->frame(); 219 Frame* frame = document->frame();
220 220
221 if (!frame) 221 if (!frame)
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 result = element; 494 result = element;
495 for (ShadowRoot* shadowRoot = element->youngestShadowRoot(); shadowRoot; shadowRoot = shadowRoot->olderShadowRoot()) { 495 for (ShadowRoot* shadowRoot = element->youngestShadowRoot(); shadowRoot; shadowRoot = shadowRoot->olderShadowRoot()) {
496 if (Element* shadowResult = shadowRoot->getElementByAccessKey(key)) 496 if (Element* shadowResult = shadowRoot->getElementByAccessKey(key))
497 result = shadowResult; 497 result = shadowResult;
498 } 498 }
499 } 499 }
500 return result; 500 return result;
501 } 501 }
502 502
503 } // namespace WebCore 503 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/NodeRenderingContext.cpp ('k') | Source/core/dom/shadow/ContentDistribution.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698