| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 // Non-breaking space needs to be escaped in innerHTML for compatibility rea
son. See http://trac.webkit.org/changeset/32879 | 51 // Non-breaking space needs to be escaped in innerHTML for compatibility rea
son. See http://trac.webkit.org/changeset/32879 |
| 52 // However, we cannot do this in a XML document because it does not have the
entity reference defined (See the bug 19215). | 52 // However, we cannot do this in a XML document because it does not have the
entity reference defined (See the bug 19215). |
| 53 EntityMaskInCDATA = 0, | 53 EntityMaskInCDATA = 0, |
| 54 EntityMaskInPCDATA = EntityAmp | EntityLt | EntityGt, | 54 EntityMaskInPCDATA = EntityAmp | EntityLt | EntityGt, |
| 55 EntityMaskInHTMLPCDATA = EntityMaskInPCDATA | EntityNbsp, | 55 EntityMaskInHTMLPCDATA = EntityMaskInPCDATA | EntityNbsp, |
| 56 EntityMaskInAttributeValue = EntityAmp | EntityQuot | EntityLt | EntityGt, | 56 EntityMaskInAttributeValue = EntityAmp | EntityQuot | EntityLt | EntityGt, |
| 57 EntityMaskInHTMLAttributeValue = EntityAmp | EntityQuot | EntityNbsp, | 57 EntityMaskInHTMLAttributeValue = EntityAmp | EntityQuot | EntityNbsp, |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 struct EntityDescription { | |
| 61 UChar entity; | |
| 62 const String& reference; | |
| 63 EntityMask mask; | |
| 64 }; | |
| 65 | |
| 66 class MarkupAccumulator { | 60 class MarkupAccumulator { |
| 67 WTF_MAKE_NONCOPYABLE(MarkupAccumulator); | 61 WTF_MAKE_NONCOPYABLE(MarkupAccumulator); |
| 68 | 62 |
| 69 public: | 63 public: |
| 70 MarkupAccumulator(Vector<Node*>*, EAbsoluteURLs, const Range* = 0); | 64 MarkupAccumulator(Vector<Node*>*, EAbsoluteURLs, const Range* = 0); |
| 71 virtual ~MarkupAccumulator(); | 65 virtual ~MarkupAccumulator(); |
| 72 | 66 |
| 73 String serializeNodes(Node* targetNode, EChildrenOnly, Vector<QualifiedName>
* tagNamesToSkip = 0); | 67 String serializeNodes(Node* targetNode, EChildrenOnly, Vector<QualifiedName>
* tagNamesToSkip = 0); |
| 74 | 68 |
| 75 static void appendComment(StringBuilder&, const String&); | 69 static void appendComment(StringBuilder&, const String&); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 void appendQuotedURLAttributeValue(StringBuilder&, const Element*, const Att
ribute&); | 106 void appendQuotedURLAttributeValue(StringBuilder&, const Element*, const Att
ribute&); |
| 113 void serializeNodesWithNamespaces(Node* targetNode, EChildrenOnly, const Nam
espaces*, Vector<QualifiedName>* tagNamesToSkip); | 107 void serializeNodesWithNamespaces(Node* targetNode, EChildrenOnly, const Nam
espaces*, Vector<QualifiedName>* tagNamesToSkip); |
| 114 | 108 |
| 115 StringBuilder m_markup; | 109 StringBuilder m_markup; |
| 116 const EAbsoluteURLs m_resolveURLsMethod; | 110 const EAbsoluteURLs m_resolveURLsMethod; |
| 117 }; | 111 }; |
| 118 | 112 |
| 119 } | 113 } |
| 120 | 114 |
| 121 #endif | 115 #endif |
| OLD | NEW |