aboutsummaryrefslogtreecommitdiffstats
path: root/components
Commit message (Collapse)AuthorAgeFilesLines
* layout: Add support for flex items with `position: relative` (#33151)Martin Robinson2024-08-231-81/+132
| | | Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* shaping: Don't assume there's a space glyph when rendering tabs (#32979)Martin Robinson2024-08-235-38/+73
| | | | | | | | | | | | | | | | | | Previously if a font didn't have a space advance and it was needed to make advances for tabs, Servo would try to read the advance from the font. If the font didn't have a space glyph, Servo would panic. This fixes that issue by making the space advance part of the `FontMetrics` of a font (like Gecko) and falling back properly if that glyph doesn't exist. The rendered glyph is still the "space" glyph, but we make sure to select a font that supports that glyph explicitly. This prevents a crash, but tabs still aren't handled properly. In reality, tab stops should be calculated in layout and the size of the space character of the current font shouldn't come into play. The addition of the space advance metric will make this easier. Fixes #32970. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* layout: Clean up inline layout data structures (#33149)Martin Robinson2024-08-223-194/+154
| | | | | | | | | | | | | | | | - Rename `InlineFormattingContextState` to `InlineFormattingContextLayout`. - Have `InlineFormattingContextLayout` hold a reference to the `InlineFormattingContext`, so that it does not need to be passed around as an argument - Have `LineItemLayout` hold a reference to `InlineFormattingContextLayout` to avoid duplicating so much data. - Rename some members of `LineItemLayout` to make it clearer what they do. - Give beter names to many lifetimes and combine some that are effectively the same. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
* Start marking functions that can transitively trigger a GC (#33144)Josh Matthews2024-08-22140-304/+1336
| | | | | | | | | | | | | | | | | * Mark JS reflector wrappers as CanGc. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc from reflect_dom_object_with_proto. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Mark DOM constructors as GC operations. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Implement crypto.randomUUID() (#33158)webbeef2024-08-222-1/+16
| | | Signed-off-by: webbeef <me@webbeef.org>
* make protocol handlers registrable (#33104)webbeef2024-08-2213-219/+446
| | | Signed-off-by: webbeef <me@webbeef.org>
* webxr: Update XRWebGLLayer interface to latest spec (#33157)Daniel Adams2024-08-222-2/+22
| | | | | | | | | | | | | * Update XRWebGLLayer interface to latest spec Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add missing spec links Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* background_hang_monitor: Add musl compatibility (#33153)A. Wilcox2024-08-213-4/+19
| | | | | | | musl does not have libunwind readily available; even if it did, it has no concept of ucontext (needing an external lib). Similar to ohos, disable the background hang monitor and use the DummySampler. Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
* webxr: Update XRInputSource interface to latest spec (#33155)Daniel Adams2024-08-214-2/+17
| | | | | | | | | | | | | | | | | * Update XRInputSource interface to latest spec Signed-off-by: Daniel Adams <msub2official@gmail.com> * Bump webxr version Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add missing spec link Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* layout: Add initial support for bidirectional text (BiDi) (#33148)Martin Robinson2024-08-2111-103/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds supports for right-to-left text assigning bidi levels to all line items when necessary. This includes support for the `dir` attribute as well as corresponding CSS properties like `unicode-bidi`. It only implements right-to-left rendering for inline layout at the moment and doesn't include support for `dir=auto`. Because of missing features, this causes quite a few tests to start failing, as references become incorrect due to right-to-left rendering being active in some cases, but not others (before it didn't exist at all). Analysis of most of the new failures: ``` - /css/css-flexbox/gap-001-rtl.html /css/css-flexbox/gap-004-rtl.html - Require implementing BiDi in Flexbox, because the start and end inline margins are opposite the order of items. - /css/CSS2/bidi-text/direction-applies-to-*.xht /css/CSS2/bidi-text/direction-applies-to-002.xht /css/CSS2/bidi-text/direction-applies-to-003.xht /css/CSS2/bidi-text/direction-applies-to-004.xht - Broken due to a bug in tables, not allocating the right amount of width for a column. - /css/css-lists/inline-list.html - This fails because we wrongly insert a soft wrap opportunity between the start of an inline box and its first content. - /css/css-text/bidi/bidi-lines-001.html /css/css-text/bidi/bidi-lines-002.html /css/CSS2/text/bidi-flag-emoji.html - We do not fully support unicode-bidi: plaintext - /css/css-text/text-align/text-align-end-010.html /css/css-text/text-align/text-align-justify-006.html /css/css-text/text-align/text-align-start-010.html /html/dom/elements/global-attributes/* - We do not support dir=auto yet. - /css/css-text/white-space/tab-bidi-001.html - Servo doesn't support tab stops - /css/CSS2/positioning/abspos-block-level-001.html /css/css-text/word-break/word-break-normal-ar-000.html - Do not yet support RTL layout in block - /css/css-text/white-space/pre-wrap-018.html - Even in RTL contexts, spaces at the end of the line must hang and not be reordered - /css/css-text/white-space/trailing-space-and-text-alignment-rtl-002.html - We are letting spaces hang with white-space: pre, but they shouldn't hang. ``` Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
* webgpu: Align `writeBuffer` with spec (#33147)Samson2024-08-212-10/+21
| | | | | | | | | | | | | | | | | * Sync `WriteBuffer` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set good expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Change assert to debug_assert Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Fix floating point errors in table layout (#33098)Simon Wülker2024-08-211-2/+30
| | | Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* webxr: Update XRPose interface to latest spec (#33146)Daniel Adams2024-08-212-2/+25
| | | | | | | | | | | | | * Update XRPose interface with missing members Signed-off-by: Daniel Adams <msub2official@gmail.com> * ./mach fmt Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* webxr: Update XRView to latest spec (#33145)Daniel Adams2024-08-213-2/+31
| | | | | | | | | | | | | * Add recommendedViewportScale and requestViewportScale Signed-off-by: Daniel Adams <msub2official@gmail.com> * Remove currently unused internal slots Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Various borrow hazard fixes (#33133)Josh Matthews2024-08-204-12/+16
| | | | | | | | | | | | | | | | | | | | | * Reduce the scope of the document tag map borrow. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Reduce scope of borrow when finishing a Response. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Avoid creating a File object while borrowing FormData's data. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Prevent the GC from seeing an uninitialized window proxy slot. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Take into account the intrinsic block size when computing the main size of a ↵Oriol Brufau2024-08-202-115/+179
| | | | | | | | | | | | | | | column flex container (#33135) In particular, `main_content_sizes()` now works with columns. `layout_for_block_content_size()` is now used for both intrinsic sizes and intrinsic contributions, a IntrinsicSizingMode parameter is added to choose the behavior. Also, we consider the main size of a flex item as indefinite if its flex basis is indefinite and the flex container has an indefinite main size. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* webxr: Update XRFrame to latest spec (#33102)Daniel Adams2024-08-202-10/+20
| | | | | | | | | | | | | | | | | | | | | * Update IDL+naming, add predictedDisplayTime getter stub Signed-off-by: Daniel Adams <msub2official@gmail.com> * Surface predicted display time Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update WPT expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update todo comment Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Fix panic in embedded-opener-remove-frame (#33122)Taym Haddadi2024-08-191-1/+3
| | | Signed-off-by: Taym <haddadi.taym@gmail.com>
* webgpu: Sync various parts of spec (#33009)Samson2024-08-199-184/+550
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Sync `GPUObjectDescriptorBase` (label is not option anymore) Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Sync `GPUFeatureName` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * shader_f16 feature is not usable in wgpu so disable it Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * sync `GPUTextureFormat` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * `validate_texture_format_required_features` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Sync `GPUTexture` attributes Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Make `entryPoint` in `GPUProgrammableStage` optional Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set good expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Bad expectations because naga does not support cons declarations Also fail on firefox, where skipped before due to missing device features Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Bad expectation, also fails on firefox Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Bad expectations, because naga does not support `let pos = positions[vertex_index];` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set expectation external texture does not work in firefox too (again naga) Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * set bad expectations, because naga does not support `enable` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set bad expectations for, `Texture with '' label has been destroyed` also fails in firefox with same reason Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * one bad expectation also on firefox Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * expect that also matches firefox Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * more expect Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Use only 1 proc for _webgpu Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * better doc comment Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Upgrade font-kit, raqote, and stop using `dirs-next` (#33120)Martin Robinson2024-08-194-7/+7
| | | | | | | | | | | | | `dirs-next` is still used by the version of the `term` crate we are using, but this also remoes a version of `cstr` so our dependency count does not change. A new version of `raqote` hasn't been released, so this depends on the upstream repository directly. It's been almost 4 months since the release has been ready -- so it's unclear when it will happen. Fixes #32801. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* layout: Layout for column flex-basis and minimum automatic size ↵Martin Robinson2024-08-194-285/+421
| | | | | | | | | | | determination (#33068) This change adds an expensive layout for the determination of minimum automatic size and flex basis in process of flexbox layout. Currently, the layout is not cached, so may be performed up to 2 more times than necessary. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Refactor `GlyphStore::iter_glyphs_for_byte_range` without recursion (#33074)Cristian Brinza2024-08-193-92/+45
| | | | | | | | | | | | | | | | | | | | | * Implement DoubleEndedIterator for EachIndex Signed-off-by: crbrz <cristianb@gmail.com> * Refactor GlyphStore::iter_glyphs_for_byte_range without recursion Signed-off-by: crbrz <cristianb@gmail.com> * Update WPT result Signed-off-by: crbrz <cristianb@gmail.com> * Update WPT legacy result Signed-off-by: crbrz <cristianb@gmail.com> --------- Signed-off-by: crbrz <cristianb@gmail.com>
* Fix incorrect documentation and add `track_caller` to DomRefCell methods ↵Simon Wülker2024-08-191-4/+16
| | | | | | | | | | | | | | | | | | | (#33111) * Fix DomRefCell documentation about panic behaviour Fixes https://github.com/servo/servo/issues/33099 Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Annotate DomRefCell::borrow/borrow_mut with #[track_caller] Fixes https://github.com/servo/servo/issues/27336 Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Remove unnecessary `unsafe` block (#33109)Taym Haddadi2024-08-183-13/+5
| | | Signed-off-by: Taym <haddadi.taym@gmail.com>
* fix: add error handling to BaseAudioContext::new_inherited (#33023)Taym Haddadi2024-08-183-19/+25
| | | | | | | | | | | | | | | | | | | | | | * fix: add error handling to BaseAudioContext::new_inherited Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Update servo-media Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Update test expectations Signed-off-by: Taym <haddadi.taym@gmail.com> * Update servo-media Signed-off-by: Taym <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> Signed-off-by: Taym <haddadi.taym@gmail.com>
* Add makeXRCompatible for WebGL2, update WebXR WPT expectations (#33097)Daniel Adams2024-08-182-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add makeXRCompatible to WebGLRenderContextBase Signed-off-by: Daniel Adams <msub2official@gmail.com> * Activate webgl2 for webxr wpt, update meta expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update meta legacy layout expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Remove no longer existing expectations from meta files Signed-off-by: Daniel Adams <msub2official@gmail.com> * Remove files for fully passing tests Signed-off-by: Daniel Adams <msub2official@gmail.com> * Remove out-of-date expectations from meta legacy layout Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update webgl conformance expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Fix test numbering in expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Make string formatting more consistent in `CodegenRust.py` (#33096)Koki Saito2024-08-181-1047/+927
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix: Replace string concatenation with f-string Signed-off-by: Koki Saito <saitoto828@gmail.com> * fix: Replace substitute method with f-string Signed-off-by: Koki Saito <saitoto828@gmail.com> * fix: Cleanup unused function `onFailureInvalidEnumValue` Signed-off-by: Koki Saito <saitoto828@gmail.com> * fix: Replace %formatting with f-string Signed-off-by: Koki Saito <saitoto828@gmail.com> * fix: Fix some typo Signed-off-by: Koki Saito <saitoto828@gmail.com> * fix: Lint Signed-off-by: Koki Saito <saitoto828@gmail.com> --------- Signed-off-by: Koki Saito <saitoto828@gmail.com> Co-authored-by: kokisaito <kosaito@indeed.com>
* fix: Replace callargs_is_constructing with is_constructing method (#33101)Koki Saito2024-08-184-13/+8
| | | | Signed-off-by: Koki Saito <saitoto828@gmail.com> Co-authored-by: kokisaito <kosaito@indeed.com>
* webxr: Update XRSession to latest spec (#33059)Daniel Adams2024-08-173-2/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add missing XRSession members, initial implementations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement supportedFramerates getter Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement framerate changes, add spec links Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update WPT expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * ./mach fmt Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add missing spec link Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* remove usage of legacy numeric operations in script (#33095)Simon Wülker2024-08-164-11/+8
| | | | | | | These operations are deprecated and might be removed in a future rust version. Clippy is also complaining about them. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Handle failed string conversions in console.log. (#33085)Josh Matthews2024-08-162-0/+4
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Support HTML parser reentrancy (#32820)Josh Matthews2024-08-168-189/+165
| | | | | | | | | | | | | | | | | | | | | * Update parser interface for reentrancy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Remove assertions around invoking scripts with active parser. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Add regression test. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Run test with normal and async html parser. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* layout: Prepare for bidi by guarding all access to `writing-mode` (#33082)Martin Robinson2024-08-1614-88/+129
| | | | | | | | | We want to selectively enable right-to-left writing modes per layout context. This change makes that possible by allowing access to `writing-mode` though an interface that always returns the default horizontal top-to-bottom (implicitly left-to-right) writing mode. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
* Update stylo for latest changes. (#33079)Josh Matthews2024-08-164-13/+13
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* legacy-layout: Fix display list building after WebRender upgrade (#33073)Martin Robinson2024-08-162-27/+94
| | | | | | | | The most recent version of WebRender tracks stacking context offsets in a different way, which broke legacy layout. It's easier just to track the stacking context offset in Servo and apply them to the items manually like we do in non-legacy layout. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Remove lazy static (#33078)Hayashi Mikihiro2024-08-166-17/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove from rand Mutex<OsRng> can be initialized in compile time. Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * remove from layout_2020 Mutex<()> can be initialize in compile time Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * remove from media `IS_MULTIPROCESS` doesn't be used. Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * remove lazy_static from dependencies Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * rewrite suppressed_leaks_for_asan.txt For all of lazy_static was replaced with LazyLock. Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> --------- Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* Ensure parsers initiated from DOMParser always complete. (#33056)Josh Matthews2024-08-151-34/+9
| | | | | | | | | | | | | | | | | * Ensure parsers initiated from DOMParser always complete. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Add test for parseFromString with async parser. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Add expected failure. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Remove many explicit reflow calls (#33067)Josh Matthews2024-08-153-27/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove explicit reflow for iframe content updates. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Remove explicit reflow for timers. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Remove explicit reflow for MouseEvent. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Remove explicit reflow for key events. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Remove explicit reflow for document load. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Remove explicit reflow for iframe load. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Remove unused reflow reasons. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* fix(clippy): Clippy suggestions in components/script/dom/* (#33072)Jose Monagas2024-08-156-15/+16
| | | | Signed-off-by: Jose T. Monagas <josetmonagas@proton.me> Co-authored-by: Jose T. Monagas <josetmonagas@proton.me>
* Replace lazy_static crate with `std::sync::LazyLock` in layout and config ↵Hayashi Mikihiro2024-08-1511-61/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#33065) * replace in layout_thread_2020 Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in layout_thread Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in layout Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in config Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in config_plugins The macro of config_plugins require Send trait bounds Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> --------- Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* Update codegen for GetOpener:inRealms in Bindings.conf (#33062)Taym Haddadi2024-08-153-9/+6
| | | Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Replace the lazy_static crate with `std::sync::LazyLock` in ↵Hayashi Mikihiro2024-08-159-32/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | components/shared (#33060) * replace in pub_domains.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in embedder/resources.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in base/id.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in net/lib.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * remove lazy_static from components/shared Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> --------- Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* Use FontInstanceFlags::SUBPIXEL_POSITION for font instances on Windows (#33045)Cristian Brinza2024-08-151-1/+1
| | | Signed-off-by: crbrz <cristianb@gmail.com>
* ohos/android: Redirect stdout/stderr to `log` sink (#32858)Jonathan Schwender2024-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ohos: redirect stdout/stderr to logging sink Based on the existing android `redirect_stdout_to_logcat` implementation, but using the safe abstractions from `nix` and dumping to the `log` sink, instead of directly writing the log. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * android: Use new shared implementation for logcat redirection. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * servoshell: Register cfg(production) Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Update ports/servoshell/egl/log.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> * Change info! to debug! to match original behavior on android Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> --------- Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* layout: Support `start` and `end` values for flexbox `align-self` (#33032)Martin Robinson2024-08-151-9/+20
| | | | | | | These are similar to `flex-start` and `flex-end`, but in `wrap-reverse` situations, they are the opposite. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* webxr: Update hand input to match latest spec (#32958)Daniel Adams2024-08-146-80/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update IDLs Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update XRHand and XRJointSpace methods/bindings Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement fillJointRadii Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement fillPoses Signed-off-by: Daniel Adams <msub2official@gmail.com> * Formatting Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update test expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Tidy, missing spec link Signed-off-by: Daniel Adams <msub2official@gmail.com> * Remove idlharness expectation files, update hands pref Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update interfaces Signed-off-by: Daniel Adams <msub2official@gmail.com> * XRJointPose interface Signed-off-by: Daniel Adams <msub2official@gmail.com> * XRHand interface Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Remove unused constant from `components/net/fetch/methods.rs` (#33054)Martin Robinson2024-08-141-4/+1
| | | | | This was revealed by the recent switch to `LazyLock`. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Replace lazy_static with std::sync::LazyLock in components/fonts (#33049)Hayashi Mikihiro2024-08-144-23/+19
| | | | | | | | | | | | | | | | | | | | | * replace in shaper.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in android/font_list.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in ohos/font_list.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * remove lazy_lock from components/fonts Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> --------- Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* layout: Initial implementation of `flex-direction: column` and ↵Martin Robinson2024-08-146-281/+322
| | | | | | | | | | | | | | | | | | | | | | `column-reverse` (#33031) This change removes restrictions on using the column layout mode of flexbox and adds an initial implementation of sizing for that flex direction. There's a lot of missing pieces still, but in some cases this does render column flexbox. In particular, there are now two code paths for preferred widths (intrinsic size) calcuation: one in the main axis (row) and one in the cross axis (column) corresponding to the flex direciton with horizontal writing modes. In addition, `FlexItemBox::inline_content_sizes` is removed in favor of making `sizing::outer_inline` / `IndependentFormattingContext::outer_inline_content_sizes` generic enough to handle using a different value for auto minimum sizes, which flexbox needs. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Dont use lazy static to construct mutexes (#33047)Simon Wülker2024-08-142-6/+1
| | | | | | | | | | | | | | | | | | | | | * Remove usage of lazy-static in background_hang_monitor The lazy-static crate was only used to construct a mutex, but since Mutex::new is const this can be done at compiletime instead. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Remove usage of lazy-static in servoshell Lazy-static was only used to construct a mutex, but since Mutex::new is const this can simply be done at compiletime. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>