| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Adapt changes from 1c9120c293cc16c11637feb6003117d4093642b5
to the OpenHarmony font_list.rs.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example:
```html
<table border="1">
<tr> <td></td> <td></td> </tr>
<tr> <td colspan="2"></td> </tr>
</table>
```
We should initially size the columns according to the cells in the first
row since they have a span of 1. Then we handle the cell in the second
row with a span of 2, this should be able to increase the size of the
columns, but never decrease them.
|
|
|
| |
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, when deciding the font for a space, preference was given to
the previous used font. This could means that the font chosen was a
fallback font instead of the first font that supporting the space
character in the font preference list.
This caused an issue rendering emojis surrounded by spaces with "Noto
Color Emoji" which has a space character the same size as the emoji,
leading to too much spacing between them.
Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
|
| |
|
|
|
|
|
| |
It was providing a length whenever the element generates a box.
However, these properties don't apply to non-replaced inlines,
so the computed value should be provided instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the `ucd` dependency which has not been updated in 8 years. In
addition, replace it with a generated UnicodeBlock enum which reflects
the modern Unicode standard. This is generated via a Python script which
is included in the repository. The generation is not part of the build
process, because the Unicode database is hosted on the web and it does
not change the frequently.
This is done instead of bringing in the more up-to-date `unicode_blocks`
dependency. `unicode_blocks` defines each block as constant, which means
that they cannot be used in match statements -- which we do in Servo.
Co-authored-by: Lauryn Menard <lauryn.menard@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main change here is that collapsed and `text-transform`'d text is
computed as it's processed by DOM traversal. This single transformed
text is stored in the root of the `InlineFormattingContext`.
This will eventually allow performing linebreaking and shaping of the
entire inline formatting context at once. Allowing for intelligent
processing of linebreaking and also shaping across elements. This
matches more closely what LayoutNG does.
This shouldn't have any (or negligable) behavioral changes, but will
allow us to prevent linebreaking inside of clusters in a followup
change.
Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update to rust 1.78
* Update crown for rust 1.78
* rust 1.78 is now stable
* Update for nix
* Update comment
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Update support/crown/src/common.rs
* Update support/crown/Cargo.toml
* Update support/crown/src/common.rs
* Fix ipc problem
* Update ipc-channel to 0.18.1
* fixed fixme
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
| |
Signed-off-by: Hieu Do <hieudn.uh@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* clippy: Fix warnings in `components/layout_2020/flow/text_run.rs`
Signed-off-by: Jujumba <far77578@gmail.com>
* clippy: Fix warnings in `components/layout_2020/flow/text_run.rs`
Signed-off-by: Jujumba <far77578@gmail.com>
---------
Signed-off-by: Jujumba <far77578@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* clippy: Fix warnings in `components/webgpu/wgpu_thread.rs`
Signed-off-by: Jujumba <far77578@gmail.com>
* clippy: `test-tidy` failure in `components/webgpu/wgpu_thread.rs`
Signed-off-by: Jujumba <far77578@gmail.com>
---------
Signed-off-by: Jujumba <far77578@gmail.com>
|
|
|
| |
Signed-off-by: Jujumba <far77578@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds support for `white-space-collapse: break-spaces` and
adds initial parsing support for `overflow-wrap` and `word-break`. The
later two properties are not fully supported, only in their interaction
with `break-spaces`. This is a preliminary change preparing to implement
them.
In addition, `break_and_shape` is now forked and added to Layout 2020.
This function is going to change a lot soon and forking is preparation
for this. More code that is only used by Layout 2013 is moved from `gfx`
to that crate.
Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
|
|
|
|
|
|
| |
The `gfx_traits` crate is gradually become just about text and fonts and
this is one of the few things there that is standing in the way of this.
Eventually `webrender_traits` will be the general cross-process
compositor API, so this sort of makes sense as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Upgrade stylo to 2024-05-15
* Fixup for https://phabricator.services.mozilla.com/D208599
* Fixup for https://phabricator.services.mozilla.com/D208569
* Fixup for https://phabricator.services.mozilla.com/D207796
* Fixup for https://phabricator.services.mozilla.com/D209690
* hashbrown and indexmap are no longer duplicated
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Better detect situations where emoji is necessary by looking ahead one
character while laying out. This allow processing Unicode presentation
selectors. When detecting emoji, put emoji fonts at the front of
fallback lists for all platforms.
This enables monochrome emoji on Windows. Full-color emoji on Windows
probably needs full support for processing the COLR table and drawing
separate glyph color layers.
- Improve the font fallback list on FreeType platforms. Ideally, Servo
would be able to look through the entire font list to find the best
font for a certain character, but until that time we can make sure the
font list contains the "Noto Sans" fonts which cover most situations.
Fixes #31664.
Fixes #12944.
|
|
|
|
|
|
| |
Instead of bouncing messages from the compositor to script and then to
layout, just have script call methods on Layout. Additionally, we do not
need to send any followup messages to script for these messages. Instead
just execute code after calling the method on Layout.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fonts: Add support for the CSS font matching algorithm
This is a port from Gecko of the CSS font matching algorithm distance
functions as well as the "simple family" concept for optimizing
matching when dealing with simple fonts.
Fixes #189.
Fixes #190.
Fixes #20686.
Fixes #20684.
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Ensure that simple faces are removed for removed stylesheets
---------
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
|
|
|
|
|
|
|
|
|
| |
* Move webgl_channel into a shared crate
* Add license header
* Rename channle types and simplify module
* Move module to base
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first part of ensuring that unused fonts do not leak. This
change makes it so that when a stylesheet is removed, the corresponding
web fonts are removed from the `FontContext`.
Note: WebRender assets are still leaked, which was the situation before
for all fonts. A followup change will fix this issue.
Fixes #15139.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Prepare errorscopes logic in wgpu_thread
* remove scope_id from ipc
* new GPUErrors per spec
* remove cotent timeline error_scope
* fixup poperrorscope types
* device_scope -> gpu_error and nice errors
* Handle errors detection more elegantly
* good expectations
* new expectations
* Make error_scope.errors Vec as per spec
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of sending a message to the script thread via IPC when a web
font loads and then sending another, just give the `FontContext` a
callback that send a single message to the script thread. This moves all
the cache invalidation internally into `FontContext` as well.
Additionally, the unused LayoutControlMessage::ExitNow enum variant is
removed.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
|
|
|
|
|
| |
https://drafts.csswg.org/css2/#dynamic-effects
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
| |
https://drafts.csswg.org/css-tables/#empty-cell-rendering
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
| |
Instead of depending on `rust-freetype`, depend directly on
`freetype-sys` which is a transitive dependency. This provides almost
everything we need (apart from one function call). This will help us
eliminate one crate in the dependency chain.
|
|
|
|
|
|
|
|
|
| |
This moves mangement of web fonts to the per-Layout `FontContext`,
preventing web fonts from being available in different Documents.
Fixes #12920.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
|
|
|
|
|
|
| |
Have `Document` own `Layout`. This makes it impossible to have a
`Document` without `Layout`, which was true, but now the compiler checks
it. In addition, `Layout` is now released when the `Document` is,
avoiding leaking the entire `Layout`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Move WebRender related types to `webrender_traits`
This refactor moves several WebRender related types
from `compositing_traits`, `script_traits` and `net_traits`
crates to the `webrender_traits` crate.
This change also moves the `Image` type and associated
function out of `net_traits` and into the `pixels` crate.
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Move `script_traits::WebrenderIpcSender` to `webrender_traits::WebRenderScriptApi`
---------
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
| |
* Add unit test to EmbedderCoordinates
* Fix typo
|
|
|
| |
Co-authored-by: antreas <andreas.bitzilis@redpill-linpro.com>
|
|
|
|
|
|
|
|
|
| |
This change adds a very simple implementation of `border-collapse` for
tables. No harmonization or merging is done at all for borders. Instead,
the largest border for every continuous border sets the size. Instead of
merging different border styles, they are squashed to half size -- which
isn't great, but ensures appropriate positioning.
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For a long time, `gfx_traits` has held a lot of things unrelated to graphics
and also unrelated to the `gfx` crate (which is mostly about fonts).
This is a cleanup which does a few things:
1. Move non `gfx` crate things out of `gfx_traits`. This is important in
order to prevent dependency cycles with a different integration between
layout, script, and fonts.
2. Rename the `msg` crate to `base`. It didn't really contain anything
to do with messages and instead mostly holds ids, which are used
across many different crates in Servo. This new crate will hold the
*rare* data types that are widely used.
Details:
- All BackgroundHangMonitor-related things from base to a new
`background_hang_monitor_api` crate.
- Moved `TraversalDirection` to `script_traits`
- Moved `Epoch`-related things from `gfx_traits` to `base`.
- Moved `PrintTree` to base. This should be widely useful in Servo.
- Moved `WebrenderApi` from `base` to `webrender_traits` and renamed it
to `WebRenderFontApi`.
|
|
|
|
|
|
|
|
|
|
|
| |
Color emoji support with "Noto Color Emoji" requires two things:
1. Support for bitmap fonts in the FreeType backend. This requires
specially handling bitmap fonts which have different characteristics
in the FreeType API (such as requiring metrics scaling). This support
is generally ported from Gecko's implementation.
2. When a character is an emoji it "Noto Color Emoji" needs to be in the
fallback list. Ensure that this is high on the list -- this will be
improved in a later PR.
|
|
|
|
|
|
|
|
|
| |
This is a speculative fix for #32161. A similar failure is
reproducible on the Android x86_64 emulator with API 35
system image. The fix has not been validated on the actual
device so potentially there might be other issues that need
to be fixed to complete #32161.
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
This was renamed in the spec:
https://github.com/w3c/navigation-timing/pull/172
The NavigationType enum name is now part of the navigation history apis:
https://html.spec.whatwg.org/multipage/nav-history-apis.html\#navigationtype
|
|
|
|
|
|
|
|
|
|
|
| |
* Use special WGPU poller thread for poll_all_devices
* Switch to latest wgpu
This is required to fix some deadlocks.
* non-blocking poll unconditionally
* small fixes
|
|
|
|
|
|
|
| |
* Fix RefCell borrows
* Update document.rs
fmt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a fix for the crash issue in 64-bit ARM [#32175][1].
When targeting Android 11 and above, 64-bit ARM platforms
have the 'Tagged Pointer' feature enabled by default which
causes memory allocated using the system allocator to have
a non-zero 'tag' set in the highest byte of heap addresses.
This is incompatible with SpiderMonkey which assumes that
only the bottom 48 bits are set and asserts this at various
points.
Both Servo and Gecko have a similar architecture where
the pointer to a heap allocated DOM struct is encoded as
a JS::Value and stored in the DOM_OBJECT_SLOT (reserved
slot) of the JSObject which reflects the native DOM struct.
As observed in #32175, even Gecko crashes with `jemalloc`
disabled which suggests that support for using the native
system allocator with tagged pointers enabled by default
is not present at the moment.
[1]: https://github.com/servo/servo/issues/32175
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix the HTML event-loop: add a update the rendering task
add rendering task source
sketch structure to update the rendering
resize steps
composition events
fix warnings in rendering task source
refactor handling of composition events: put window and doc for pipeline on top
set script as user interacting in update the rendering task
fmt
add todos for other steps, put all compositor handling logic in one place
update the rendering: evaluate media queries and report changes
update the rendering: update animations and send events
update the rendering: run animation frames
update the rendering: order docs
put rendering related info on documents map
tidy
update the rendering: add issue numbers to todos
update the rendering: reflow as last step
update the rendering: add todo for top layer removals
note rendering opportunity when ticking animations for testing
fix double borrow crash in css/basic-transition
fix faster reversing of transitions test
undo ordering of docs
bypass not fully-active pipeline task throttling for rendering tasks
ensure tasks are dequed from task queue
prioritize update the rendering task
remove servo media stuff from set activity
tidy
debug
update the rendering: perform microtask checkpoint after task
tidy-up
only run evaluate media queries if resized
re-add evaluation of media queries for each rendering task, re-prioritize rendering tasks, re-add microtask checkpoint for all sequential messages
re-structure resize steps, and their interaction with evaluating media queries and reacting to environment changes
update the rendering: remove reflow call at the end
update webmessaging expectations
update to FAIL /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html
update to FAIL load-pageshow-events-window-open.html
add issue number for ordering of docs
nits
move batching of mouse move event to document info
nits
add doc for mouse move event index
reset mouse move event index when taking pending compositor events
fix replacing mouse move event
nits
* move update the rendering related data to document
* move re-taking of tasks to try_recv
* address nits
* change task queue try_recv into take_tasks_and_recv, with nits
* refactor process_pending_compositor_events
* when updating the rendering, return early if script cannot continue running
* use an instant for the last render opportunity time
* nits
* remove handle_tick_all_animations
* use a vec for pending resize and compositor events
* fix spec links
* Fix a few other nits before landing
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
| |
fallback (#32165)
This fixes an issue revealed by more consistent font fallback.
|
|
|
|
| |
DOMString::set_best_representation_of_the_floating_point_number in order to correct some failing tests related to -0 values. (#32272)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix clippy in components/script
warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do (components/script/dom/htmlformelement.rs:896:20)
warning: `Box::new(_)` of default value (components/script/dom/paintworkletglobalscope.rs:291:29)
warning: this creates an owned instance just for comparison (components/script/dom/radionodelist.rs:105:50)
* Fix clippy in layout_thread (2013 and 2020)
warning: this `if` statement can be collapsed (components/layout_thread/lib.rs:876:17)
warning: the following explicit lifetimes could be elided: 'a (components/layout_thread/lib.rs:239 and 2020 same line)
warning: deref which would be done by auto-deref (components/layout_thread/lib.rs:500 and 1289)
warning: dereferencing a tuple pattern where every element takes a reference (components/layout_thread/lib.rs:503,1562 and 2020 line 1153)
warning: useless conversion to the same type: `style::invalidation::element::restyle_hints::RestyleHint` (components/layout_thread_2020/lib.rs:742:36)
* Fix clippy in components/servo
warning: constants have by default a `'static` lifetime (components/servo/lib.rs:1238:31)
warning: creating a `let` binding to a value of unit type, which usually
can't be used afterwards (5 occurances in components/servo/lib.rs)
* FIx clippy in ports/servoshell
warning: this expression creates a reference which is immediately dereferenced by the compiler (ports/servoshell/app.rs:251:89)
warning: using `clone` on type `Option<TopLevelBrowsingContextId>` which implements the `Copy` trait (ports/servoshell/webview.rs:122:9)
|
|
|
|
|
| |
* Implement attributes for the meter element
* Remove checks for min < max before clamping
|
|
|
|
|
|
|
|
|
|
|
|
| |
* clippy: Fix vtable_address_comparisons error
* Update components/script/dom/bindings/root.rs
Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
---------
Co-authored-by: Sergii Tomusiak <sergiitomusiak@github.com>
Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
|
|
|
|
|
|
|
| |
* wgpu(_core) -> wgc
* Refactor webgpu crate
split lib.rs into multiple modules
|
|
|
|
|
|
|
|
|
|
|
| |
* Update wgpu to 0.20
* good expectations
* Throw TypeError in configure on unsupported format instead of panic
* Expect
* `into_command_buffer_id`,`into_command_encoder_id`
|