| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) |
| 3 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
| 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * Copyright (C) 2008 Holger Hans Peter Freyther | 7 * Copyright (C) 2008 Holger Hans Peter Freyther |
| 8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1154 | 1154 |
| 1155 pi->finishParsingChildren(); | 1155 pi->finishParsingChildren(); |
| 1156 | 1156 |
| 1157 if (pi->isCSS()) | 1157 if (pi->isCSS()) |
| 1158 m_sawCSS = true; | 1158 m_sawCSS = true; |
| 1159 | 1159 |
| 1160 if (!RuntimeEnabledFeatures::xsltEnabled()) | 1160 if (!RuntimeEnabledFeatures::xsltEnabled()) |
| 1161 return; | 1161 return; |
| 1162 | 1162 |
| 1163 m_sawXSLTransform = !m_sawFirstElement && pi->isXSL(); | 1163 m_sawXSLTransform = !m_sawFirstElement && pi->isXSL(); |
| 1164 if (m_sawXSLTransform && !document()->transformSourceDocument()) | 1164 if (m_sawXSLTransform && !document()->transformSourceDocument()) { |
| 1165 // This behavior is very tricky. We call stopParsing() here because we w
ant to stop processing the document |
| 1166 // until we're ready to apply the transform, but we actually still want
to be fed decoded string pieces to |
| 1167 // accumulate in m_originalSourceForTransform. So, we call stopParsing()
here and |
| 1168 // check isStopped() in element callbacks. |
| 1169 // FIXME: This contradicts the contract of DocumentParser. |
| 1165 stopParsing(); | 1170 stopParsing(); |
| 1171 } |
| 1166 } | 1172 } |
| 1167 | 1173 |
| 1168 void XMLDocumentParser::cdataBlock(const String& text) | 1174 void XMLDocumentParser::cdataBlock(const String& text) |
| 1169 { | 1175 { |
| 1170 if (isStopped()) | 1176 if (isStopped()) |
| 1171 return; | 1177 return; |
| 1172 | 1178 |
| 1173 if (m_parserPaused) { | 1179 if (m_parserPaused) { |
| 1174 m_pendingCallbacks.append(adoptPtr(new PendingCDATABlockCallback(text)))
; | 1180 m_pendingCallbacks.append(adoptPtr(new PendingCDATABlockCallback(text)))
; |
| 1175 return; | 1181 return; |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1629 sax.initialized = XML_SAX2_MAGIC; | 1635 sax.initialized = XML_SAX2_MAGIC; |
| 1630 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); | 1636 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); |
| 1631 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1637 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
| 1632 parseChunk(parser->context(), parseString); | 1638 parseChunk(parser->context(), parseString); |
| 1633 finishParsing(parser->context()); | 1639 finishParsing(parser->context()); |
| 1634 attrsOK = state.gotAttributes; | 1640 attrsOK = state.gotAttributes; |
| 1635 return state.attributes; | 1641 return state.attributes; |
| 1636 } | 1642 } |
| 1637 | 1643 |
| 1638 } // namespace WebCore | 1644 } // namespace WebCore |
| OLD | NEW |