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

Side by Side Diff: Source/core/css/StyleSheetContents.cpp

Issue 138643003: Simpler return value of HashTable::add/HashMap:add and others (Closed)
Patch Set: Daily master update (now with base url?) Created 6 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
« no previous file with comments | « Source/core/css/RuleSet.cpp ('k') | Source/core/css/resolver/MatchedPropertiesCache.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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 m_childRules.remove(childVectorIndex); 293 m_childRules.remove(childVectorIndex);
294 } 294 }
295 295
296 void StyleSheetContents::parserAddNamespace(const AtomicString& prefix, const At omicString& uri) 296 void StyleSheetContents::parserAddNamespace(const AtomicString& prefix, const At omicString& uri)
297 { 297 {
298 if (uri.isNull() || prefix.isNull()) 298 if (uri.isNull() || prefix.isNull())
299 return; 299 return;
300 PrefixNamespaceURIMap::AddResult result = m_namespaces.add(prefix, uri); 300 PrefixNamespaceURIMap::AddResult result = m_namespaces.add(prefix, uri);
301 if (result.isNewEntry) 301 if (result.isNewEntry)
302 return; 302 return;
303 result.iterator->value = uri; 303 result.storedValue->value = uri;
304 } 304 }
305 305
306 const AtomicString& StyleSheetContents::determineNamespace(const AtomicString& p refix) 306 const AtomicString& StyleSheetContents::determineNamespace(const AtomicString& p refix)
307 { 307 {
308 if (prefix.isNull()) 308 if (prefix.isNull())
309 return nullAtom; // No namespace. If an element/attribute has a namespac e, we won't match it. 309 return nullAtom; // No namespace. If an element/attribute has a namespac e, we won't match it.
310 if (prefix == starAtom) 310 if (prefix == starAtom)
311 return starAtom; // We'll match any namespace. 311 return starAtom; // We'll match any namespace.
312 return m_namespaces.get(prefix); 312 return m_namespaces.get(prefix);
313 } 313 }
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 } 573 }
574 m_ruleSet.clear(); 574 m_ruleSet.clear();
575 } 575 }
576 576
577 577
578 void StyleSheetContents::trace(Visitor*) 578 void StyleSheetContents::trace(Visitor*)
579 { 579 {
580 } 580 }
581 581
582 } 582 }
OLDNEW
« no previous file with comments | « Source/core/css/RuleSet.cpp ('k') | Source/core/css/resolver/MatchedPropertiesCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698