OLD | NEW |
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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 void MarkupFormatter::appendNamespace(StringBuilder& result, const AtomicString&
prefix, const AtomicString& namespaceURI, Namespaces& namespaces) | 221 void MarkupFormatter::appendNamespace(StringBuilder& result, const AtomicString&
prefix, const AtomicString& namespaceURI, Namespaces& namespaces) |
222 { | 222 { |
223 if (namespaceURI.isEmpty()) | 223 if (namespaceURI.isEmpty()) |
224 return; | 224 return; |
225 | 225 |
226 const AtomicString& lookupKey = (!prefix) ? emptyAtom : prefix; | 226 const AtomicString& lookupKey = (!prefix) ? emptyAtom : prefix; |
227 AtomicString foundURI = namespaces.get(lookupKey); | 227 AtomicString foundURI = namespaces.get(lookupKey); |
228 if (foundURI != namespaceURI) { | 228 if (foundURI != namespaceURI) { |
229 namespaces.set(lookupKey, namespaceURI); | 229 namespaces.set(lookupKey, namespaceURI); |
230 result.append(' '); | 230 result.append(' '); |
231 result.append(xmlnsAtom.string()); | 231 result.append(xmlnsAtom.getString()); |
232 if (!prefix.isEmpty()) { | 232 if (!prefix.isEmpty()) { |
233 result.append(':'); | 233 result.append(':'); |
234 result.append(prefix); | 234 result.append(prefix); |
235 } | 235 } |
236 | 236 |
237 result.appendLiteral("=\""); | 237 result.appendLiteral("=\""); |
238 appendAttributeValue(result, namespaceURI, false); | 238 appendAttributeValue(result, namespaceURI, false); |
239 result.append('"'); | 239 result.append('"'); |
240 } | 240 } |
241 } | 241 } |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 } | 465 } |
466 | 466 |
467 bool MarkupFormatter::serializeAsHTMLDocument(const Node& node) const | 467 bool MarkupFormatter::serializeAsHTMLDocument(const Node& node) const |
468 { | 468 { |
469 if (m_serializationType == SerializationType::ForcedXML) | 469 if (m_serializationType == SerializationType::ForcedXML) |
470 return false; | 470 return false; |
471 return node.document().isHTMLDocument(); | 471 return node.document().isHTMLDocument(); |
472 } | 472 } |
473 | 473 |
474 } // namespace blink | 474 } // namespace blink |
OLD | NEW |