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

Side by Side Diff: Source/core/editing/MarkupAccumulator.cpp

Issue 19804005: Remove AtomicStringImpl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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) 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2009, 2010 Google 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 return true; 279 return true;
280 } 280 }
281 281
282 void MarkupAccumulator::appendNamespace(StringBuilder& result, const AtomicStrin g& prefix, const AtomicString& namespaceURI, Namespaces& namespaces) 282 void MarkupAccumulator::appendNamespace(StringBuilder& result, const AtomicStrin g& prefix, const AtomicString& namespaceURI, Namespaces& namespaces)
283 { 283 {
284 namespaces.checkConsistency(); 284 namespaces.checkConsistency();
285 if (namespaceURI.isEmpty()) 285 if (namespaceURI.isEmpty())
286 return; 286 return;
287 287
288 // Use emptyAtoms's impl() for both null and empty strings since the HashMap can't handle 0 as a key 288 // Use emptyAtoms's impl() for both null and empty strings since the HashMap can't handle 0 as a key
289 AtomicStringImpl* pre = prefix.isEmpty() ? emptyAtom.impl() : prefix.impl(); 289 StringImpl* pre = prefix.isEmpty() ? emptyAtom.impl() : prefix.impl();
290 AtomicStringImpl* foundNS = namespaces.get(pre); 290 StringImpl* foundNS = namespaces.get(pre);
291 if (foundNS != namespaceURI.impl()) { 291 if (foundNS != namespaceURI.impl()) {
292 namespaces.set(pre, namespaceURI.impl()); 292 namespaces.set(pre, namespaceURI.impl());
293 result.append(' '); 293 result.append(' ');
294 result.append(xmlnsAtom.string()); 294 result.append(xmlnsAtom.string());
295 if (!prefix.isEmpty()) { 295 if (!prefix.isEmpty()) {
296 result.append(':'); 296 result.append(':');
297 result.append(prefix); 297 result.append(prefix);
298 } 298 }
299 299
300 result.append('='); 300 result.append('=');
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 if (!node->isElementNode() || shouldSelfClose(node) || (!node->hasChildNodes () && elementCannotHaveEndTag(node))) 552 if (!node->isElementNode() || shouldSelfClose(node) || (!node->hasChildNodes () && elementCannotHaveEndTag(node)))
553 return; 553 return;
554 554
555 result.append('<'); 555 result.append('<');
556 result.append('/'); 556 result.append('/');
557 result.append(toElement(node)->nodeNamePreservingCase()); 557 result.append(toElement(node)->nodeNamePreservingCase());
558 result.append('>'); 558 result.append('>');
559 } 559 }
560 560
561 } 561 }
OLDNEW
« no previous file with comments | « Source/core/editing/MarkupAccumulator.h ('k') | Source/core/editing/SetNodeAttributeCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698