| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 virtual void appendEndTag(const Element&); | 52 virtual void appendEndTag(const Element&); |
| 53 void appendStartMarkup(StringBuilder&, Node&, Namespaces*); | 53 void appendStartMarkup(StringBuilder&, Node&, Namespaces*); |
| 54 void appendEndMarkup(StringBuilder&, const Element&); | 54 void appendEndMarkup(StringBuilder&, const Element&); |
| 55 | 55 |
| 56 size_t length() const { return m_markup.length(); } | 56 size_t length() const { return m_markup.length(); } |
| 57 void concatenateMarkup(StringBuilder&) const; | 57 void concatenateMarkup(StringBuilder&) const; |
| 58 | 58 |
| 59 bool serializeAsHTMLDocument(const Node&) const; | 59 bool serializeAsHTMLDocument(const Node&) const; |
| 60 String toString() { return m_markup.toString(); } | 60 String toString() { return m_markup.toString(); } |
| 61 | 61 |
| 62 void appendAttributeValue(StringBuilder&, const String&, bool); | |
| 63 virtual void appendCustomAttributes(StringBuilder&, const Element&, Namespac
es*); | 62 virtual void appendCustomAttributes(StringBuilder&, const Element&, Namespac
es*); |
| 64 | 63 |
| 65 void appendNamespace(StringBuilder&, const AtomicString& prefix, const Atomi
cString& namespaceURI, Namespaces&); | |
| 66 virtual void appendText(StringBuilder&, Text&); | 64 virtual void appendText(StringBuilder&, Text&); |
| 67 void appendXMLDeclaration(StringBuilder&, const Document&); | |
| 68 void appendDocumentType(StringBuilder&, const DocumentType&); | |
| 69 void appendProcessingInstruction(StringBuilder&, const String& target, const
String& data); | |
| 70 virtual bool shouldIgnoreAttribute(const Attribute&); | 65 virtual bool shouldIgnoreAttribute(const Attribute&); |
| 71 virtual void appendElement(StringBuilder&, Element&, Namespaces*); | 66 virtual void appendElement(StringBuilder&, Element&, Namespaces*); |
| 72 void appendOpenTag(StringBuilder&, const Element&, Namespaces*); | 67 void appendOpenTag(StringBuilder&, const Element&, Namespaces*); |
| 73 void appendCloseTag(StringBuilder&, const Element&); | 68 void appendCloseTag(StringBuilder&, const Element&); |
| 74 void appendAttribute(StringBuilder&, const Element&, const Attribute&, Names
paces*); | 69 void appendAttribute(StringBuilder&, const Element&, const Attribute&, Names
paces*); |
| 75 void appendCDATASection(StringBuilder&, const String&); | |
| 76 | 70 |
| 77 bool shouldAddNamespaceElement(const Element&, Namespaces&) const; | |
| 78 bool shouldAddNamespaceAttribute(const Attribute&, const Element&) const; | |
| 79 EntityMask entityMaskForText(const Text&) const; | 71 EntityMask entityMaskForText(const Text&) const; |
| 80 bool shouldSelfClose(const Element&) const; | |
| 81 | 72 |
| 82 private: | 73 private: |
| 83 MarkupFormatter m_formatter; | 74 MarkupFormatter m_formatter; |
| 84 StringBuilder m_markup; | 75 StringBuilder m_markup; |
| 85 }; | 76 }; |
| 86 | 77 |
| 87 template<typename Strategy> | 78 template<typename Strategy> |
| 88 String serializeNodes(MarkupAccumulator&, Node&, EChildrenOnly); | 79 String serializeNodes(MarkupAccumulator&, Node&, EChildrenOnly); |
| 89 | 80 |
| 90 extern template String serializeNodes<EditingStrategy>(MarkupAccumulator&, Node&
, EChildrenOnly); | 81 extern template String serializeNodes<EditingStrategy>(MarkupAccumulator&, Node&
, EChildrenOnly); |
| 91 | 82 |
| 92 } | 83 } |
| 93 | 84 |
| 94 #endif | 85 #endif |
| OLD | NEW |