| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
A new `AddAssign` impl in the standard library made inference ambiguous.
|
|
|
|
|
|
| |
Ignoring :
- **generated**.rs
- python/tidy/servo_tidy_tests/rust_tidy.rs
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `cfg` attribute in use resulted in two match arms for two cases on
`macos`. Since both arms had a main functionality in common, I merged
them and conditions the extra `macos` part.
```
warning: unreachable pattern
-->
/Users/behnam/code/servo/servo/components/script/textinput.rs:696:13
|
696 | (None, Key::Home) => {
| ^^^^^^^^^^^^^^^^^
|
= note: #[warn(unreachable_patterns)] on by default
warning: unreachable pattern
-->
/Users/behnam/code/servo/servo/components/script/textinput.rs:700:13
|
700 | (None, Key::End) => {
| ^^^^^^^^^^^^^^^^
|
= note: #[warn(unreachable_patterns)] on by default
```
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Correct unicode handling for text input
<!-- Please describe your changes on the following line: -->
Allow proprer handling of unicode sequence in text input.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15819
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15822)
<!-- Reviewable:end -->
|
| | |
|
|/ |
|
|
|
|
|
|
| |
Hitting the tab key in an html text input shouldn't submit the form, and
for any text input, the tab key should have a particular action
associated, not the default action. This cleans up #12701.
|
| |
|
| |
|
|
|
|
| |
a single byte.
|
|
|
|
| |
keyboards.
|
| |
|
| |
|
|
|
|
| |
This entirely removes the 'non-geckolib' feature of the util crate.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix delete_char when selection range is empty
An empty selection range should be treated the same as no selection. Fixes browserhtml/browserhtml#930.
r? @jdm
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10182)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| | |
An empty selection range should be treated the same as no selection.
Fixes browserhtml/browserhtml#930.
|
|/
|
|
|
| |
Fixes #9993. This does not yet allow stylesheets to set the selection colors;
instead it uses a hard-coded orange background and white foreground.
|
|
|
|
| |
Adds a wpt test as well.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
servo/servo#7320
servo/servo#7004
|
|
|
|
|
| |
The methods which are currently implemented are the ones on String that are currently being used:
string.push_str(...), string.clear() and string.extend(...). We may want to revisit this API.
|
|
|
|
|
|
| |
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
|
|
|
|
|
|
|
|
|
|
| |
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.
Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.
|
| |
|
| |
|
| |
|
|
|
|
| |
This merges import blocks that were reported by tidy as unmerged.
|
|
|
|
| |
caret in an input element.
|
|
|
|
|
| |
This fixes lines that were reported to have missing
space after a comma.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that JSRef<T> is gone, there is no need to have helper traits.
On components/script/*.rs:
# Remove imports.
/^ *use dom::[a-z]+::\{.*Helpers/ {
s/\{(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers, /\{/
s/, (Raw[^L]|[^L][^a])[a-zA-Z]+Helpers([,}])/\2/g
s/\{([a-zA-Z]+)\}/\1/
/\{\}/d
s/::self;$/;/
}
/^ *use dom::[a-z]+::\{?(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers\}?;$/d
On components/script/dom/*.rs:
# Ignore layout things.
/^(pub )?(impl|trait).*Layout.* \{/,/^}$/ { P; D; }
# Delete helpers traits.
/^(pub )?trait ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? \{$/,/^\}$/D
# Patch private helpers.
/^impl.*Private.*Helpers/,/^\}$/ {
s/^impl<'a> Private([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for &'a ([^ ]+) \{$/impl \3 {/
/^ *(unsafe )?fn .*\(self.*[<&]'a/ {
s/&'a /\&/g
s/<'a, /</g
}
/^ *(unsafe )?fn /s/\(self([,)])/\(\&self\1/
}
# Patch public helpers.
/^impl.*Helpers/,/^\}$/ {
s/^impl(<'a>)? ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for (&'a )?([^ ]+) \{$/impl \5 {/
/^ *(unsafe )?fn .*\(self.*[<&]'a/ {
s/&'a /\&/g
s/<'a, /</g
}
/^ *(unsafe )?fn .*\(&?self[,)]/s/(unsafe )?fn/pub &/
/^ *pub (unsafe )?fn /s/\(self([,)])/\(\&self\1/
}
The few error cases were then fixed by hand.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
StrExt::slice_chars is deprecated and will be removed in Rust. This
lifts the implementation from Rust libstd and puts it in util::str.
This fixes a bunch of deprecation warnings in Servo.
|
| |
|
|
|
|
| |
consistantly (less unwraps) in textinput's selection handling.
|
|
|
|
| |
fixes #6524
|
| |
|
| |
|