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, 2014 Apple Inc. All rights reserved. | 3 * Copyright (C) 2005, 2006, 2008, 2014 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 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 | 1203 |
1204 if (!updateLeafTextNode()) | 1204 if (!updateLeafTextNode()) |
1205 return; | 1205 return; |
1206 | 1206 |
1207 // ### handle exceptions | 1207 // ### handle exceptions |
1208 TrackExceptionState exceptionState; | 1208 TrackExceptionState exceptionState; |
1209 RefPtrWillBeRawPtr<ProcessingInstruction> pi = m_currentNode->document().cre
ateProcessingInstruction(target, data, exceptionState); | 1209 RefPtrWillBeRawPtr<ProcessingInstruction> pi = m_currentNode->document().cre
ateProcessingInstruction(target, data, exceptionState); |
1210 if (exceptionState.hadException()) | 1210 if (exceptionState.hadException()) |
1211 return; | 1211 return; |
1212 | 1212 |
1213 pi->setCreatedByParser(true); | |
1214 | |
1215 m_currentNode->parserAppendChild(pi.get()); | 1213 m_currentNode->parserAppendChild(pi.get()); |
1216 | 1214 |
1217 pi->setCreatedByParser(false); | |
1218 | |
1219 if (pi->isCSS()) | 1215 if (pi->isCSS()) |
1220 m_sawCSS = true; | 1216 m_sawCSS = true; |
1221 | 1217 |
1222 if (!RuntimeEnabledFeatures::xsltEnabled()) | 1218 if (!RuntimeEnabledFeatures::xsltEnabled()) |
1223 return; | 1219 return; |
1224 | 1220 |
1225 m_sawXSLTransform = !m_sawFirstElement && pi->isXSL(); | 1221 m_sawXSLTransform = !m_sawFirstElement && pi->isXSL(); |
1226 if (m_sawXSLTransform && !DocumentXSLT::hasTransformSourceDocument(*document
())) { | 1222 if (m_sawXSLTransform && !DocumentXSLT::hasTransformSourceDocument(*document
())) { |
1227 // This behavior is very tricky. We call stopParsing() here because we | 1223 // This behavior is very tricky. We call stopParsing() here because we |
1228 // want to stop processing the document until we're ready to apply the | 1224 // want to stop processing the document until we're ready to apply the |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1699 sax.initialized = XML_SAX2_MAGIC; | 1695 sax.initialized = XML_SAX2_MAGIC; |
1700 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); | 1696 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); |
1701 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1697 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
1702 parseChunk(parser->context(), parseString); | 1698 parseChunk(parser->context(), parseString); |
1703 finishParsing(parser->context()); | 1699 finishParsing(parser->context()); |
1704 attrsOK = state.gotAttributes; | 1700 attrsOK = state.gotAttributes; |
1705 return state.attributes; | 1701 return state.attributes; |
1706 } | 1702 } |
1707 | 1703 |
1708 } // namespace blink | 1704 } // namespace blink |
OLD | NEW |