| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* script: Make DOMPointReadOnly serializable.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make DOMPoint serializable.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Shrink worker script event.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Update components/script/dom/dompoint.rs
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
| |
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
| |
Signed-off-by: TG <ebiritg@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test(textinput): Add test for backspace at beginning of line in textarea
Introduce a test to reproduce and verify the fix for backspacing at the
beginning of a line in a multiline textarea. This ensures that pressing
Backspace when the cursor is at the start of a line correctly removes the
newline without deleting the entire previous line’s content.
Related to: #27523
Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
* fix(textinput): Preserve selection origin when adjusting vertical position
Fixes an issue where pressing Backspace at the beginning of a line in a
textarea incorrectly deleted the entire previous line's content. This happened
because `self.adjust_vertical(-1, select)` modified `selection_origin` and
`edit_point`, but `selection_origin` was not restored before performing the
horizontal adjustment. As a result, `self.selection_start()` and
`self.selection_end()` were inconsistent, leading to `replace_operation`
erasing the entire line.
Now, we temporarily store `selection_origin` before adjusting vertical
position and restore it afterward to ensure proper cursor and selection
behavior.
Fixes: #27523
Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
---------
Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
| |
Signed-off-by: Lukas Lihotzki <lukas@lihotzki.de>
|
|
|
| |
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
|
|
|
|
|
|
|
|
|
| |
* use read_all_bytes when consuming body
pass realm as argument to dom method
re-structure consume_body into one function
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* enter the realm of the object whose body is being consumed
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
|
|
|
| |
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Servo has a `PseudoElementType` which more or less duplicate's Stylo's
`PseudoElement` with the addition of a non-pseudo element variant. This
type needs to be converted into `PseudoElement` anyway when asking for
the style of an element from Stylo, so eliminate Servo's version and
simply use `Option<PseudoElement>` with the `None` variant meaning the
non-pseudo.
This is preparation for adding support for the `::marker` pseudo
element.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix: wrong ascii check in get_array_index_from_id
Signed-off-by: Michael Rees <mrees@noeontheend.com>
* Update WPT expectations
Signed-off-by: Michael Rees <mrees@noeontheend.com>
---------
Signed-off-by: Michael Rees <mrees@noeontheend.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat: add CanGc argument in get_dictionary_property
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
* feat: add CanGc argument in get_dictionary_property
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
---------
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
|
|
|
|
|
| |
FromJSValConvertible. (#36097)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Upgrade to Stylo e941241
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Make test less fragile
Signed-off-by: Nico Burns <nico@nicoburns.com>
---------
Signed-off-by: Nico Burns <nico@nicoburns.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sizing calculation (#36123)
Sometimes column Flexbox needs to do an early layout pass to determine
the preferred block content size of flex items. Previously the
absolutely positioned children created during this pass were discarded,
but now they are cached to be possibly used during the final layout
phase of the flex item. Since they are not thrown away, it is necessary
that the `PositioningContext` used to collect them is compatible with
their final `PositioningContext`.
Fixes #36121.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Create `update_rendering` in `CanvasState` instead of manually updating in layout
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Mark as dirty and do flushes
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* fixup rebase
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update components/script/dom/htmlcanvaselement.rs
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
| |
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
|
|
|
| |
Signed-off-by: Jason Tsai <git@pews.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces `IndependentLayout` with `CacheableLayoutResult` and
stores it in `LayoutBoxBase` so it can be reused when we need to lay out
a box multiple times.
This is a generalization of the caching that we had for flexbox, which
is now removed in favor of the new one.
With this, the number of runs per second in the Chromium perf test
`flexbox-deeply-nested-column-flow.html` are multiplied by 3.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
| |
Signed-off-by: jerensl <54782057+jerensl@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Serialize html fragments without going through html5ever
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Implement ShadowRoot::GetHtml / Element::GetHtml
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update WPT expectations
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Propagate CanGc annotations
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
| |
Using the RoutedPromiseListener let us define a different
response type for each promise. This removes unreachable branches
that used to exist when they all shared the same WebGPUResponse.
Signed-off-by: webbeef <me@webbeef.org>
|
|
|
|
|
| |
bindings. (#36107)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Spec: https://drafts.csswg.org/css-sizing-3/#funcdef-width-fit-content
It's similar to the `fit-content` keyword but, instead of clamping the
stretch size between `min-content` and `max-content`, it clamps the
provided argument.
So now that we support `fit-content`, it's quite straightforward to add.
It's just not completely clear what should happen when the argument has
a cyclic percentage, so this may need some further adjustments depending
on the outcome of https://github.com/w3c/csswg-drafts/issues/11805
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
another shadow root (#36104)
* Don't remove a declarative shadow hosts children when attaching an imperative shadow root
Instead we should remove all children of the shadowroot.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update WPT expectations
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a clean up after #36062 and #35985. It removes the script
channel for each pipeline from the compositor. Now all messages are sent
via the `Constellation` first, which will allow breaking the dependency
on script in the compositor.
In addition, scroll states are actually sent via the `Constellation`,
which was an oversight from #36062. Finally, a typo in a method name is
fixed.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
| |
This file is dead code and I mistakenly did not remove it in #36088.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes starts tracking the keyboard modifier state in the
`Constellation` and forwards it with every input event. The state
is used to modify the target of link click so when the
platform-dependent alternate action key is enabled, the target is
overriden to "_blank".
In addition, specification step numbers and text is updated.
Signed-off-by: webbeef <me@webbeef.org>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Explicitly reborrow MutableHandles
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
* Unify jsapi_wrappers
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
* Format mozjs changes
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
* Update mozjs version
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
---------
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
|
|
|
|
| |
Signed-off-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com>
Co-authored-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com>
|
|
|
|
| |
Signed-off-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com>
Co-authored-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com>
|
|
|
| |
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The HTML specification states that an input element with the `readonly`
attribute must be barred from constraint validation. Our implementation
previously included an extra check (`does_readonly_apply()`) to verify
if `readonly` applies to the input type, which is unnecessary.
This caused three test failures in:
tests/wpt/meta/html/semantics/forms/constraints/form-validation-willValidate.html.ini
- Removed `does_readonly_apply()` as it is not required for validation.
- Removed `tests/wpt/meta/html/semantics/forms/constraints/form-validation-willValidate.html.ini` since the test now passes.
To update the Web Platform Test expectations, see:
https://book.servo.org/hacking/testing.html#updating-web-platform-test-expectations
Fixes servo/servo#36076
Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change creates a `constellation_traits` crate. Previously messages
to the `Constellation` were in the `compositing_traits` crate, which
came about organically. This change moves these to a new crate which
also contains data types that are used in both compositing/libservo and
script (ie types that cross the process boundary). The idea is similar
to `embedding_traits`, but this is meant for types not exposed to the
API.
This change allows deduplicating `UntrustedNodeAddress`, which
previously had two versions to avoid circular dependencies.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* devtools: extract network related into new file
Signed-off-by: jerensl <54782057+jerensl@users.noreply.github.com>
* devtools: fix missing license and linting error
Signed-off-by: jerensl <54782057+jerensl@users.noreply.github.com>
* fixup! devtools: extract network related into new file
Signed-off-by: jerensl <54782057+jerensl@users.noreply.github.com>
---------
Signed-off-by: jerensl <54782057+jerensl@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simply how `ProgressiveWebMetrics` works:
1. Keep only a single struct instead of one in layout and one script
that both implement the `ProgressiveWebMetrics` trait. Since layout
and script are the same thread these can now just be a single
`ProgressiveWebMetrics` struct stored in script.
2. Have the compositor be responsible for informing the Constellation
(which informs the ScripThread) about paint metrics. This makes
communication flow one way and removes one dependency between the
compositor and script (of two).
3. All units tests are moved into the `metrics` crate itself since there
is only one struct there now.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
| |
This will allow removing the dependency of the compositor on
`script_traits`, which should make our internal dependency chain a lot
easier to deal with.
Part of #35984.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
| |
Signed-off-by: rayguo17 <rayguo17@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat: add can_gc argument to to_frozen_array
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
* fix: linting issues
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
* feat: add can_gc in binding.conf
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
* fix: linting issues
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
---------
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
|
|
|
| |
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
|
|
|
|
|
|
|
|
| |
The static position rect is calculated assuming that the containing
block would be established by the content box of some ancestor, but the
actual containing block is established by the padding box.
So we need to add the padding of that ancestor.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
| |
We were ignoring sizing keywords on the min and max sizing properties.
With this, flexbox layout has full support for sizing keywords.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
| |
Adds support for min-content, max-content, fit-content and stretch on
the min and max main size properties of a flex item.
I'm removing `automatic_min_size()` and `flex_base_size()` because they
would need to share so much code among themselves and their one caller
that it's simpler to just inline the code.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* use `webview_id` as `browser_id`
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
* use correct webview id
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
* fmt
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
* review fix
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
---------
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
|
|
|
|
|
|
|
|
|
| |
Now that Stylo considers `servo` as the default feature, Servo doesn't
need to specify `features = ["servo"]`.
Also use the same crate names as Stylo, rather than renaming them with
`package`.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
| |
`block_size_is_zero_or_intrinsic()` was always returning true for
`stretch`. This function is used for the margin collapse heuristics
in block layout, so we were considering that an empty element with
`height: stretch` would self-collapse.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#35993)
* Add doc comments to boundary point
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Allow querying content box of text fragments
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Implement Range::getBoundingClientRect
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update WPT expectations
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
| |
Signed-off-by: Stephen Muss <stephenmuss@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libservo: Notify delegates of send errors in request objects
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Remove webview error sender for simplicity
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Remove error sender trait, now that there is only one impl
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Address review feedback
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Add unit tests
Signed-off-by: Delan Azabani <dazabani@igalia.com>
---------
Signed-off-by: Delan Azabani <dazabani@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat: fetch notification image resources
Signed-off-by: Jason Tsai <git@pews.dev>
* docs: more specific for `ResourceFetchListener`
Signed-off-by: Jason Tsai <git@pews.dev>
* feat(notification): queue show event
Signed-off-by: Jason Tsai <git@pews.dev>
* chore: set shown step to TODO until we are using the variable
Signed-off-by: Jason Tsai <git@pews.dev>
---------
Signed-off-by: Jason Tsai <git@pews.dev>
|
|
|
|
|
|
|
|
|
|
|
| |
In #35630 I treated an indefinite `stretch` as 0px on min sizing
properties, and as `none` on max sizing properties. However, this was
only for final layout sizes, I forgot about intrinsic contributions.
Blink already modified the relevant test, I'm just reordering it a bit
since we are no longer treating `stretch` as `fit-content`, so it seems
better to test it at the end.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|