Chromium Code Reviews| 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. | 8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * | 10 * |
| (...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1541 finishParsing(context()); | 1541 finishParsing(context()); |
| 1542 } | 1542 } |
| 1543 | 1543 |
| 1544 m_context = nullptr; | 1544 m_context = nullptr; |
| 1545 } | 1545 } |
| 1546 } | 1546 } |
| 1547 | 1547 |
| 1548 bool xmlViewerMode = !m_sawError && !m_sawCSS && !m_sawXSLTransform && | 1548 bool xmlViewerMode = !m_sawError && !m_sawCSS && !m_sawXSLTransform && |
| 1549 hasNoStyleInformation(document()); | 1549 hasNoStyleInformation(document()); |
| 1550 if (xmlViewerMode) { | 1550 if (xmlViewerMode) { |
| 1551 document()->setIsViewSource(true); | 1551 if (document()->canExecuteScripts(NotAboutToExecuteScript)) |
|
jochen (gone - plz use gerrit)
2017/03/14 20:13:53
why this if ()?
adithyas
2017/03/14 20:55:15
I thought we still need the unique origin when scr
| |
| 1552 document()->setIsViewSourceWithoutUniqueOrigin(); | |
| 1553 else | |
| 1554 document()->setIsViewSource(true); | |
| 1552 transformDocumentToXMLTreeView(*document()); | 1555 transformDocumentToXMLTreeView(*document()); |
| 1553 } else if (m_sawXSLTransform) { | 1556 } else if (m_sawXSLTransform) { |
| 1554 xmlDocPtr doc = | 1557 xmlDocPtr doc = |
| 1555 xmlDocPtrForString(document(), m_originalSourceForTransform.toString(), | 1558 xmlDocPtrForString(document(), m_originalSourceForTransform.toString(), |
| 1556 document()->url().getString()); | 1559 document()->url().getString()); |
| 1557 document()->setTransformSource(WTF::makeUnique<TransformSource>(doc)); | 1560 document()->setTransformSource(WTF::makeUnique<TransformSource>(doc)); |
| 1558 DocumentParser::stopParsing(); | 1561 DocumentParser::stopParsing(); |
| 1559 } | 1562 } |
| 1560 } | 1563 } |
| 1561 | 1564 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1711 RefPtr<XMLParserContext> parser = | 1714 RefPtr<XMLParserContext> parser = |
| 1712 XMLParserContext::createStringParser(&sax, &state); | 1715 XMLParserContext::createStringParser(&sax, &state); |
| 1713 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1716 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
| 1714 parseChunk(parser->context(), parseString); | 1717 parseChunk(parser->context(), parseString); |
| 1715 finishParsing(parser->context()); | 1718 finishParsing(parser->context()); |
| 1716 attrsOK = state.gotAttributes; | 1719 attrsOK = state.gotAttributes; |
| 1717 return state.attributes; | 1720 return state.attributes; |
| 1718 } | 1721 } |
| 1719 | 1722 |
| 1720 } // namespace blink | 1723 } // namespace blink |
| OLD | NEW |