Commit graph

291 commits

Author SHA1 Message Date
John Poge II
5f2c6c09cd
Implement :valid :invalid pseudo classes (#26729)
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2023-07-21 10:42:03 +00:00
Josh Matthews
dbff26bce0 Support arbitrary protos when wrapping DOM objects with constructors. 2023-05-28 23:23:12 -04:00
Yutaro Ohno
f7449da485 Remove unnecessary steps from "multipart/form-data encoding algorithm"
The specifications for the "multipart/form-data encoding algorithm" has
changed [1], and the "_charset_" is not now handled here.

Remove no longer necessary steps from the "multipart/form-data encoding
algorithm".

Similar to the "text/plain encoding algorithm" case fixed by f0818aa3
(Remove unnecessary steps from "text/plain encoding algorithm").

[1]: https://github.com/whatwg/html/pull/3645

Signed-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com>
2023-04-07 00:43:00 +09:00
Yutaro Ohno
f0818aa383 Remove unnecessary steps from "text/plain encoding algorithm"
For "text/plain encoding algorithm", the specification [1] has changed
[2] and "_charset_" is not now handled here. It's supposed to be handled
in "construct the form data set" algorithm, and we've already
implemented that [3]. So we now have extra steps for "text/plain
encoding" algorithm.

Remove no longer necessary steps from text/plain encoding algorithm so
that it meets the specification.

[1]: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#text/plain-encoding-algorithm
[2]: https://github.com/whatwg/html/pull/3645
[3]: https://github.com/servo/servo/pull/25217

Signed-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com>
2023-04-05 20:02:31 +09:00
Naveen Gattu
a48a111cee Upgrade Hyper 2022-01-16 09:34:17 -08:00
Jonathan Kingston
0e1479cc84 Add creation url and Secure Contexts 2020-11-25 18:30:50 +00:00
Vincent Ricard
fa57ba5ca9 Make hidden input _charset_ check case insensitive 2020-10-09 18:05:52 +02:00
Vincent Ricard
2a4dd894de Implement DOMTokenList.supports API 2020-10-05 09:26:36 +02:00
bors-servo
b83433fb14
Auto merge of #27299 - avr1254:master, r=jdm
Implemented get element target algorithm

Added check for area and anchor element

Finished issue: Implemented get target and no opener algorithm

Implemented get element target and get element noopener algorithms.

<!-- Please describe your changes on the following line: -->
Used the algorithms in html spec to implement target and no opener algorithms.

---
<!-- 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 #27253 (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. -->
2020-07-24 17:30:38 -04:00
Arjun Ramachandrula
2d5c30d042 Implemented get element target and get element noopener algorithms
and refactored into functions.
2020-07-24 16:50:46 -04:00
Arjun Ramachandrula
00f69dd50f Ported Rel, SetRel, and RelList from HTMLAnchorElement into HTMLForElement
Updated tests to reflect rel and relList in HTMLFormElement

Added AttrValue as style

Added attr

Updated outstanding test cases

Fixed formatting. Hopefully this time works

Implemented HTMLFormElement.relList
2020-07-14 12:37:57 -04:00
Maxim Tsoy
7fd903c214 Remove invalid event on a form element 2020-07-05 00:12:08 +02:00
Maxim Tsoy
8194da2752 Implement HTMLFormElement.requestSubmit()Also includes a fix for reentrant form submission behavior 2020-07-02 12:33:21 +02:00
Matthias Deiml
47355766ed Fix invalid use of ReferrerUrl 2020-06-17 19:07:15 +02:00
Matthias Deiml
fa18cf620f Make url for "client" referrer mandatory 2020-06-17 19:07:14 +02:00
Gregory Terzian
bd5796c90b integrate readablestream with fetch and blob 2020-06-04 11:38:35 +08:00
teapotd
779552ee7d Form constraints validation 2020-04-02 10:16:46 +02:00
YUAN LYU
3ea6d87bcc
Add trait DomObjectWrap to provide WRAP function 2020-03-20 22:16:56 -04:00
Dmitry Kolupaev
25c5a4c045 Use map_or and fix manifest 2020-02-25 01:18:21 +03:00
Dmitry Kolupaev
ab2aeb6d97 Implement step 5.13 for dirname correctly 2020-02-25 01:18:21 +03:00
Dmitry Kolupaev
edb940e613 Remove recursiveness from directionality search 2020-02-25 01:18:21 +03:00
Dmitry Kolupaev
7d6d1c09cb Rearrange directionality algorithm functions 2020-02-25 01:18:20 +03:00
Dmitry Kolupaev
cb34e5c887 Move dirname collection to input 2020-02-25 01:18:20 +03:00
Dmitry Kolupaev
ef49f2e0eb Implement dirname for form submit and directionality for element 2020-02-25 01:18:20 +03:00
Patrick Shaughnessy
f29e22f131 Names should now be consistently atoms 2020-02-13 11:21:46 -05:00
Patrick Shaughnessy
9cc218d0b0 SubmitEvent and test changes 2020-01-30 17:37:33 -05:00
Kunal Mohan
f7db4b7f80
Modify script to prevent further violations of snake_case 2020-01-18 14:22:15 +05:30
Patrick Shaughnessy
d59aed606d RadioNodeList now reflects changes to the parent, but has room for performance optimization 2020-01-10 19:09:38 -05:00
bors-servo
ed56927faf
Auto merge of #25456 - pshaughn:pastnamesexpire, r=jdm
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. -->
2020-01-08 16:02:44 -05:00
Patrick Shaughnessy
9ff6717992 Past names expire when form owner is reset 2020-01-07 11:57:52 -05:00
Patrick Shaughnessy
a322c6079b Now passing output tests as well as anyone 2020-01-06 15:28:55 -05:00
bors-servo
d205194618
Auto merge of #25070 - cagandhi:named-form-getter, r=jdm
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](f63b404e0c/components/script/dom/webidls/HTMLFormElement.webidl (L30)) from HTMLFormElement.webidl
* add the missing `NamedGetter` and `SupportedPropertyNames` methods to [HTMLFormElement](f63b404e0c/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)
2019-12-16 18:10:12 -05:00
Anshul Jethvani
254bbc3b8c removed duplicate entries from sourcedNamesVec for step 7 of SupportedPropertyNames 2019-12-16 01:41:59 -05:00
Patrick Shaughnessy
7f41b1b294 hidden field named _charset_ now appears in FormData as UTF-8 to fix #25150 2019-12-09 12:45:14 -05:00
Anshul Jethvani
4682d9231d sorting done for Step 6 of SupportedPropertyNames 2019-12-07 21:03:28 -05:00
Anshul Jethvani
a935e00e21 sorting partially done for Step 6 of SupportedPropertyNames 2019-12-06 23:48:06 -05:00
Anshul Jethvani
575f7f5670 partially implemented SupportedPropertyNames 2019-12-06 19:52:10 -05:00
Anshul Jethvani
159194b0f9 run tidy check and added comments 2019-12-06 01:24:52 -05:00
Anshul Jethvani
16b9efc406 updated past_names_map to save time info 2019-12-06 00:40:43 -05:00
Anshul Jethvani
7b968a3ca8 NamedGetter completed and fixed issues 2019-12-05 19:50:10 -05:00
Anshul Jethvani
50fdae7a8c implemented NamedGetter and other suggestions 2019-12-05 14:43:29 -05:00
hkshah6
5e67dbda54 Fixed is_listed_element() call and DomRoot child reference 2019-12-04 18:44:57 -05:00
jaymodi98
2ee6150990 Removed tidy-test errors 2019-12-03 18:31:16 -05:00
Chintan Gandhi
2108a85764 created sourced names w/o past names map part 2019-12-03 16:12:51 -05:00
glowe
3d322f96e3 Add CRLF to encoded multipart form data
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.
2019-11-29 17:29:39 -05:00
Simon Sapin
9392180007 Update to url 2.0 2019-08-17 10:03:44 +02:00
Simon Sapin
c38c964f1b Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30) 2019-07-31 13:34:01 +02:00
bors-servo
2dfbbd0ca2
Auto merge of #23368 - gterzian:clean_up_navigation, r=asajeffrey
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 -->
2019-07-18 14:22:03 -04:00
Gregory Terzian
571beec179 clean-up navigation
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
2019-07-18 12:03:45 +08:00
Josh Matthews
b1510d9ad5 Upgrade headers, headers-core, and hyper_serde. 2019-06-13 11:08:16 -04:00