PR #32465 broke the lint because it initializes FileList with a
file name (./Cargo.lock). This causes it to always return an empty
list when the `only_changed_files` parameter is `False` since `os.walk`
requires a directory and not a file.
Fixes#32530.
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This uses a pretty simple heuristic to select a font likely to contain
color emoji. In the future Servo should actually check if the font also
contains a color representation of the character in question. For now
the code assumes that when a font supports color glyphs of some kind and
supports the character in question at all, it supports the color
version.
This fixes support for rendering keycap emoji clusters such as 1️⃣ .
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Postfix PATH with android toolchain:
We only need to edit path for the linker specified
in the `.cargo/config.toml` to be found. Adding the
NDK clang to the end of PATH is sufficient for that.
Adding the NDK clang to the front can cause problems
however, since it causes the NDK `clang` to be
preferred over the system clang. This can cause
problems on some systems, where compiling
e.g. buildscripts for HOST subsequently fails.
* Prefix target compiler and compiler flags variables
with `TARGET_` so as not to influence compilation
for HOST targets.
* SET `CLANG_PATH` to avoid [bindgen #2682]
[bindgen #2682]: https://github.com/rust-lang/rust-bindgen/issues/2682
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* device lost promise should be init at creation of device object
* device lost impl
* lock for device poll
workaround for wgpu deadlocks
* expect
* Less lost reason reasoning in script
* Add ohos to mach
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Add OpenHarmony build to CI
* Rename ohos sdk action
I decided to rename the upstream ohos sdk action to
setup-ohos-sdk, making it clearer that is a github
action repository.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Remove commented line
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
---------
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
DirectWrite APIs expect the bytes of table tags to be reversed when
reading them. Servo was doing this when loading font tables, but not all
of them. This led to shaping being broken on Windows. This fixes that
issue in a more comprehensive way and adds a comment to avoid this
failing in the future.
This is part of the switch from `winapi` to `windows-sys`. `windows-sys` is
maintained by Microsoft, so is more "official." More and more crates are
switching to it.
Disable some code for Windows, which is causing build warnings. When it
cannot be easily disabled (mainly for the incomplete BHM and sandbox
feature), allow dead code.
* Update WebIDL.py
* Update WebIDL.py
* Add builtin-array.patch
* Fix CodegenRust.py and Configuration.py
* Fix missing downcasts
* mach fmt
* Update check and comment to explain why we need this check
* Update Global of DissimilarOriginWindow.webidl
`#[cfg(target_os = "xxx")]` when used in build scripts checks which
platform the **build script** is compiled for - i.e. the Host OS.
Since ware interested in the actual target os, we need to read
`CARGO_CFG_TARGET_OS`, a value that is set at **runtime of the build
script**.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* servoshell: Move desktop files
Move files related to winit into a desktop module.
This is a preparation to merge the android and ohos apps into
servoshell.
* servoshell: Format imports
* servoshell: Move panic hook into separate file
* servoshell: Move desktop main
* Consider ohos as not desktop
* servoshell: Adjust dependencies for shared code
* servoshell: Remove native-bluetooth from default features
There currently is no good way to have target specific default features.
* Rename desktop_main.rs to cli.rs
* Remove todo
Instead of linebreaking inside each single-font text segment, linebreak
the entire inline formatting context at once. This has several benefits:
1. It allows us to use `icu_segmenter` (already in use from style),
which is written against a newer version of the Unicode spec --
preventing breaking emoji clusters.
2. Opens up the possibility of changing the way that linebreaking and
shaping work -- eventually allowing shaping across inline box
boundaries and line breaking *after* shaping.
Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
On platforms that ship Noto, the list of fallback fonts can be shared.
This reduces code duplcation and makes it easier to keep up to date with
changes in Noto.
This allows passing `--crate-type` and rustflags which only apply
to the top-level-crate.
The former is useful to merge the android and ohos apps
into servoshell, while the later may be useful in the
future.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Use cargo-deny to check license compliance.
All licenses should be MPL-2.0 or weaker.
* Run cargo-deny check licenses in mach tidy
* fmt
* Fix inverted boolean
* Move cargo deny to tidy.py
* Add quotes around license in error message
* Integrate `cargo-deny` into tidy fully
* Fix script tests
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* feat: show tabs and processes on devtools
Co-authored-by: fabricedesre <fabrice@desre.org>
* chore: clean for pr
* fix: use serde renaming to avoid camel case
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* fix: serde rename all to camel case
* refactor: reduce getTab nesting level
---------
Co-authored-by: fabricedesre <fabrice@desre.org>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* minibrowser: Disables urlbar when in fullscreen
Signed-off-by: Nylme <nylme@protonmail.com>
* Added a TODO to minibrowser about: "Hiding URL bar in fullscreen is a phishing risk"
Signed-off-by: Nylme <nylme@protonmail.com>
* Ran ./mach fmt
Signed-off-by: Nylme <nylme@protonmail.com>
* Fixed typo.
Signed-off-by: Nylme <nylme@protonmail.com>
* Fixed `./mach tidy-test` failing for reason: "Line is longer than 120 characters" on a comment.
And deleted an unecessary comment.
Signed-off-by: Nylme <nylme@protonmail.com>
---------
Signed-off-by: Nylme <nylme@protonmail.com>
Each non-collapsed track used to increase the offset by the subsequent
border spacing. Now they will take care of their preceding spacing
instead.
This way, if a cell spans two rows, and the second is collapsed, the
cell won't be forced to be at least as tall as the border spacing.
This matches Gecko and Blink (WebKit lacks `visibility: collapse`).
This makes visibility-collapse-border-spacing-001.html fail because we
generate outlines in a different way than Blink. Gecko also fails it
in a similar (but different) way.
* layout: Take into account `display: table` etc in offset* queries
The specification says that for deciding whether an element should be
used for offset* queries, a browser should take into account whether the
element is a table cell or table. This change makes that happen.
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Only tag HTML elements if they are in the HTML namespace
---------
Co-authored-by: Oriol Brufau <obrufau@igalia.com>