| 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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 ResourceResponse response; | 641 ResourceResponse response; |
| 642 Vector<char> data; | 642 Vector<char> data; |
| 643 | 643 |
| 644 | 644 |
| 645 { | 645 { |
| 646 ResourceFetcher* fetcher = XMLDocumentParserScope::currentFetcher; | 646 ResourceFetcher* fetcher = XMLDocumentParserScope::currentFetcher; |
| 647 XMLDocumentParserScope scope(0); | 647 XMLDocumentParserScope scope(0); |
| 648 // FIXME: We should restore the original global error handler as well. | 648 // FIXME: We should restore the original global error handler as well. |
| 649 | 649 |
| 650 if (fetcher->frame()) | 650 if (fetcher->frame()) |
| 651 fetcher->frame()->loader()->loadResourceSynchronously(url, AllowStor
edCredentials, error, response, data); | 651 fetcher->fetchSynchronously(url, AllowStoredCredentials, error, resp
onse, data); |
| 652 } | 652 } |
| 653 | 653 |
| 654 // We have to check the URL again after the load to catch redirects. | 654 // We have to check the URL again after the load to catch redirects. |
| 655 // See <https://bugs.webkit.org/show_bug.cgi?id=21963>. | 655 // See <https://bugs.webkit.org/show_bug.cgi?id=21963>. |
| 656 if (!shouldAllowExternalLoad(response.url())) | 656 if (!shouldAllowExternalLoad(response.url())) |
| 657 return &globalDescriptor; | 657 return &globalDescriptor; |
| 658 | 658 |
| 659 return new OffsetBuffer(data); | 659 return new OffsetBuffer(data); |
| 660 } | 660 } |
| 661 | 661 |
| (...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1614 sax.initialized = XML_SAX2_MAGIC; | 1614 sax.initialized = XML_SAX2_MAGIC; |
| 1615 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); | 1615 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); |
| 1616 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1616 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
| 1617 parseChunk(parser->context(), parseString); | 1617 parseChunk(parser->context(), parseString); |
| 1618 finishParsing(parser->context()); | 1618 finishParsing(parser->context()); |
| 1619 attrsOK = state.gotAttributes; | 1619 attrsOK = state.gotAttributes; |
| 1620 return state.attributes; | 1620 return state.attributes; |
| 1621 } | 1621 } |
| 1622 | 1622 |
| 1623 } // namespace WebCore | 1623 } // namespace WebCore |
| OLD | NEW |