aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlformelement.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Move dirname collection to inputDmitry Kolupaev2020-02-251-17/+0
|
* Implement dirname for form submit and directionality for elementDmitry Kolupaev2020-02-251-2/+16
|
* Names should now be consistently atomsPatrick Shaughnessy2020-02-131-55/+37
|
* SubmitEvent and test changesPatrick Shaughnessy2020-01-301-3/+23
|
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-0/+1
|
* RadioNodeList now reflects changes to the parent, but has room for ↵Patrick Shaughnessy2020-01-101-38/+80
| | | | performance optimization
* Auto merge of #25456 - pshaughn:pastnamesexpire, r=jdmbors-servo2020-01-081-0/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Past names expire when form owner is reset <!-- Please describe your changes on the following line: --> On their way out of form.controls, elements now also leave form.past_names_map, passing one WPT test. We're already scanning linearly through form.controls linearly to get the index of the control there, so additionally scanning through the past names map by value shouldn't raise any particular performance concern. --- <!-- 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 #25429 <!-- 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. -->
| * Past names expire when form owner is resetPatrick Shaughnessy2020-01-071-0/+7
| |
* | Now passing output tests as well as anyonePatrick Shaughnessy2020-01-061-1/+1
|/
* Auto merge of #25070 - cagandhi:named-form-getter, r=jdmbors-servo2019-12-161-0/+222
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Named form getter This PR contains changes related to adding named getter in Servo for getting the list of all meaningful property names for a HTMLFormElement object, and getting the value of a specific property name. The following changes have been made: * uncomment the [named getter](https://github.com/servo/servo/blob/f63b404e0cbf30380c4043700861110d06e548bb/components/script/dom/webidls/HTMLFormElement.webidl#L30) from HTMLFormElement.webidl * add the missing `NamedGetter` and `SupportedPropertyNames` methods to [HTMLFormElement](https://github.com/servo/servo/blob/f63b404e0cbf30380c4043700861110d06e548bb/components/script/dom/htmlformelement.rs#L113) * implement `SupportedPropertyNames` according to [the specification](https://html.spec.whatwg.org/multipage/forms.html#the-form-element:supported-property-names): * create an enum to represent the `id`, `name`, and `past` states for the sourced names * create a vector of `(SourcedName, DomRoot<HTMLElement>)` by iterating over `self.controls` and checking the element type and calling methods like `HTMLElement::is_listed_element` --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #16479 (GitHub issue number if applicable)
| * removed duplicate entries from sourcedNamesVec for step 7 of ↵Anshul Jethvani2019-12-161-7/+12
| | | | | | | | SupportedPropertyNames
| * sorting done for Step 6 of SupportedPropertyNamesAnshul Jethvani2019-12-071-12/+28
| |
| * sorting partially done for Step 6 of SupportedPropertyNamesAnshul Jethvani2019-12-061-4/+31
| |
| * partially implemented SupportedPropertyNamesAnshul Jethvani2019-12-061-2/+26
| |
| * run tidy check and added commentsAnshul Jethvani2019-12-061-22/+18
| |
| * updated past_names_map to save time infoAnshul Jethvani2019-12-061-4/+6
| |
| * NamedGetter completed and fixed issuesAnshul Jethvani2019-12-051-33/+15
| |
| * implemented NamedGetter and other suggestionsAnshul Jethvani2019-12-051-3/+85
| |
| * Fixed is_listed_element() call and DomRoot child referencehkshah62019-12-041-5/+5
| |
| * Removed tidy-test errorsjaymodi982019-12-031-14/+27
| |
| * created sourced names w/o past names map partChintan Gandhi2019-12-031-0/+75
| |
* | hidden field named _charset_ now appears in FormData as UTF-8 to fix #25150Patrick Shaughnessy2019-12-091-5/+15
| |
* | Add CRLF to encoded multipart form dataglowe2019-11-291-1/+1
|/ | | | | | Some WPT tests were failing because they expected the body for a multipart form data response to end with a CRLF. So I updated encode_multipart_form_data to add the missing terminator.
* Update to url 2.0Simon Sapin2019-08-171-21/+21
|
* Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30)Simon Sapin2019-07-311-1/+1
|
* Auto merge of #23368 - gterzian:clean_up_navigation, r=asajeffreybors-servo2019-07-181-10/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean-up navigation <!-- Please describe your changes on the following line: --> 1. Navigation as a result of following a hyperlink should be done in a task: https://html.spec.whatwg.org/multipage/links.html#following-hyperlinks:dom-manipulation-task-source 2. The javascript url navigation should also be done in a task: https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigating-across-documents:dom-manipulation-task-source 3. In `window.load_url`, it seems there is no need to send a message to the script-thread(the entirety of `load_url` should instead be done in a task when appropriate), so we can just do that last part "sync" by calling a method on the script, which will send a message to the constellation(for the parallel navigation steps), or queue task(for the JS navigation), as appropriate. 4. Separate the "normal" navigation flow from the handling of "navigate an iframe" message from constellation, since doing everything in one method as was previously done with `handle_navigate`, is confusing. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./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/23368) <!-- Reviewable:end -->
| * clean-up navigationGregory Terzian2019-07-181-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | security: check target and source origin before executing JS url implement replacement-enabled flag as a HistoryEntryReplacement enum add source origin string on loaddata add LoadOrigin iframe: remove optional load-data auxiliaries: add load-data into info constellation: remove url from Pipeline::new check load origin: link to whatwg issue switch loadorigin toplevel to constellation
* | Upgrade headers, headers-core, and hyper_serde.Josh Matthews2019-06-131-2/+1
|/
* Introduce ShadowIncluding enum for tree traversalsFernando Jiménez Moreno2019-04-261-2/+3
|
* Implement concept of shadow including tree orderFernando Jiménez Moreno2019-04-261-1/+1
|
* Add is_connected flag to node and use it to replace most uses of is_in_docFernando Jiménez Moreno2019-04-261-1/+1
|
* set referrer in window.load_urlRussell Cousineau2019-04-191-1/+2
| | | | | | | | - this conforms to follow-hyperlinks spec step 13 - this conforms to window-open spec step 14.3 - replace uses of `referrer_url` with `referrer` - in Request class, change "no-referrer" to "" - set websocket fetch referrer to "no-referrer"
* Remove most RootedReference usesAnthony Ramine2019-03-101-8/+7
| | | | We can replace all uses of RootedReference for Option<T> by Option::deref calls.
* Implement cannot navigateCYBAI2019-01-231-2/+14
|
* Implement formdata eventCYBAI2019-01-231-21/+65
|
* Don't alter query string when submitting form by POST.Josh Matthews2018-12-171-2/+3
|
* 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-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-14/+14
|
* Reorder importsPyfisch2018-11-061-2/+2
|
* Format remaining filesPyfisch2018-11-061-15/+46
|
* Sort `use` statementsSimon Sapin2018-11-061-2/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-42/+42
|
* Update hyper to 0.12Bastien Orivel2018-11-011-43/+28
|
* Format script componentchansuke2018-09-191-290/+378
|
* implement window.open, create auxiliary browsing contextGregory Terzian2018-08-111-17/+38
|
* Revert "Correct default Selectionstart and SelectionEnd"paavininanda2018-02-231-1/+1
| | | | This reverts commit b2c1f89b932a72f9e0110c17adde33647e84c902.
* Correct default Selectionstart and SelectionEndpaavininanda2018-02-101-1/+1
|
* Expand InputType to cover all possible typesJon Leighton2017-12-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This came out of a conversation with nox in IRC: https://mozilla.logbot.info/servo/20171201#c13946454-c13946594 The code I was working on which motivated this change is here: https://github.com/servo/servo/pull/19461 Previously, InputType::Text was used to represent several different values of the type attribute on an input element. If an input element doesn't have a type attribute, or its type attribute doesn't contain a recognised value, then the input's type defaults to "text". Before this change, there were a number of checks in the code which directly looked at the type attribute. If those checks matched against the value "text", then they were potentially buggy, since an input with type=invalid should also behave like an input with type=text. Rather than have every conditional which cares about the input type also have to deal with invalid input types, we can convert the type attribute to an InputType enum once, and then match against the enum. A secondary benefit is that the compiler can tell us whether we've missed branches in a match expression. While working on this I discovered that the HTMLInputElement::value_mode() method misses a case for inputs with type=hidden (this resulted in a failing WPT test passing). I've also implemented the Default trait for InputType, so we now only have one place in the code which knows that InputType::Text is the default, where previously there were several.
* Replace rust-encoding with encoding-rsSimon Sapin2017-11-011-17/+12
|