From c1920357b04f656cb434562a3568490b66d3d48c Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Tue, 4 Aug 2020 19:15:52 -0400 Subject: [PATCH 1/5] Revert "Update webrender." This reverts commit 2ca1b06e77f28cebeb886f50a6c21c438d4b2f46. --- Cargo.lock | 87 +++++++++++++------ Cargo.toml | 5 ++ components/canvas/Cargo.toml | 2 +- components/compositing/Cargo.toml | 2 +- components/gfx/Cargo.toml | 6 +- components/servo/Cargo.toml | 2 +- servo-tidy.toml | 1 + .../background-image-tiled.https.html.ini | 3 +- 8 files changed, 73 insertions(+), 35 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 967f78829d1..bbe06862931 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -538,7 +538,7 @@ dependencies = [ "fnv", "font-kit", "gfx", - "gleam 0.12.1", + "gleam 0.11.0", "half", "ipc-channel", "log", @@ -813,7 +813,7 @@ dependencies = [ "embedder_traits", "euclid", "gfx_traits", - "gleam 0.12.1", + "gleam 0.11.0", "image", "ipc-channel", "keyboard-types", @@ -1012,6 +1012,18 @@ dependencies = [ "libc", ] +[[package]] +name = "core-text" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "131b3fd1f8bd5db9f2b398fa4fdb6008c64afc04d447c306ac2c7e98fba2a61d" +dependencies = [ + "core-foundation 0.7.0", + "core-graphics 0.19.0", + "foreign-types", + "libc", +] + [[package]] name = "core-text" version = "19.0.0" @@ -1580,11 +1592,11 @@ dependencies = [ "byteorder", "core-foundation 0.9.0", "core-graphics 0.22.0", - "core-text", + "core-text 19.0.0", "dirs", "dwrote", "float-ord", - "freetype", + "freetype 0.7.0", "lazy_static", "libc", "log", @@ -1620,6 +1632,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "freetype" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11926b2b410b469d0e9399eca4cbbe237a9ef02176c485803b29216307e8e028" +dependencies = [ + "libc", + "servo-freetype-sys", +] + [[package]] name = "freetype" version = "0.7.0" @@ -1849,14 +1871,14 @@ dependencies = [ "app_units", "bitflags", "byteorder", - "core-foundation 0.9.0", - "core-graphics 0.22.0", - "core-text", + "core-foundation 0.7.0", + "core-graphics 0.19.0", + "core-text 15.0.0", "dwrote", "euclid", "fnv", "fontsan", - "freetype", + "freetype 0.7.0", "gfx_traits", "harfbuzz-sys", "ipc-channel", @@ -2080,9 +2102,9 @@ dependencies = [ [[package]] name = "gleam" -version = "0.12.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdef5b9df6d3a261b80a5ac55e13bf93945725df2463c1b0a2e5a527dce0d37" +checksum = "d9a13b5bb12ab457c15400b43cbba5971df5c1898b6a9c30cc8c52cb01baa112" dependencies = [ "gl_generator 0.14.0", ] @@ -2477,9 +2499,9 @@ checksum = "bf8c27ca13930dc4ffe474880040fe9e0f03c2121600dc9c95423624cab3e467" dependencies = [ "cc", "core-graphics 0.22.0", - "core-text", + "core-text 19.0.0", "foreign-types", - "freetype", + "freetype 0.7.0", "pkg-config", ] @@ -3191,7 +3213,7 @@ dependencies = [ "gaol", "gfx", "gfx_traits", - "gleam 0.12.1", + "gleam 0.11.0", "gstreamer", "ipc-channel", "keyboard-types", @@ -4175,7 +4197,7 @@ dependencies = [ [[package]] name = "peek-poke" version = "0.2.0" -source = "git+https://github.com/servo/webrender#0bf15cbdbda530f733511f169194439e197e0f40" +source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#34d968adeda2e06b057a13d14a88df5766b38eda" dependencies = [ "euclid", "peek-poke-derive", @@ -4184,7 +4206,7 @@ dependencies = [ [[package]] name = "peek-poke-derive" version = "0.2.1" -source = "git+https://github.com/servo/webrender#0bf15cbdbda530f733511f169194439e197e0f40" +source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#34d968adeda2e06b057a13d14a88df5766b38eda" dependencies = [ "proc-macro2 1.0.17", "quote 1.0.2", @@ -5129,6 +5151,16 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "servo-freetype-sys" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9232032c2e85118c0282c6562c84cab12316e655491ba0a5d1905b2320060d1b" +dependencies = [ + "cmake", + "pkg-config", +] + [[package]] name = "servo-gst-plugin" version = "0.0.1" @@ -6786,23 +6818,24 @@ dependencies = [ [[package]] name = "webrender" version = "0.61.0" -source = "git+https://github.com/servo/webrender#0bf15cbdbda530f733511f169194439e197e0f40" +source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#34d968adeda2e06b057a13d14a88df5766b38eda" dependencies = [ + "backtrace", "base64 0.10.1", "bincode", "bitflags", "build-parallel", "byteorder", "cfg-if", - "core-foundation 0.9.0", - "core-graphics 0.22.0", - "core-text", + "core-foundation 0.7.0", + "core-graphics 0.19.0", + "core-text 15.0.0", "cstr", "dwrote", "euclid", - "freetype", + "freetype 0.4.1", "fxhash", - "gleam 0.12.1", + "gleam 0.11.0", "glslopt", "image", "lazy_static", @@ -6815,11 +6848,11 @@ dependencies = [ "ron", "serde", "serde_json", + "sig", "smallvec 1.4.1", "svg_fmt", "time", "tracy-rs", - "uuid", "webrender_api", "webrender_build", "wr_malloc_size_of", @@ -6829,13 +6862,13 @@ dependencies = [ [[package]] name = "webrender_api" version = "0.61.0" -source = "git+https://github.com/servo/webrender#0bf15cbdbda530f733511f169194439e197e0f40" +source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#34d968adeda2e06b057a13d14a88df5766b38eda" dependencies = [ "app_units", "bitflags", "byteorder", - "core-foundation 0.9.0", - "core-graphics 0.22.0", + "core-foundation 0.7.0", + "core-graphics 0.19.0", "derive_more", "euclid", "malloc_size_of_derive", @@ -6850,7 +6883,7 @@ dependencies = [ [[package]] name = "webrender_build" version = "0.0.1" -source = "git+https://github.com/servo/webrender#0bf15cbdbda530f733511f169194439e197e0f40" +source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#34d968adeda2e06b057a13d14a88df5766b38eda" dependencies = [ "bitflags", "lazy_static", @@ -7029,7 +7062,7 @@ dependencies = [ [[package]] name = "wr_malloc_size_of" version = "0.0.1" -source = "git+https://github.com/servo/webrender#0bf15cbdbda530f733511f169194439e197e0f40" +source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#34d968adeda2e06b057a13d14a88df5766b38eda" dependencies = [ "app_units", "euclid", diff --git a/Cargo.toml b/Cargo.toml index 79b5a962adf..58346500b9a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,3 +34,8 @@ backtrace = { git = "https://github.com/servo/backtrace-rs", branch = "uwp-fix" [patch."https://github.com/jrmuizel/raqote"] raqote = { git = "https://github.com/jdm/raqote", branch = "fkup" } + +# https://github.com/servo/servo/issues/27039#issuecomment-654400150 +[patch."https://github.com/servo/webrender"] +webrender = { git = "https://github.com/jdm/webrender", branch = "crash-backtrace" } +webrender_api = { git = "https://github.com/jdm/webrender", branch = "crash-backtrace" } diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml index e2789742ac7..71f870a634e 100644 --- a/components/canvas/Cargo.toml +++ b/components/canvas/Cargo.toml @@ -25,7 +25,7 @@ euclid = "0.20" font-kit = "0.10" fnv = "1.0" gfx = { path = "../gfx" } -gleam = "0.12" +gleam = "0.11" half = "1" ipc-channel = "0.14" log = "0.4" diff --git a/components/compositing/Cargo.toml b/components/compositing/Cargo.toml index 048344af294..0d4fc881921 100644 --- a/components/compositing/Cargo.toml +++ b/components/compositing/Cargo.toml @@ -21,7 +21,7 @@ crossbeam-channel = "0.4" embedder_traits = { path = "../embedder_traits" } euclid = "0.20" gfx_traits = { path = "../gfx_traits" } -gleam = { version = "0.12", optional = true } +gleam = { version = "0.11", optional = true } image = "0.23" ipc-channel = "0.14" keyboard-types = "0.5" diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index 0d96a7ed783..947918e6da8 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -43,9 +43,9 @@ xi-unicode = "0.1.0" [target.'cfg(target_os = "macos")'.dependencies] byteorder = "1.0" -core-foundation = "0.9" -core-graphics = "0.22" -core-text = "19.0" +core-foundation = "0.7" +core-graphics = "0.19" +core-text = "15.0" [target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies] freetype = "0.7" diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index 3960ec97c47..3b653fcac84 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -54,7 +54,7 @@ env_logger = "0.7" euclid = "0.20" gfx = { path = "../gfx" } gfx_traits = { path = "../gfx_traits" } -gleam = "0.12" +gleam = "0.11" gstreamer = { version = "0.15", features = ["v1_16"], optional = true } ipc-channel = "0.14" keyboard-types = "0.5" diff --git a/servo-tidy.toml b/servo-tidy.toml index 435bf8f52f7..f26234f551d 100644 --- a/servo-tidy.toml +++ b/servo-tidy.toml @@ -32,6 +32,7 @@ packages = [ "arrayvec", "base64", "cocoa", + "freetype", "gleam", "libloading", "metal", diff --git a/tests/wpt/metadata/css/css-paint-api/background-image-tiled.https.html.ini b/tests/wpt/metadata/css/css-paint-api/background-image-tiled.https.html.ini index d74202a2080..10e6dc50956 100644 --- a/tests/wpt/metadata/css/css-paint-api/background-image-tiled.https.html.ini +++ b/tests/wpt/metadata/css/css-paint-api/background-image-tiled.https.html.ini @@ -1,4 +1,3 @@ [background-image-tiled.https.html] type: reftest - expected: CRASH - bug: https://github.com/servo/servo/issues/27467 + expected: FAIL From 10ae3bfbbb2383d349de6150434cc47c6ad1c8e9 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Tue, 4 Aug 2020 19:16:05 -0400 Subject: [PATCH 2/5] Revert "Update font-kit and freetype and unicode-script." This reverts commit 5c0d7998bd28ceb383f553cd7af5a60f472a47ba. --- Cargo.lock | 69 ++++------ Cargo.toml | 3 - components/canvas/Cargo.toml | 2 +- components/gfx/Cargo.toml | 4 +- components/gfx/text/shaping/harfbuzz.rs | 167 +----------------------- components/layout/text.rs | 4 +- 6 files changed, 28 insertions(+), 221 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bbe06862931..d283862600c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -987,19 +987,6 @@ dependencies = [ "libc", ] -[[package]] -name = "core-graphics" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6082396a349fa49674ba1bda4077332a18bf150e8fa75745ece07085e29a113" -dependencies = [ - "bitflags", - "core-foundation 0.9.0", - "core-graphics-types", - "foreign-types", - "libc", -] - [[package]] name = "core-graphics-types" version = "0.1.0" @@ -1024,18 +1011,6 @@ dependencies = [ "libc", ] -[[package]] -name = "core-text" -version = "19.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dfae50af11e72657fe7174cddb1ecddc5398037f7f6f39533ad69207c9a4e2" -dependencies = [ - "core-foundation 0.9.0", - "core-graphics 0.22.0", - "foreign-types", - "libc", -] - [[package]] name = "crc32fast" version = "1.2.0" @@ -1584,19 +1559,19 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "font-kit" -version = "0.10.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f9042cb45150fb2b2a012fc03d0f1d2071f18e90397b9d2a5ec8ade8464bf20" +checksum = "22ed9b6d89600e22d9bfcfdd8c27e981540664a1a85a3f3971793c75502f49d9" dependencies = [ "bitflags", "byteorder", - "core-foundation 0.9.0", - "core-graphics 0.22.0", - "core-text 19.0.0", + "core-foundation 0.7.0", + "core-graphics 0.19.0", + "core-text", "dirs", "dwrote", "float-ord", - "freetype 0.7.0", + "freetype 0.5.1", "lazy_static", "libc", "log", @@ -1644,9 +1619,9 @@ dependencies = [ [[package]] name = "freetype" -version = "0.7.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee38378a9e3db1cc693b4f88d166ae375338a0ff75cb8263e1c601d51f35dc6" +checksum = "b73222ab32d9ad65fe0e1c3258da8d614fd47cf19fce92b09eb520060c5c5ad5" dependencies = [ "freetype-sys", "libc", @@ -1654,9 +1629,9 @@ dependencies = [ [[package]] name = "freetype-sys" -version = "0.13.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" +checksum = "d48ac0ce366dd47a115ec8e598d7c51b4a974fc52ded5e53a56b31f55f34f3ea" dependencies = [ "cmake", "libc", @@ -1873,12 +1848,12 @@ dependencies = [ "byteorder", "core-foundation 0.7.0", "core-graphics 0.19.0", - "core-text 15.0.0", + "core-text", "dwrote", "euclid", "fnv", "fontsan", - "freetype 0.7.0", + "freetype 0.5.1", "gfx_traits", "harfbuzz-sys", "ipc-channel", @@ -2493,15 +2468,15 @@ checksum = "63d68db75012a85555434ee079e7e6337931f87a087ab2988becbadf64673a7f" [[package]] name = "harfbuzz-sys" -version = "0.5.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf8c27ca13930dc4ffe474880040fe9e0f03c2121600dc9c95423624cab3e467" +checksum = "8c50680ef38c3c83947499b5df4f340db5b436807dfa2b21330d86254e2e4dd6" dependencies = [ "cc", - "core-graphics 0.22.0", - "core-text 19.0.0", + "core-graphics 0.19.0", + "core-text", "foreign-types", - "freetype 0.7.0", + "freetype 0.5.1", "pkg-config", ] @@ -4360,7 +4335,7 @@ dependencies = [ "bitflags", "crc32fast", "deflate", - "miniz_oxide 0.3.7", + "miniz_oxide", ] [[package]] @@ -4570,7 +4545,7 @@ checksum = "a871f1e45a3a3f0c73fb60343c811238bb5143a81642e27c2ac7aac27ff01a63" [[package]] name = "raqote" version = "0.8.1-alpha.0" -source = "git+https://github.com/jdm/raqote?branch=fkup#ff5d2d1aa7813dbcacb0d028cf7d17c82a35d9d4" +source = "git+https://github.com/jrmuizel/raqote#5444a1040bd4fd72e860ff75244fbe8fa7814470" dependencies = [ "euclid", "font-kit", @@ -5142,9 +5117,9 @@ dependencies = [ [[package]] name = "servo-fontconfig-sys" -version = "5.1.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" +checksum = "1c5e8d42c2957f6f433d90ab61277ed0226b3f49fffb19aa5493213c42e5d6df" dependencies = [ "expat-sys", "freetype-sys", @@ -6829,7 +6804,7 @@ dependencies = [ "cfg-if", "core-foundation 0.7.0", "core-graphics 0.19.0", - "core-text 15.0.0", + "core-text", "cstr", "dwrote", "euclid", diff --git a/Cargo.toml b/Cargo.toml index 58346500b9a..4dbe63e439c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,9 +32,6 @@ mio = { git = "https://github.com/servo/mio.git", branch = "servo-mio-0.6.22" } # https://github.com/rust-lang/backtrace-rs/pull/363/ backtrace = { git = "https://github.com/servo/backtrace-rs", branch = "uwp-fix" } -[patch."https://github.com/jrmuizel/raqote"] -raqote = { git = "https://github.com/jdm/raqote", branch = "fkup" } - # https://github.com/servo/servo/issues/27039#issuecomment-654400150 [patch."https://github.com/servo/webrender"] webrender = { git = "https://github.com/jdm/webrender", branch = "crash-backtrace" } diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml index 71f870a634e..fa93fbcbae4 100644 --- a/components/canvas/Cargo.toml +++ b/components/canvas/Cargo.toml @@ -22,7 +22,7 @@ canvas_traits = { path = "../canvas_traits" } crossbeam-channel = "0.4" cssparser = "0.27" euclid = "0.20" -font-kit = "0.10" +font-kit = "0.9" fnv = "1.0" gfx = { path = "../gfx" } gleam = "0.11" diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index 947918e6da8..e79575d5d07 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -20,7 +20,7 @@ euclid = "0.20" fnv = "1.0" fontsan = { git = "https://github.com/servo/fontsan" } gfx_traits = { path = "../gfx_traits" } -harfbuzz-sys = "0.5" +harfbuzz-sys = "0.4" ipc-channel = "0.14" lazy_static = "1" libc = "0.2" @@ -48,7 +48,7 @@ core-graphics = "0.19" core-text = "15.0" [target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies] -freetype = "0.7" +freetype = "0.5" servo_allocator = { path = "../allocator" } [target.'cfg(target_os = "linux")'.dependencies] diff --git a/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs index ef49bb32e68..47cf337011b 100644 --- a/components/gfx/text/shaping/harfbuzz.rs +++ b/components/gfx/text/shaping/harfbuzz.rs @@ -191,171 +191,6 @@ impl Shaper { } } -pub fn unicode_to_hb_script(script: unicode_script::Script) -> harfbuzz_sys::hb_script_t { - use harfbuzz_sys::*; - use unicode_script::Script::*; - match script { - Adlam => HB_SCRIPT_ADLAM, - Ahom => HB_SCRIPT_AHOM, - Anatolian_Hieroglyphs => HB_SCRIPT_ANATOLIAN_HIEROGLYPHS, - Arabic => HB_SCRIPT_ARABIC, - Armenian => HB_SCRIPT_ARMENIAN, - Avestan => HB_SCRIPT_AVESTAN, - Balinese => HB_SCRIPT_BALINESE, - Bamum => HB_SCRIPT_BAMUM, - Bassa_Vah => HB_SCRIPT_BASSA_VAH, - Batak => HB_SCRIPT_BATAK, - Bengali => HB_SCRIPT_BENGALI, - Bhaiksuki => HB_SCRIPT_BHAIKSUKI, - Bopomofo => HB_SCRIPT_BOPOMOFO, - Brahmi => HB_SCRIPT_BRAHMI, - Braille => HB_SCRIPT_BRAILLE, - Buginese => HB_SCRIPT_BUGINESE, - Buhid => HB_SCRIPT_BUHID, - Canadian_Aboriginal => HB_SCRIPT_CANADIAN_SYLLABICS, - Carian => HB_SCRIPT_CARIAN, - Caucasian_Albanian => HB_SCRIPT_CAUCASIAN_ALBANIAN, - Chakma => HB_SCRIPT_CHAKMA, - Cham => HB_SCRIPT_CHAM, - Cherokee => HB_SCRIPT_CHEROKEE, - Chorasmian => HB_SCRIPT_CHORASMIAN, - Common => HB_SCRIPT_COMMON, - Coptic => HB_SCRIPT_COPTIC, - Cuneiform => HB_SCRIPT_CUNEIFORM, - Cypriot => HB_SCRIPT_CYPRIOT, - Cyrillic => HB_SCRIPT_CYRILLIC, - Deseret => HB_SCRIPT_DESERET, - Devanagari => HB_SCRIPT_DEVANAGARI, - Dives_Akuru => HB_SCRIPT_DIVES_AKURU, - Dogra => HB_SCRIPT_DOGRA, - Duployan => HB_SCRIPT_DUPLOYAN, - Egyptian_Hieroglyphs => HB_SCRIPT_EGYPTIAN_HIEROGLYPHS, - Elbasan => HB_SCRIPT_ELBASAN, - Elymaic => HB_SCRIPT_ELYMAIC, - Ethiopic => HB_SCRIPT_ETHIOPIC, - Georgian => HB_SCRIPT_GEORGIAN, - Glagolitic => HB_SCRIPT_GLAGOLITIC, - Gothic => HB_SCRIPT_GOTHIC, - Grantha => HB_SCRIPT_GRANTHA, - Greek => HB_SCRIPT_GREEK, - Gujarati => HB_SCRIPT_GUJARATI, - Gunjala_Gondi => HB_SCRIPT_GUNJALA_GONDI, - Gurmukhi => HB_SCRIPT_GURMUKHI, - Han => HB_SCRIPT_HAN, - Hangul => HB_SCRIPT_HANGUL, - Hanifi_Rohingya => HB_SCRIPT_HANIFI_ROHINGYA, - Hanunoo => HB_SCRIPT_HANUNOO, - Hatran => HB_SCRIPT_HATRAN, - Hebrew => HB_SCRIPT_HEBREW, - Hiragana => HB_SCRIPT_HIRAGANA, - Imperial_Aramaic => HB_SCRIPT_IMPERIAL_ARAMAIC, - Inherited => HB_SCRIPT_INHERITED, - Inscriptional_Pahlavi => HB_SCRIPT_INSCRIPTIONAL_PAHLAVI, - Inscriptional_Parthian => HB_SCRIPT_INSCRIPTIONAL_PARTHIAN, - Javanese => HB_SCRIPT_JAVANESE, - Kaithi => HB_SCRIPT_KAITHI, - Kannada => HB_SCRIPT_KANNADA, - Katakana => HB_SCRIPT_KATAKANA, - Kayah_Li => HB_SCRIPT_KAYAH_LI, - Kharoshthi => HB_SCRIPT_KHAROSHTHI, - Khitan_Small_Script => HB_SCRIPT_KHITAN_SMALL_SCRIPT, - Khmer => HB_SCRIPT_KHMER, - Khojki => HB_SCRIPT_KHOJKI, - Khudawadi => HB_SCRIPT_KHUDAWADI, - Lao => HB_SCRIPT_LAO, - Latin => HB_SCRIPT_LATIN, - Lepcha => HB_SCRIPT_LEPCHA, - Limbu => HB_SCRIPT_LIMBU, - Linear_A => HB_SCRIPT_LINEAR_A, - Linear_B => HB_SCRIPT_LINEAR_B, - Lisu => HB_SCRIPT_LISU, - Lycian => HB_SCRIPT_LYCIAN, - Lydian => HB_SCRIPT_LYDIAN, - Mahajani => HB_SCRIPT_MAHAJANI, - Makasar => HB_SCRIPT_MAKASAR, - Malayalam => HB_SCRIPT_MALAYALAM, - Mandaic => HB_SCRIPT_MANDAIC, - Manichaean => HB_SCRIPT_MANICHAEAN, - Marchen => HB_SCRIPT_MARCHEN, - Masaram_Gondi => HB_SCRIPT_MASARAM_GONDI, - Medefaidrin => HB_SCRIPT_MEDEFAIDRIN, - Meetei_Mayek => HB_SCRIPT_MEETEI_MAYEK, - Mende_Kikakui => HB_SCRIPT_MENDE_KIKAKUI, - Meroitic_Cursive => HB_SCRIPT_MEROITIC_CURSIVE, - Meroitic_Hieroglyphs => HB_SCRIPT_MEROITIC_HIEROGLYPHS, - Miao => HB_SCRIPT_MIAO, - Modi => HB_SCRIPT_MODI, - Mongolian => HB_SCRIPT_MONGOLIAN, - Mro => HB_SCRIPT_MRO, - Multani => HB_SCRIPT_MULTANI, - Myanmar => HB_SCRIPT_MYANMAR, - Nabataean => HB_SCRIPT_NABATAEAN, - Nandinagari => HB_SCRIPT_NANDINAGARI, - New_Tai_Lue => HB_SCRIPT_NEW_TAI_LUE, - Newa => HB_SCRIPT_NEWA, - Nko => HB_SCRIPT_NKO, - Nushu => HB_SCRIPT_NUSHU, - Nyiakeng_Puachue_Hmong => HB_SCRIPT_NYIAKENG_PUACHUE_HMONG, - Ogham => HB_SCRIPT_OGHAM, - Ol_Chiki => HB_SCRIPT_OL_CHIKI, - Old_Hungarian => HB_SCRIPT_OLD_HUNGARIAN, - Old_Italic => HB_SCRIPT_OLD_ITALIC, - Old_North_Arabian => HB_SCRIPT_OLD_NORTH_ARABIAN, - Old_Permic => HB_SCRIPT_OLD_PERMIC, - Old_Persian => HB_SCRIPT_OLD_PERSIAN, - Old_Sogdian => HB_SCRIPT_OLD_SOGDIAN, - Old_South_Arabian => HB_SCRIPT_OLD_SOUTH_ARABIAN, - Old_Turkic => HB_SCRIPT_OLD_TURKIC, - Oriya => HB_SCRIPT_ORIYA, - Osage => HB_SCRIPT_OSAGE, - Osmanya => HB_SCRIPT_OSMANYA, - Pahawh_Hmong => HB_SCRIPT_PAHAWH_HMONG, - Palmyrene => HB_SCRIPT_PALMYRENE, - Pau_Cin_Hau => HB_SCRIPT_PAU_CIN_HAU, - Phags_Pa => HB_SCRIPT_PHAGS_PA, - Phoenician => HB_SCRIPT_PHOENICIAN, - Psalter_Pahlavi => HB_SCRIPT_PSALTER_PAHLAVI, - Rejang => HB_SCRIPT_REJANG, - Runic => HB_SCRIPT_RUNIC, - Samaritan => HB_SCRIPT_SAMARITAN, - Saurashtra => HB_SCRIPT_SAURASHTRA, - Sharada => HB_SCRIPT_SHARADA, - Shavian => HB_SCRIPT_SHAVIAN, - Siddham => HB_SCRIPT_SIDDHAM, - SignWriting => HB_SCRIPT_SIGNWRITING, - Sinhala => HB_SCRIPT_SINHALA, - Sogdian => HB_SCRIPT_SOGDIAN, - Sora_Sompeng => HB_SCRIPT_SORA_SOMPENG, - Soyombo => HB_SCRIPT_SOYOMBO, - Sundanese => HB_SCRIPT_SUNDANESE, - Syloti_Nagri => HB_SCRIPT_SYLOTI_NAGRI, - Syriac => HB_SCRIPT_SYRIAC, - Tagalog => HB_SCRIPT_TAGALOG, - Tagbanwa => HB_SCRIPT_TAGBANWA, - Tai_Le => HB_SCRIPT_TAI_LE, - Tai_Tham => HB_SCRIPT_TAI_THAM, - Tai_Viet => HB_SCRIPT_TAI_VIET, - Takri => HB_SCRIPT_TAKRI, - Tamil => HB_SCRIPT_TAMIL, - Tangut => HB_SCRIPT_TANGUT, - Telugu => HB_SCRIPT_TELUGU, - Thaana => HB_SCRIPT_THAANA, - Thai => HB_SCRIPT_THAI, - Tibetan => HB_SCRIPT_TIBETAN, - Tifinagh => HB_SCRIPT_TIFINAGH, - Tirhuta => HB_SCRIPT_TIRHUTA, - Ugaritic => HB_SCRIPT_UGARITIC, - Unknown => HB_SCRIPT_UNKNOWN, - Vai => HB_SCRIPT_VAI, - Warang_Citi => HB_SCRIPT_WARANG_CITI, - Wancho => HB_SCRIPT_WANCHO, - Yezidi => HB_SCRIPT_YEZIDI, - Yi => HB_SCRIPT_YI, - Zanabazar_Square => HB_SCRIPT_ZANABAZAR_SQUARE, - _ => HB_SCRIPT_UNKNOWN, - } -} - impl ShaperMethods for Shaper { /// Calculate the layout metrics associated with the given text when painted in a specific /// font. @@ -371,7 +206,7 @@ impl ShaperMethods for Shaper { }, ); - hb_buffer_set_script(hb_buffer, unicode_to_hb_script(options.script)); + hb_buffer_set_script(hb_buffer, options.script.to_hb_script()); hb_buffer_add_utf8( hb_buffer, diff --git a/components/layout/text.rs b/components/layout/text.rs index 979443feae4..1d9fae80297 100644 --- a/components/layout/text.rs +++ b/components/layout/text.rs @@ -29,7 +29,7 @@ use style::properties::ComputedValues; use style::values::generics::text::LineHeight; use style::values::specified::text::{TextTransform, TextTransformCase}; use unicode_bidi as bidi; -use unicode_script::Script; +use unicode_script::{get_script, Script}; use xi_unicode::LineBreakLeafIter; /// Returns the concatenated text of a list of unscanned text fragments. @@ -259,7 +259,7 @@ impl TextRunScanner { // // TODO: Special handling of paired punctuation characters. // http://www.unicode.org/reports/tr24/#Common - let script = Script::from(character); + let script = get_script(character); let compatible_script = is_compatible(script, run_info.script); if compatible_script && !is_specific(run_info.script) && is_specific(script) { From 6b520850f34d55e88678999ff85aa70ba949d10c Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Tue, 4 Aug 2020 19:16:13 -0400 Subject: [PATCH 3/5] Revert "Update harfbuzz, freetype, unicode-script." This reverts commit 327fed6084a99cfeede4752dc7b71416b5d83032. --- Cargo.lock | 37 ++++++++++++++++++++++--------- components/gfx/Cargo.toml | 6 ++--- components/layout/Cargo.toml | 2 +- components/layout_2020/Cargo.toml | 2 +- servo-tidy.toml | 1 + 5 files changed, 32 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d283862600c..21394d96657 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -999,6 +999,18 @@ dependencies = [ "libc", ] +[[package]] +name = "core-text" +version = "13.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db84654ad95211c082cf9795f6f83dc17d0ae6c985ac1b906369dc7384ed346d" +dependencies = [ + "core-foundation 0.6.4", + "core-graphics 0.17.3", + "foreign-types", + "libc", +] + [[package]] name = "core-text" version = "15.0.0" @@ -1567,7 +1579,7 @@ dependencies = [ "byteorder", "core-foundation 0.7.0", "core-graphics 0.19.0", - "core-text", + "core-text 15.0.0", "dirs", "dwrote", "float-ord", @@ -1848,12 +1860,12 @@ dependencies = [ "byteorder", "core-foundation 0.7.0", "core-graphics 0.19.0", - "core-text", + "core-text 15.0.0", "dwrote", "euclid", "fnv", "fontsan", - "freetype 0.5.1", + "freetype 0.4.1", "gfx_traits", "harfbuzz-sys", "ipc-channel", @@ -2468,15 +2480,15 @@ checksum = "63d68db75012a85555434ee079e7e6337931f87a087ab2988becbadf64673a7f" [[package]] name = "harfbuzz-sys" -version = "0.4.0" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c50680ef38c3c83947499b5df4f340db5b436807dfa2b21330d86254e2e4dd6" +checksum = "212d74cab8498b2d15700b694fb38f77562869d05e1f8b602dd05221a1ca2d63" dependencies = [ "cc", - "core-graphics 0.19.0", - "core-text", + "core-graphics 0.17.3", + "core-text 13.3.2", "foreign-types", - "freetype 0.5.1", + "freetype 0.4.1", "pkg-config", ] @@ -6443,9 +6455,12 @@ dependencies = [ [[package]] name = "unicode-script" -version = "0.5.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79bf4d5fc96546fdb73f9827097810bbda93b11a6770ff3a54e1f445d4135787" +checksum = "09f03ad95feb4fde244d79985bfd79eb34ff2702fedb441d2ba3f4ff813efd19" +dependencies = [ + "harfbuzz-sys", +] [[package]] name = "unicode-segmentation" @@ -6804,7 +6819,7 @@ dependencies = [ "cfg-if", "core-foundation 0.7.0", "core-graphics 0.19.0", - "core-text", + "core-text 15.0.0", "cstr", "dwrote", "euclid", diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index e79575d5d07..d8ba44dc612 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -20,7 +20,7 @@ euclid = "0.20" fnv = "1.0" fontsan = { git = "https://github.com/servo/fontsan" } gfx_traits = { path = "../gfx_traits" } -harfbuzz-sys = "0.4" +harfbuzz-sys = "0.3" ipc-channel = "0.14" lazy_static = "1" libc = "0.2" @@ -37,7 +37,7 @@ style = { path = "../style", features = ["servo"] } time = "0.1.12" ucd = "0.1.1" unicode-bidi = { version = "0.3", features = ["with_serde"] } -unicode-script = "0.5" +unicode-script = { version = "0.3", features = ["harfbuzz"] } webrender_api = { git = "https://github.com/servo/webrender" } xi-unicode = "0.1.0" @@ -48,7 +48,7 @@ core-graphics = "0.19" core-text = "15.0" [target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies] -freetype = "0.5" +freetype = "0.4" servo_allocator = { path = "../allocator" } [target.'cfg(target_os = "linux")'.dependencies] diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index a6bc544f9b3..90aaaa58011 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -48,7 +48,7 @@ smallvec = { version = "0.6", features = ["std", "union"] } style = { path = "../style", features = ["servo", "servo-layout-2013"] } style_traits = { path = "../style_traits" } unicode-bidi = { version = "0.3", features = ["with_serde"] } -unicode-script = "0.5" +unicode-script = { version = "0.3", features = ["harfbuzz"] } webrender_api = { git = "https://github.com/servo/webrender" } xi-unicode = "0.1.0" diff --git a/components/layout_2020/Cargo.toml b/components/layout_2020/Cargo.toml index 75a948fa56d..6ca3d709627 100644 --- a/components/layout_2020/Cargo.toml +++ b/components/layout_2020/Cargo.toml @@ -42,7 +42,7 @@ servo_arc = { path = "../servo_arc" } servo_url = { path = "../url" } style = { path = "../style", features = ["servo", "servo-layout-2020"] } style_traits = { path = "../style_traits" } -unicode-script = "0.5" +unicode-script = { version = "0.3", features = ["harfbuzz"] } webrender_api = { git = "https://github.com/servo/webrender" } [dev-dependencies] diff --git a/servo-tidy.toml b/servo-tidy.toml index f26234f551d..f427c89df7b 100644 --- a/servo-tidy.toml +++ b/servo-tidy.toml @@ -64,6 +64,7 @@ packages = [ "core-foundation", "core-foundation-sys", "core-graphics", + "core-text", "lyon_geom", ] # Files that are ignored for all tidy and lint checks. From ecfaba930494ced9eb5a299e42ebcb794d7210ac Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Tue, 4 Aug 2020 19:16:19 -0400 Subject: [PATCH 4/5] Revert "Update raqote, font-kit, fontconfig." This reverts commit a6ca582a556d19a82b1e9f71015b7e62277d32fa. --- Cargo.lock | 93 ++++++++++++++++++++---------------- components/canvas/Cargo.toml | 4 +- components/gfx/Cargo.toml | 2 +- servo-tidy.toml | 2 - 4 files changed, 55 insertions(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 21394d96657..4047ce9ad3d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -718,9 +718,9 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.44" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e56268c17a6248366d66d4a47a3381369d068cce8409bb1716ed77ea32163bb" +checksum = "3c84c596dcf125d6781f58e3f4254677ec2a6d8aa56e8501ac277100990b3229" dependencies = [ "cc", ] @@ -1211,6 +1211,16 @@ dependencies = [ "ws", ] +[[package]] +name = "deflate" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707b6a7b384888a70c8d2e8650b3e60170dfc6a67bb4aa67b6dfca57af4bedb4" +dependencies = [ + "adler32", + "byteorder", +] + [[package]] name = "deflate" version = "0.8.6" @@ -1571,9 +1581,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "font-kit" -version = "0.9.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ed9b6d89600e22d9bfcfdd8c27e981540664a1a85a3f3971793c75502f49d9" +checksum = "76ab2cdc792b545c49acb23aafa1cdc9381ea96140741f10bac596fd1bd1aa4f" dependencies = [ "bitflags", "byteorder", @@ -1583,7 +1593,7 @@ dependencies = [ "dirs", "dwrote", "float-ord", - "freetype 0.5.1", + "freetype", "lazy_static", "libc", "log", @@ -1629,27 +1639,6 @@ dependencies = [ "servo-freetype-sys", ] -[[package]] -name = "freetype" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73222ab32d9ad65fe0e1c3258da8d614fd47cf19fce92b09eb520060c5c5ad5" -dependencies = [ - "freetype-sys", - "libc", -] - -[[package]] -name = "freetype-sys" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48ac0ce366dd47a115ec8e598d7c51b4a974fc52ded5e53a56b31f55f34f3ea" -dependencies = [ - "cmake", - "libc", - "pkg-config", -] - [[package]] name = "fs_extra" version = "1.1.0" @@ -1865,7 +1854,7 @@ dependencies = [ "euclid", "fnv", "fontsan", - "freetype 0.4.1", + "freetype", "gfx_traits", "harfbuzz-sys", "ipc-channel", @@ -2488,7 +2477,7 @@ dependencies = [ "core-graphics 0.17.3", "core-text 13.3.2", "foreign-types", - "freetype 0.4.1", + "freetype", "pkg-config", ] @@ -2731,7 +2720,7 @@ dependencies = [ "num-iter", "num-rational 0.3.0", "num-traits", - "png", + "png 0.16.6", "scoped_threadpool", "tiff", ] @@ -2757,6 +2746,15 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "inflate" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cdb29978cc5797bd8dcc8e5bf7de604891df2a8dc576973d71a281e916db2ff" +dependencies = [ + "adler32", +] + [[package]] name = "input_buffer" version = "0.3.1" @@ -4338,6 +4336,18 @@ dependencies = [ "num-traits", ] +[[package]] +name = "png" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef859a23054bbfee7811284275ae522f0434a3c8e7f4b74bd4a35ae7e1c4a283" +dependencies = [ + "bitflags", + "crc32fast", + "deflate 0.7.20", + "inflate", +] + [[package]] name = "png" version = "0.16.6" @@ -4346,7 +4356,7 @@ checksum = "c150bf7479fafe3dd8740dbe48cc33b2a3efb7b0fe3483aced8bbc39f6d0238d" dependencies = [ "bitflags", "crc32fast", - "deflate", + "deflate 0.8.6", "miniz_oxide", ] @@ -4556,14 +4566,15 @@ checksum = "a871f1e45a3a3f0c73fb60343c811238bb5143a81642e27c2ac7aac27ff01a63" [[package]] name = "raqote" -version = "0.8.1-alpha.0" -source = "git+https://github.com/jrmuizel/raqote#5444a1040bd4fd72e860ff75244fbe8fa7814470" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501c19caa439857ed7bea975fa4c3c10ee9a24e33c2640030c3ac14b58f39f77" dependencies = [ "euclid", "font-kit", "lyon_geom 0.15.0", "pathfinder_geometry", - "png", + "png 0.15.3", "sw-composite", "typed-arena", ] @@ -5119,9 +5130,9 @@ dependencies = [ [[package]] name = "servo-fontconfig" -version = "0.5.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b47fef69c52fb55838c756949c60595f0b855daa4e82fc52ad99ff3e03e2c70" +checksum = "a088f8d775a5c5314aae09bd77340bc9c67d72b9a45258be34c83548b4814cd9" dependencies = [ "libc", "servo-fontconfig-sys", @@ -5129,20 +5140,20 @@ dependencies = [ [[package]] name = "servo-fontconfig-sys" -version = "5.0.1" +version = "4.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c5e8d42c2957f6f433d90ab61277ed0226b3f49fffb19aa5493213c42e5d6df" +checksum = "62b3e166450f523f4db06c14f02a2d39e76d49b5d8cbd224338d93e3595c156c" dependencies = [ "expat-sys", - "freetype-sys", "pkg-config", + "servo-freetype-sys", ] [[package]] name = "servo-freetype-sys" -version = "4.0.3" +version = "4.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9232032c2e85118c0282c6562c84cab12316e655491ba0a5d1905b2320060d1b" +checksum = "2c4ccb6d0d32d277d3ef7dea86203d8210945eb7a45fba89dd445b3595dd0dfc" dependencies = [ "cmake", "pkg-config", @@ -6823,7 +6834,7 @@ dependencies = [ "cstr", "dwrote", "euclid", - "freetype 0.4.1", + "freetype", "fxhash", "gleam 0.11.0", "glslopt", diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml index fa93fbcbae4..2281ea30242 100644 --- a/components/canvas/Cargo.toml +++ b/components/canvas/Cargo.toml @@ -22,7 +22,7 @@ canvas_traits = { path = "../canvas_traits" } crossbeam-channel = "0.4" cssparser = "0.27" euclid = "0.20" -font-kit = "0.9" +font-kit = "0.7" fnv = "1.0" gfx = { path = "../gfx" } gleam = "0.11" @@ -32,7 +32,7 @@ log = "0.4" lyon_geom = "0.14" num-traits = "0.2" pixels = { path = "../pixels" } -raqote = { git = "https://github.com/jrmuizel/raqote", features = ["text"] } +raqote = { version = "0.8", features = ["text"] } servo_arc = { path = "../servo_arc" } servo_config = { path = "../config" } sparkle = "0.1.25" diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index d8ba44dc612..0ffa87835e1 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -52,7 +52,7 @@ freetype = "0.4" servo_allocator = { path = "../allocator" } [target.'cfg(target_os = "linux")'.dependencies] -servo-fontconfig = "0.5" +servo-fontconfig = "0.4" [target.'cfg(target_os = "android")'.dependencies] xml-rs = "0.8" diff --git a/servo-tidy.toml b/servo-tidy.toml index f427c89df7b..323ce582840 100644 --- a/servo-tidy.toml +++ b/servo-tidy.toml @@ -32,12 +32,10 @@ packages = [ "arrayvec", "base64", "cocoa", - "freetype", "gleam", "libloading", "metal", "miniz_oxide", - "num-rational", "parking_lot", "parking_lot_core", "wayland-sys", From 98edaee311aee1a387df20738589e84d9997a414 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Tue, 4 Aug 2020 19:18:20 -0400 Subject: [PATCH 5/5] Update allowed duplicate crates. --- Cargo.lock | 2 +- servo-tidy.toml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 4047ce9ad3d..286fb644bfa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4357,7 +4357,7 @@ dependencies = [ "bitflags", "crc32fast", "deflate 0.8.6", - "miniz_oxide", + "miniz_oxide 0.3.7", ] [[package]] diff --git a/servo-tidy.toml b/servo-tidy.toml index 323ce582840..bdd97b77799 100644 --- a/servo-tidy.toml +++ b/servo-tidy.toml @@ -32,12 +32,15 @@ packages = [ "arrayvec", "base64", "cocoa", + "deflate", "gleam", "libloading", "metal", "miniz_oxide", + "num-rational", "parking_lot", "parking_lot_core", + "png", "wayland-sys", # https://github.com/servo/servo/issues/26933