| 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  * | 
|    11  * This library is free software; you can redistribute it and/or |    11  * This library is free software; you can redistribute it and/or | 
|    12  * modify it under the terms of the GNU Library General Public |    12  * modify it under the terms of the GNU Library General Public | 
|    13  * License as published by the Free Software Foundation; either |    13  * License as published by the Free Software Foundation; either | 
|    14  * version 2 of the License, or (at your option) any later version. |    14  * version 2 of the License, or (at your option) any later version. | 
|    15  * |    15  * | 
|    16  * This library is distributed in the hope that it will be useful, |    16  * This library is distributed in the hope that it will be useful, | 
|    17  * but WITHOUT ANY WARRANTY; without even the implied warranty of |    17  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|    18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU |    18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
|    19  * Library General Public License for more details. |    19  * Library General Public License for more details. | 
|    20  * |    20  * | 
|    21  * You should have received a copy of the GNU Library General Public License |    21  * You should have received a copy of the GNU Library General Public License | 
|    22  * along with this library; see the file COPYING.LIB.  If not, write to |    22  * along with this library; see the file COPYING.LIB.  If not, write to | 
|    23  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |    23  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 
|    24  * Boston, MA 02110-1301, USA. |    24  * Boston, MA 02110-1301, USA. | 
|    25  */ |    25  */ | 
|    26  |    26  | 
|    27 #include "core/xml/parser/XMLDocumentParser.h" |    27 #include "core/xml/parser/XMLDocumentParser.h" | 
|    28  |    28  | 
 |    29 #include <libxml/catalog.h> | 
 |    30 #include <libxml/parser.h> | 
 |    31 #include <libxml/parserInternals.h> | 
 |    32 #include <libxslt/xslt.h> | 
 |    33 #include <memory> | 
|    29 #include "bindings/core/v8/ExceptionState.h" |    34 #include "bindings/core/v8/ExceptionState.h" | 
|    30 #include "bindings/core/v8/ScriptController.h" |    35 #include "bindings/core/v8/ScriptController.h" | 
|    31 #include "bindings/core/v8/ScriptSourceCode.h" |    36 #include "bindings/core/v8/ScriptSourceCode.h" | 
|    32 #include "core/HTMLNames.h" |    37 #include "core/HTMLNames.h" | 
|    33 #include "core/XMLNSNames.h" |    38 #include "core/XMLNSNames.h" | 
|    34 #include "core/dom/CDATASection.h" |    39 #include "core/dom/CDATASection.h" | 
|    35 #include "core/dom/Comment.h" |    40 #include "core/dom/Comment.h" | 
|    36 #include "core/dom/Document.h" |    41 #include "core/dom/Document.h" | 
|    37 #include "core/dom/DocumentFragment.h" |    42 #include "core/dom/DocumentFragment.h" | 
|    38 #include "core/dom/DocumentParserTiming.h" |    43 #include "core/dom/DocumentParserTiming.h" | 
| (...skipping 26 matching lines...) Expand all  Loading... | 
|    65 #include "platform/network/ResourceError.h" |    70 #include "platform/network/ResourceError.h" | 
|    66 #include "platform/network/ResourceRequest.h" |    71 #include "platform/network/ResourceRequest.h" | 
|    67 #include "platform/network/ResourceResponse.h" |    72 #include "platform/network/ResourceResponse.h" | 
|    68 #include "platform/weborigin/SecurityOrigin.h" |    73 #include "platform/weborigin/SecurityOrigin.h" | 
|    69 #include "wtf/AutoReset.h" |    74 #include "wtf/AutoReset.h" | 
|    70 #include "wtf/PtrUtil.h" |    75 #include "wtf/PtrUtil.h" | 
|    71 #include "wtf/StringExtras.h" |    76 #include "wtf/StringExtras.h" | 
|    72 #include "wtf/Threading.h" |    77 #include "wtf/Threading.h" | 
|    73 #include "wtf/Vector.h" |    78 #include "wtf/Vector.h" | 
|    74 #include "wtf/text/UTF8.h" |    79 #include "wtf/text/UTF8.h" | 
|    75 #include <libxml/catalog.h> |  | 
|    76 #include <libxml/parser.h> |  | 
|    77 #include <libxml/parserInternals.h> |  | 
|    78 #include <libxslt/xslt.h> |  | 
|    79 #include <memory> |  | 
|    80  |    80  | 
|    81 namespace blink { |    81 namespace blink { | 
|    82  |    82  | 
|    83 using namespace HTMLNames; |    83 using namespace HTMLNames; | 
|    84  |    84  | 
|    85 // FIXME: HTMLConstructionSite has a limit of 512, should these match? |    85 // FIXME: HTMLConstructionSite has a limit of 512, should these match? | 
|    86 static const unsigned maxXMLTreeDepth = 5000; |    86 static const unsigned maxXMLTreeDepth = 5000; | 
|    87  |    87  | 
|    88 static inline String toString(const xmlChar* string, size_t length) { |    88 static inline String toString(const xmlChar* string, size_t length) { | 
|    89   return String::fromUTF8(reinterpret_cast<const char*>(string), length); |    89   return String::fromUTF8(reinterpret_cast<const char*>(string), length); | 
| (...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1709   RefPtr<XMLParserContext> parser = |  1709   RefPtr<XMLParserContext> parser = | 
|  1710       XMLParserContext::createStringParser(&sax, &state); |  1710       XMLParserContext::createStringParser(&sax, &state); | 
|  1711   String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |  1711   String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 
|  1712   parseChunk(parser->context(), parseString); |  1712   parseChunk(parser->context(), parseString); | 
|  1713   finishParsing(parser->context()); |  1713   finishParsing(parser->context()); | 
|  1714   attrsOK = state.gotAttributes; |  1714   attrsOK = state.gotAttributes; | 
|  1715   return state.attributes; |  1715   return state.attributes; | 
|  1716 } |  1716 } | 
|  1717  |  1717  | 
|  1718 }  // namespace blink |  1718 }  // namespace blink | 
| OLD | NEW |