Skip to content

Commit

Permalink
Merge third_party/libxml from tag 96.0.4664.153
Browse files Browse the repository at this point in the history
b/283570016
  • Loading branch information
dahlstrom-g committed Jun 27, 2023
2 parents 4a0aee2 + cd2fb8f commit 9b61244
Show file tree
Hide file tree
Showing 192 changed files with 6,782 additions and 2,390 deletions.
131 changes: 62 additions & 69 deletions third_party/libxml/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

# Define an "os_include" variable that points at the OS-specific generated
# headers. These were generated by running the configure script offline.
if (is_starboard) {
os_include = "starboard"
} else if (is_linux || is_android || is_nacl || is_fuchsia) {
if (is_linux || is_chromeos || is_android || is_nacl || is_fuchsia) {
os_include = "linux"
} else if (is_mac || is_ios) {
} else if (is_apple) {
os_include = "mac"
} else if (is_win) {
os_include = "win32"
Expand Down Expand Up @@ -68,13 +66,7 @@ config("libxml_warnings") {
# TODO(hans): See if we can fix upstream (http://crbug.com/763944).
"-Wno-enum-compare",
]
if (is_clang_16 && use_cobalt_customizations) {
cflags += [
# xmlschemas.c variable 'count' set but not used
"-Wno-unused-but-set-variable",
]
}
} else if (is_linux) {
} else if (is_linux || is_chromeos) {
cflags = [
# gcc spits out a bunch of warnings about passing too many arguments to
# __xmlSimpleError.
Expand All @@ -83,43 +75,41 @@ config("libxml_warnings") {
}
}

if (!is_starboard) {
static_library("xml_reader") {
# Do not expand this visibility list without first consulting with the
# Security Team.
visibility = [
"//base/test:test_support",
"//components/policy/core/common:unit_tests",
"//services/data_decoder:*",
"//tools/traffic_annotation/auditor:auditor_sources",
]
if (is_win) {
visibility += [ "//components/wifi" ]
}
sources = [
"chromium/xml_reader.cc",
"chromium/xml_reader.h",
]
deps = [
":libxml",
":libxml_utils",
]
configs += [ ":libxml_config" ]
static_library("xml_reader") {
# Do not expand this visibility list without first consulting with the
# Security Team.
visibility = [
"//base/test:test_support",
"//components/policy/core/common:unit_tests",
"//services/data_decoder:*",
"//tools/traffic_annotation/auditor:auditor_sources",
]
if (is_win) {
visibility += [ "//components/wifi" ]
}
sources = [
"chromium/xml_reader.cc",
"chromium/xml_reader.h",
]
deps = [
":libxml",
":libxml_utils",
]
configs += [ ":libxml_config" ]
}

static_library("xml_writer") {
# The XmlWriter is considered safe to use from any target.
visibility = [ "*" ]
sources = [
"chromium/xml_writer.cc",
"chromium/xml_writer.h",
]
deps = [
":libxml",
":libxml_utils",
]
configs += [ ":libxml_config" ]
}
static_library("xml_writer") {
# The XmlWriter is considered safe to use from any target.
visibility = [ "*" ]
sources = [
"chromium/xml_writer.cc",
"chromium/xml_writer.h",
]
deps = [
":libxml",
":libxml_utils",
]
configs += [ ":libxml_config" ]
}

static_library("libxml_utils") {
Expand All @@ -144,23 +134,16 @@ static_library("libxml") {
# Do not expand this visibility list without first consulting with the
# Security Team.
visibility = [
":libxml_utils",
":xml_reader",
":xml_writer",
":libxml_utils",
"//chromecast/internal",
"//testing/libfuzzer/*",
"//third_party/blink/renderer/*",
"//third_party/fontconfig",
"//third_party/libxslt",
"//third_party/maldoca/*",
]
if (is_starboard) {
visibility += [
"//base/test:test_support",
"//cobalt/base",
"//cobalt/dom_parser",
"//cobalt/renderer/rasterizer/skia/skia",
"//components/update_client",
]
}
if (is_ios) {
foreach(tgt, ios_libxml_visibility_additions) {
visibility += [ "//ios_internal/$tgt" ]
Expand All @@ -172,11 +155,6 @@ static_library("libxml") {
# Commented out sources are libxml2 files we do not want to include. They are
# here to make it easy to identify files which are new.
sources = [
"linux/config.h",
"linux/include/libxml/xmlversion.h",
"mac/config.h",
"mac/include/libxml/xmlversion.h",

#"src/DOCBparser.c",
"src/HTMLparser.c",
"src/HTMLtree.c",
Expand Down Expand Up @@ -245,8 +223,6 @@ static_library("libxml") {
"src/include/libxml/xpath.h",
"src/include/libxml/xpathInternals.h",
"src/include/libxml/xpointer.h",
"src/include/win32config.h",
"src/include/wsockcompat.h",

#"src/legacy.c",
"src/libxml.h",
Expand Down Expand Up @@ -297,21 +273,38 @@ static_library("libxml") {
"src/xpointer.c",
#"src/xzlib.c",
"src/xzlib.h",
"win32/config.h",
"win32/include/libxml/xmlversion.h",
]

if (!is_starboard) {
configs -= [ "//build/config/compiler:chromium_code" ]
}
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",

# Must be after no_chromium_code for warning flags to be ordered correctly.
":libxml_warnings",
]

if (is_linux || is_chromeos) {
sources += [
"linux/config.h",
"linux/include/libxml/xmlversion.h",
]
}

if (is_mac) {
sources += [
"mac/config.h",
"mac/include/libxml/xmlversion.h",
]
}

if (is_win) {
sources += [
"src/include/win32config.h",
"src/include/wsockcompat.h",
"win32/config.h",
"win32/include/libxml/xmlversion.h",
]

# libxml2 already defines WIN32_LEAN_AND_MEAN.
configs -= [ "//build/config/win:lean_and_mean" ]
}
Expand All @@ -320,7 +313,7 @@ static_library("libxml") {
public_deps = [ "//third_party/icu:icuuc" ]
deps = [ "//third_party/zlib" ]

if (is_mac || is_ios || is_android || is_fuchsia) {
if (is_apple || is_android || is_fuchsia) {
# http://www.xmlsoft.org/threads.html says that this is required when using
# libxml from several threads, which can possibly happen in chrome. On
# linux, this is picked up by transitivity from pkg-config output from
Expand Down
3 changes: 3 additions & 0 deletions third_party/libxml/DIR_METADATA
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
monorail: {
component: "Blink>XML"
}
12 changes: 5 additions & 7 deletions third_party/libxml/METADATA
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ description:
third_party {
url {
type: GIT
value: "https://chromium.googlesource.com/chromium/src/third_party/libxml"
value: "https://chromium.googlesource.com/chromium/src"
}
# NOTE: This is @v2.9.10 release tag, which does not match the repo
# version exactly, because of various intermediate Chromium changes
version: "405e251c"
version: "96.0.4664.153"
last_upgrade_date {
year: 2020
month: 5
day: 1
year: 2023
month: 6
day: 27
}
license_type: NOTICE
}
4 changes: 1 addition & 3 deletions third_party/libxml/OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
# a CL to add yourself here.
[email protected]
[email protected]
[email protected]

# COMPONENT: Blink>XML
[email protected]
10 changes: 4 additions & 6 deletions third_party/libxml/README.chromium
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: libxml
URL: http://xmlsoft.org
Version: e4fb36841800038c289997432ca547c9bfef9db1
CPEPrefix: cpe:/a:xmlsoft:libxml2:2.9.9
Version: dea91c97debeac7c1aaf9c19f79029809e23a353
CPEPrefix: cpe:/a:xmlsoft:libxml2:2.9.12
License: MIT
License File: src/Copyright
Security Critical: yes
Expand All @@ -20,10 +20,8 @@ Modifications:
See https://crbug.com/708433
- libxml2-2.9.4-security-xpath-nodetab-uaf.patch: See https://crbug.com/705445
- chromium-issue-708434.patch: Guard against input counter overflow.
- revert-non-recursive-xml-parsing.patch: Making parts of the XML parser
non-recursive broke a few web platform tests.
- add-missing-ifdef-in-xml-reader.patch: Bug fix forgot to guard functionality
with appropriate #ifdef.
- chromium-issue-1138555.patch: Change TRUE to 1 for ICU68 which remove the
#define of TRUE.
- Add helper classes in the chromium/ subdirectory.
- Delete various unused files, see chromium/roll.py

Expand Down
13 changes: 0 additions & 13 deletions third_party/libxml/chromium/add-missing-ifdef-in-xml-reader.patch

This file was deleted.

Loading

0 comments on commit 9b61244

Please sign in to comment.