| 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 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1339 } | 1339 } |
| 1340 | 1340 |
| 1341 static void cdataBlockHandler(void* closure, const xmlChar* text, int length) { | 1341 static void cdataBlockHandler(void* closure, const xmlChar* text, int length) { |
| 1342 getParser(closure)->cdataBlock(toString(text, length)); | 1342 getParser(closure)->cdataBlock(toString(text, length)); |
| 1343 } | 1343 } |
| 1344 | 1344 |
| 1345 static void commentHandler(void* closure, const xmlChar* text) { | 1345 static void commentHandler(void* closure, const xmlChar* text) { |
| 1346 getParser(closure)->comment(toString(text)); | 1346 getParser(closure)->comment(toString(text)); |
| 1347 } | 1347 } |
| 1348 | 1348 |
| 1349 WTF_ATTRIBUTE_PRINTF(2, 3) | 1349 PRINTF_FORMAT(2, 3) |
| 1350 static void warningHandler(void* closure, const char* message, ...) { | 1350 static void warningHandler(void* closure, const char* message, ...) { |
| 1351 va_list args; | 1351 va_list args; |
| 1352 va_start(args, message); | 1352 va_start(args, message); |
| 1353 getParser(closure)->error(XMLErrors::ErrorTypeWarning, message, args); | 1353 getParser(closure)->error(XMLErrors::ErrorTypeWarning, message, args); |
| 1354 va_end(args); | 1354 va_end(args); |
| 1355 } | 1355 } |
| 1356 | 1356 |
| 1357 WTF_ATTRIBUTE_PRINTF(2, 3) | 1357 PRINTF_FORMAT(2, 3) |
| 1358 static void normalErrorHandler(void* closure, const char* message, ...) { | 1358 static void normalErrorHandler(void* closure, const char* message, ...) { |
| 1359 va_list args; | 1359 va_list args; |
| 1360 va_start(args, message); | 1360 va_start(args, message); |
| 1361 getParser(closure)->error(XMLErrors::ErrorTypeNonFatal, message, args); | 1361 getParser(closure)->error(XMLErrors::ErrorTypeNonFatal, message, args); |
| 1362 va_end(args); | 1362 va_end(args); |
| 1363 } | 1363 } |
| 1364 | 1364 |
| 1365 // Using a static entity and marking it XML_INTERNAL_PREDEFINED_ENTITY is a hack | 1365 // Using a static entity and marking it XML_INTERNAL_PREDEFINED_ENTITY is a hack |
| 1366 // to avoid malloc/free. Using a global variable like this could cause trouble | 1366 // to avoid malloc/free. Using a global variable like this could cause trouble |
| 1367 // if libxml implementation details were to change | 1367 // if libxml implementation details were to change |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1707 RefPtr<XMLParserContext> parser = | 1707 RefPtr<XMLParserContext> parser = |
| 1708 XMLParserContext::createStringParser(&sax, &state); | 1708 XMLParserContext::createStringParser(&sax, &state); |
| 1709 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1709 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
| 1710 parseChunk(parser->context(), parseString); | 1710 parseChunk(parser->context(), parseString); |
| 1711 finishParsing(parser->context()); | 1711 finishParsing(parser->context()); |
| 1712 attrsOK = state.gotAttributes; | 1712 attrsOK = state.gotAttributes; |
| 1713 return state.attributes; | 1713 return state.attributes; |
| 1714 } | 1714 } |
| 1715 | 1715 |
| 1716 } // namespace blink | 1716 } // namespace blink |
| OLD | NEW |