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

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

Issue 147593008: Remove Element.nodeNamePreservingCase (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase against ToT 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/dom/Element.cpp ('k') | no next file » | 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 * 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 386
387 // Give an opportunity to subclasses to add their own attributes. 387 // Give an opportunity to subclasses to add their own attributes.
388 appendCustomAttributes(result, element, namespaces); 388 appendCustomAttributes(result, element, namespaces);
389 389
390 appendCloseTag(result, element); 390 appendCloseTag(result, element);
391 } 391 }
392 392
393 void MarkupAccumulator::appendOpenTag(StringBuilder& result, const Element& elem ent, Namespaces* namespaces) 393 void MarkupAccumulator::appendOpenTag(StringBuilder& result, const Element& elem ent, Namespaces* namespaces)
394 { 394 {
395 result.append('<'); 395 result.append('<');
396 result.append(element.nodeNamePreservingCase()); 396 result.append(element.tagQName().toString());
eseidel 2014/01/31 05:41:01 I see, we can't use nodeName() because it doesn't
397 if (!element.document().isHTMLDocument() && namespaces && shouldAddNamespace Element(element)) 397 if (!element.document().isHTMLDocument() && namespaces && shouldAddNamespace Element(element))
398 appendNamespace(result, element.prefix(), element.namespaceURI(), *names paces); 398 appendNamespace(result, element.prefix(), element.namespaceURI(), *names paces);
399 } 399 }
400 400
401 void MarkupAccumulator::appendCloseTag(StringBuilder& result, const Element& ele ment) 401 void MarkupAccumulator::appendCloseTag(StringBuilder& result, const Element& ele ment)
402 { 402 {
403 if (shouldSelfClose(element)) { 403 if (shouldSelfClose(element)) {
404 if (element.isHTMLElement()) 404 if (element.isHTMLElement())
405 result.append(' '); // XHTML 1.0 <-> HTML compatibility. 405 result.append(' '); // XHTML 1.0 <-> HTML compatibility.
406 result.append('/'); 406 result.append('/');
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 // which elements should be serialized w/o end tags. 519 // which elements should be serialized w/o end tags.
520 return toHTMLElement(node).ieForbidsInsertHTML(); 520 return toHTMLElement(node).ieForbidsInsertHTML();
521 } 521 }
522 522
523 void MarkupAccumulator::appendEndMarkup(StringBuilder& result, const Node& node) 523 void MarkupAccumulator::appendEndMarkup(StringBuilder& result, const Node& node)
524 { 524 {
525 if (!node.isElementNode() || shouldSelfClose(node) || (!node.hasChildNodes() && elementCannotHaveEndTag(node))) 525 if (!node.isElementNode() || shouldSelfClose(node) || (!node.hasChildNodes() && elementCannotHaveEndTag(node)))
526 return; 526 return;
527 527
528 result.appendLiteral("</"); 528 result.appendLiteral("</");
529 result.append(toElement(node).nodeNamePreservingCase()); 529 result.append(toElement(node).tagQName().toString());
530 result.append('>'); 530 result.append('>');
531 } 531 }
532 532
533 } 533 }
OLDNEW
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698