diff options
Diffstat (limited to 'chromium/third_party')
-rw-r--r-- | chromium/third_party/libxml/README.chromium | 2 | ||||
-rw-r--r-- | chromium/third_party/libxml/src/CMakeLists.txt | 17 | ||||
-rw-r--r-- | chromium/third_party/libxml/src/HTMLtree.c | 14 | ||||
-rw-r--r-- | chromium/third_party/libxml/src/libxml2.spec | 2 | ||||
-rw-r--r-- | chromium/third_party/libxml/src/xmlIO.c | 20 | ||||
-rw-r--r-- | chromium/third_party/libxml/src/xmlsave.c | 14 | ||||
-rw-r--r-- | chromium/third_party/libxml/src/xpath.c | 2 |
7 files changed, 46 insertions, 25 deletions
diff --git a/chromium/third_party/libxml/README.chromium b/chromium/third_party/libxml/README.chromium index 73f68bed4e3..1d1d773b6df 100644 --- a/chromium/third_party/libxml/README.chromium +++ b/chromium/third_party/libxml/README.chromium @@ -1,6 +1,6 @@ Name: libxml URL: http://xmlsoft.org -Version: a46e85f6698af712dc8bee683431c70d35e456ff +Version: dea91c97debeac7c1aaf9c19f79029809e23a353 CPEPrefix: cpe:/a:xmlsoft:libxml2:2.9.12 License: MIT License File: src/Copyright diff --git a/chromium/third_party/libxml/src/CMakeLists.txt b/chromium/third_party/libxml/src/CMakeLists.txt index b4c0c7945de..073869fc0c4 100644 --- a/chromium/third_party/libxml/src/CMakeLists.txt +++ b/chromium/third_party/libxml/src/CMakeLists.txt @@ -1,6 +1,16 @@ cmake_minimum_required(VERSION 3.15) -project(libxml2 VERSION 2.9.12 LANGUAGES C) +file(STRINGS "configure.ac" CONFIGURE_AC_LINES) +foreach(line ${CONFIGURE_AC_LINES}) + if(line MATCHES [[^m4_define\(\[(MAJOR_VERSION|MINOR_VERSION|MICRO_VERSION)\],[ \t]*([0-9]+)\)$]]) + set(LIBXML_${CMAKE_MATCH_1} ${CMAKE_MATCH_2}) + elseif(line MATCHES "^(LIBXML_MAJOR_VERSION|LIBXML_MINOR_VERSION|LIBXML_MICRO_VERSION)=([0-9]+)$") + set(${CMAKE_MATCH_1} ${CMAKE_MATCH_2}) + endif() +endforeach() +set(VERSION "${LIBXML_MAJOR_VERSION}.${LIBXML_MINOR_VERSION}.${LIBXML_MICRO_VERSION}") + +project(libxml2 VERSION ${VERSION} LANGUAGES C) include(CheckCSourceCompiles) include(CheckFunctionExists) @@ -95,11 +105,6 @@ foreach(VARIABLE IN ITEMS WITH_AUTOMATA WITH_C14N WITH_CATALOG WITH_DEBUG WITH_D endif() endforeach() -set(LIBXML_MAJOR_VERSION ${PROJECT_VERSION_MAJOR}) -set(LIBXML_MINOR_VERSION ${PROJECT_VERSION_MINOR}) -set(LIBXML_MICRO_VERSION ${PROJECT_VERSION_PATCH}) - -set(VERSION "${LIBXML_MAJOR_VERSION}.${LIBXML_MINOR_VERSION}.${LIBXML_MICRO_VERSION}") set(LIBXML_VERSION ${LIBXML_MAJOR_VERSION}0${LIBXML_MINOR_VERSION}0${LIBXML_MICRO_VERSION}) set(LIBXML_VERSION_STRING "${LIBXML_VERSION}") set(LIBXML_VERSION_EXTRA "") diff --git a/chromium/third_party/libxml/src/HTMLtree.c b/chromium/third_party/libxml/src/HTMLtree.c index bdd639c7fc9..7a2b8558389 100644 --- a/chromium/third_party/libxml/src/HTMLtree.c +++ b/chromium/third_party/libxml/src/HTMLtree.c @@ -763,11 +763,15 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, if (((xmlDocPtr) cur)->intSubset != NULL) { htmlDtdDumpOutput(buf, (xmlDocPtr) cur, NULL); } - /* Always validate cur->parent when descending. */ - if ((cur->parent == parent) && (cur->children != NULL)) { - parent = cur; - cur = cur->children; - continue; + if (cur->children != NULL) { + /* Always validate cur->parent when descending. */ + if (cur->parent == parent) { + parent = cur; + cur = cur->children; + continue; + } + } else { + xmlOutputBufferWriteString(buf, "\n"); } break; diff --git a/chromium/third_party/libxml/src/libxml2.spec b/chromium/third_party/libxml/src/libxml2.spec index 682dff2036a..b3eca4f01d1 100644 --- a/chromium/third_party/libxml/src/libxml2.spec +++ b/chromium/third_party/libxml/src/libxml2.spec @@ -204,6 +204,6 @@ rm -fr %{buildroot} %endif # with_python3 %changelog -* Mon May 24 2021 Daniel Veillard <veillard@redhat.com> +* Tue Aug 3 2021 Daniel Veillard <veillard@redhat.com> - upstream release 2.9.12 see http://xmlsoft.org/news.html diff --git a/chromium/third_party/libxml/src/xmlIO.c b/chromium/third_party/libxml/src/xmlIO.c index 57312b97927..f20c0fa0aec 100644 --- a/chromium/third_party/libxml/src/xmlIO.c +++ b/chromium/third_party/libxml/src/xmlIO.c @@ -3401,12 +3401,18 @@ xmlOutputBufferWrite(xmlOutputBufferPtr out, int len, const char *buf) { out->error = XML_IO_ENCODER; return(-1); } - nbchars = ret >= 0 ? ret : 0; + if (out->writecallback) + nbchars = xmlBufUse(out->conv); + else + nbchars = ret >= 0 ? ret : 0; } else { ret = xmlBufAdd(out->buffer, (const xmlChar *) buf, chunk); if (ret != 0) return(-1); - nbchars = chunk; + if (out->writecallback) + nbchars = xmlBufUse(out->buffer); + else + nbchars = chunk; } buf += chunk; len -= chunk; @@ -3593,13 +3599,19 @@ xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str, out->error = XML_IO_ENCODER; return(-1); } - nbchars = ret >= 0 ? ret : 0; + if (out->writecallback) + nbchars = xmlBufUse(out->conv); + else + nbchars = ret >= 0 ? ret : 0; } else { ret = escaping(xmlBufEnd(out->buffer), &chunk, str, &cons); if ((ret < 0) || (chunk == 0)) /* chunk==0 => nothing done */ return(-1); xmlBufAddLen(out->buffer, chunk); - nbchars = chunk; + if (out->writecallback) + nbchars = xmlBufUse(out->buffer); + else + nbchars = chunk; } str += cons; len -= cons; diff --git a/chromium/third_party/libxml/src/xmlsave.c b/chromium/third_party/libxml/src/xmlsave.c index aedbd5e70ac..489505f4865 100644 --- a/chromium/third_party/libxml/src/xmlsave.c +++ b/chromium/third_party/libxml/src/xmlsave.c @@ -890,6 +890,13 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { break; case XML_ELEMENT_NODE: + if ((cur != root) && (ctxt->format == 1) && + (xmlIndentTreeOutput)) + xmlOutputBufferWrite(buf, ctxt->indent_size * + (ctxt->level > ctxt->indent_nr ? + ctxt->indent_nr : ctxt->level), + ctxt->indent); + /* * Some users like lxml are known to pass nodes with a corrupted * tree structure. Fall back to a recursive call to handle this @@ -900,13 +907,6 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { break; } - if ((ctxt->level > 0) && (ctxt->format == 1) && - (xmlIndentTreeOutput)) - xmlOutputBufferWrite(buf, ctxt->indent_size * - (ctxt->level > ctxt->indent_nr ? - ctxt->indent_nr : ctxt->level), - ctxt->indent); - xmlOutputBufferWrite(buf, 1, "<"); if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); diff --git a/chromium/third_party/libxml/src/xpath.c b/chromium/third_party/libxml/src/xpath.c index 711bd2a33c9..d9e940827b5 100644 --- a/chromium/third_party/libxml/src/xpath.c +++ b/chromium/third_party/libxml/src/xpath.c @@ -10983,7 +10983,7 @@ xmlXPathCompileExpr(xmlXPathParserContextPtr ctxt, int sort) { } if (xpctxt != NULL) - xpctxt->depth -= 1; + xpctxt->depth -= 10; } /** |