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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 if (!(offset + length)) | 89 if (!(offset + length)) |
90 return; | 90 return; |
91 | 91 |
92 ASSERT(offset + length <= source.length()); | 92 ASSERT(offset + length <= source.length()); |
93 if (source.is8Bit()) | 93 if (source.is8Bit()) |
94 appendCharactersReplacingEntitiesInternal(result, source.characters8() +
offset, length, entityMaps, WTF_ARRAY_LENGTH(entityMaps), entityMask); | 94 appendCharactersReplacingEntitiesInternal(result, source.characters8() +
offset, length, entityMaps, WTF_ARRAY_LENGTH(entityMaps), entityMask); |
95 else | 95 else |
96 appendCharactersReplacingEntitiesInternal(result, source.characters16()
+ offset, length, entityMaps, WTF_ARRAY_LENGTH(entityMaps), entityMask); | 96 appendCharactersReplacingEntitiesInternal(result, source.characters16()
+ offset, length, entityMaps, WTF_ARRAY_LENGTH(entityMaps), entityMask); |
97 } | 97 } |
98 | 98 |
99 MarkupAccumulator::MarkupAccumulator(Vector<Node*>* nodes, EAbsoluteURLs resolve
UrlsMethod, const Range* range, SerializationType serializationType) | 99 MarkupAccumulator::MarkupAccumulator(WillBeHeapVector<RawPtrWillBeMember<Node> >
* nodes, EAbsoluteURLs resolveUrlsMethod, const Range* range, SerializationType
serializationType) |
100 : m_nodes(nodes) | 100 : m_nodes(nodes) |
101 , m_range(range) | 101 , m_range(range) |
102 , m_resolveURLsMethod(resolveUrlsMethod) | 102 , m_resolveURLsMethod(resolveUrlsMethod) |
103 , m_serializationType(serializationType) | 103 , m_serializationType(serializationType) |
104 { | 104 { |
105 } | 105 } |
106 | 106 |
107 MarkupAccumulator::~MarkupAccumulator() | 107 MarkupAccumulator::~MarkupAccumulator() |
108 { | 108 { |
109 } | 109 } |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 } | 559 } |
560 | 560 |
561 bool MarkupAccumulator::serializeAsHTMLDocument(const Node& node) const | 561 bool MarkupAccumulator::serializeAsHTMLDocument(const Node& node) const |
562 { | 562 { |
563 if (m_serializationType == ForcedXML) | 563 if (m_serializationType == ForcedXML) |
564 return false; | 564 return false; |
565 return node.document().isHTMLDocument(); | 565 return node.document().isHTMLDocument(); |
566 } | 566 } |
567 | 567 |
568 } | 568 } |
OLD | NEW |