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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 EntityLt = 0x0002, | 46 EntityLt = 0x0002, |
47 EntityGt = 0x0004, | 47 EntityGt = 0x0004, |
48 EntityQuot = 0x0008, | 48 EntityQuot = 0x0008, |
49 EntityNbsp = 0x0010, | 49 EntityNbsp = 0x0010, |
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 | EntityLt | EntityGt | EntityQuot, | 56 EntityMaskInAttributeValue = EntityAmp | EntityQuot | EntityLt | EntityGt, |
57 EntityMaskInHTMLAttributeValue = EntityMaskInAttributeValue | EntityNbsp, | 57 EntityMaskInHTMLAttributeValue = EntityAmp | EntityQuot | EntityNbsp, |
58 }; | 58 }; |
59 | 59 |
60 struct EntityDescription { | 60 struct EntityDescription { |
61 UChar entity; | 61 UChar entity; |
62 const String& reference; | 62 const String& reference; |
63 EntityMask mask; | 63 EntityMask mask; |
64 }; | 64 }; |
65 | 65 |
66 class MarkupAccumulator { | 66 class MarkupAccumulator { |
67 WTF_MAKE_NONCOPYABLE(MarkupAccumulator); | 67 WTF_MAKE_NONCOPYABLE(MarkupAccumulator); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 void appendQuotedURLAttributeValue(StringBuilder&, const Element*, const Att
ribute&); | 113 void appendQuotedURLAttributeValue(StringBuilder&, const Element*, const Att
ribute&); |
114 void serializeNodesWithNamespaces(Node* targetNode, EChildrenOnly, const Nam
espaces*, Vector<QualifiedName>* tagNamesToSkip); | 114 void serializeNodesWithNamespaces(Node* targetNode, EChildrenOnly, const Nam
espaces*, Vector<QualifiedName>* tagNamesToSkip); |
115 | 115 |
116 StringBuilder m_markup; | 116 StringBuilder m_markup; |
117 const EAbsoluteURLs m_resolveURLsMethod; | 117 const EAbsoluteURLs m_resolveURLsMethod; |
118 }; | 118 }; |
119 | 119 |
120 } | 120 } |
121 | 121 |
122 #endif | 122 #endif |
OLD | NEW |