aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlinputelement.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduce <LayoutDom<Element>>::focus_stateAnthony Ramine2020-04-011-1/+1
|
* Introduce a bunch of LayoutDom<HTMLInputElement> private helpersAnthony Ramine2020-04-011-30/+31
| | | | Those help contain the unsafety in most of the actual helpers used by layout.
* Introduce <LayoutDom<Element>>::attrs()Anthony Ramine2020-03-311-7/+5
| | | | | | This safe method is the basic block to access element attributes from layout. We reuse it in the other attr-related layout methods to remove a pretty big source of rampant unsafe code between script and layout.
* Merge RawLayoutElementHelpers into LayoutElementHelpersAnthony Ramine2020-03-311-4/+1
|
* Make LayoutHTMLInputElementHelpers::value_for_layout return a cowAnthony Ramine2020-03-311-25/+30
|
* Give a lifetime parameter to LayoutDomAnthony Ramine2020-03-281-2/+5
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+0
|
* Accept only connected attributes for checkbox and radio activation behaviourDmitry Kolupaev2020-03-111-0/+3
|
* Implement step 5.13 for dirname correctlyDmitry Kolupaev2020-02-251-2/+2
|
* Add special case directionality of phone inputDmitry Kolupaev2020-02-251-1/+0
|
* Rearrange directionality algorithm functionsDmitry Kolupaev2020-02-251-26/+8
|
* Move dirname collection to inputDmitry Kolupaev2020-02-251-2/+16
|
* Implement dirname for form submit and directionality for elementDmitry Kolupaev2020-02-251-0/+36
|
* Auto merge of #25488 - pshaughn:clickactivate, r=jdmbors-servo2020-02-131-119/+90
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Event dispatch rewritten to align to spec, activate on clicks better I went over the changes to the event dispatch spec that had accumulated over the past few years, rewriting dispatch/invoke/inner-invoke almost completely and modifying other code where it was relevant. Most of the remaining obvious deviations from spec are things that will only come up when we start handling events in shadow DOM. I am pushing now because I want to see CI test results, but please do not approve this PR just if automated test improvements look good. I may have broken some actual UI interactions in the course of fixing synthetic events, and some manual testing is needed, including checking that manual interactions with interactive content continue to fire the events they're supposed to. --- <!-- 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 #25384 and fix #22783 and fix #25199 <!-- Either: --> - [ ] There are automated tests for the synthetic-click parts of these changes, BUT the effects on real UI events need some manual testing before merging <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Event dispatch rewritten to resemble spec more often, activate on clicks betterPatrick Shaughnessy2020-02-121-119/+90
| |
* | Names should now be consistently atomsPatrick Shaughnessy2020-02-131-5/+7
|/
* SubmitEvent and test changesPatrick Shaughnessy2020-01-301-1/+1
|
* Auto merge of #25490 - teapotd:radio-group-iter, r=Manishearthbors-servo2020-01-231-53/+49
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify and fix iteration over radio button group - Code for iterating over radio button group elements has been extracted to `radio_group_iter` - `in_same_group` now checks if elements are in the same tree - `radio_group_name` returns `None` if name is empty - Radio buttons now group together in orphan trees (#25486) --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #25486 - [ ] There are tests for these changes
| * Simplify and fix iteration over radio button groupteapotd2020-01-111-53/+49
| |
* | Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-1/+2
|/
* stepUp, stepDown, valueAsNumber, valueAsDate, and list work and have testsPatrick Shaughnessy2020-01-101-8/+651
|
* Labels are a live list in tree orderPatrick Shaughnessy2020-01-061-4/+12
|
* Auto merge of #25397 - teapotd:input-cloning-steps, r=jdmbors-servo2020-01-031-1/+21
|\ | | | | | | | | | | | | | | | | | | | | | | Implement HTMLInputElement cloning steps This change adds missing [cloning steps for input elements](https://html.spec.whatwg.org/multipage/#the-input-element%3Aconcept-node-clone-ext). --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #25385 - [X] There are tests for these changes
| * Implement HTMLInputElement cloning stepsteapotd2019-12-261-1/+21
| |
* | Radio button grouping is now case-sensitivePatrick Shaughnessy2019-12-311-2/+1
|/
* hidden field named _charset_ now appears in FormData as UTF-8 to fix #25150Patrick Shaughnessy2019-12-091-9/+28
|
* Auto merge of #24626 - glowe:issue-21810/improve-validation-methods, r=jdmbors-servo2019-12-031-1/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue 21810/improve validation methods <!-- Please describe your changes on the following line: --> This is a start at addressing #21810. I'm putting these changes out early to get some feedback on the following items: 1. I added unit tests for the validation methods mentioned in #21810, because I couldn't tell whether any of the existing WPT tests covered them. Are these tests worthwhile? Are any of them unnecessary? 2. I changed the implementation for `is_valid_floating_point_number_string` so that it passed the tests. The previous version of the function wasn't restrictive enough (it allowed certain whitespace characters before the number string). 3. I changed the catch-all condition in `htmlinputelement.rs` to account for the remaining input types that don't have a value sanitization algorithm. This last change seems good to me since we won't be able to add a new input type without adding it to the case and checking the spec for an algorithm. --- <!-- 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 #21810 <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Remove catch-all case for input sanitizationglowe2019-11-301-1/+10
| | | | | | | | | | | | | | Replaced catch-all with explicit case for inputs that do not have a value sanitization algorithm. This should prevent us from forgetting to implement a sanitization for an input, since they must all be accounted for in the match expression.
* | Use `#![register_tool]` instead of `#![register_attr]`Simon Sapin2019-11-151-1/+1
|/ | | | CC https://github.com/rust-lang/rust/issues/66079
* [WIP] solve #22782takumi2019-10-181-69/+69
| | | | TODO: write tests for my change
* Upgrade to rustc 1.39.0-nightly (f7af19c27 2019-08-15)Simon Sapin2019-08-231-1/+1
|
* Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30)Simon Sapin2019-07-311-5/+7
|
* Add value sanitization algorithm for input[type="email"]ffwff2019-05-291-1/+19
| | | | | | | | | | | | Handle "Multiple" attribute for email value sanitization Fix code formatting Tests for email value sanitization should pass Make failing wpt tests pass Change new_value => sanitized
* ISSUE-20455: introduce stronger types for textinput indexingThomas Delacour2019-05-161-7/+7
|
* Introduce BindContext with in_doc and connected flagsFernando Jiménez Moreno2019-04-261-3/+3
| | | | Fix some is_in_doc -> is_connected mistakes
* Add is_connected flag to node and use it to replace most uses of is_in_docFernando Jiménez Moreno2019-04-261-2/+2
|
* Remove most RootedReference usesAnthony Ramine2019-03-101-21/+20
| | | | We can replace all uses of RootedReference for Option<T> by Option::deref calls.
* Make a bunch of layout queries morally saferAnthony Ramine2019-01-091-4/+2
|
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-17/+18
|
* Update src/href attributes to be a USVStringDan Robertson2018-12-171-2/+2
| | | | | | | | | | | | The following IDLs have the src/href attributes typed as a DOMString while in the spec the attribute has been updated to be a USVString: - HTMLIFrameElement - HTMLImageElement - HTMLInputElement - HTMLLinkElement - HTMLMediaElement - HTMLScriptElement
* Auto merge of #22224 - pyfisch:composition-webdriver, r=noxbors-servo2018-11-201-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forward WebDriver CompositionEvent Dispatch composition events in JS. Insert characters from composition events to text input. CompositionEvents currently can only be created by WebDriver and not by embedders. <!-- Please describe your changes on the following line: --> --- <!-- 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 - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/22224) <!-- Reviewable:end -->
| * Forward WebDriver CompositionEventPyfisch2018-11-191-0/+18
| | | | | | | | | | | | | | | | Dispatch composition events in JS. Insert characters from composition events to text input. CompositionEvents currently can only be created by WebDriver and not by embedders.
* | Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|/
* Unify the task source and task canceller APIAgustin Chiappe Berrini2018-11-141-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I moved away from the `Window` struct all the logic to handle task sources, into a new struct called `TaskManager`. In a happy world, I'd be able to just have there two functions, of the types: ```rust fn task_source<T: TaskSource>(&self, name: TaskSourceName) -> Box<T> fn task_source_with_canceller<T: TaskSource>(&self, name: TaskSourceName) -> (Box<T>, TaskSourceCanceller) ``` And not so much duplicated code. However, because TaskSource can't be a trait object (because it has generic type parameters), that's not possible. Instead, I decided to reduce duplicated logic through macros. For reasons[1], I have to pass both the name of the function with canceller and the name of the function without, as I'm not able to concatenate them in the macro itself. I could probably use `concat_idents` to create both types already defined and reduce the amount of arguments by one, but that macro is nightly only. At the same time, not being able to declare macros inside `impl` forces me to pass `self` as an argument. All this makes this solution more verbose than it would be ideally. It does reduce duplication, but it doesn't reduce the size of the file. [1](https://github.com/rust-lang/rust/issues/29599)
* Remove useless `use crate_name;` imports.Simon Sapin2018-11-081-1/+0
| | | | A `crate_name::foo` path always works in 2018
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-2/+2
|
* Reorder importsPyfisch2018-11-061-7/+13
|
* Format remaining filesPyfisch2018-11-061-5/+10
|
* Sort `use` statementsSimon Sapin2018-11-061-3/+3
|
* `cargo fix --edition`Simon Sapin2018-11-061-37/+37
|