aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlformelement.rs
Commit message (Collapse)AuthorAgeFilesLines
* `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
|
* Use the url crate without its query_encoding featureSimon Sapin2017-10-311-9/+18
|
* Bump bitflags to 1.0 in every servo crateBastien Orivel2017-10-301-4/+4
|
* Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-191-4/+4
| | | | | | failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE Backs out https://github.com/servo/servo/pull/18809
* Update bitflags to 1.0 in every servo crateBastien Orivel2017-10-191-4/+4
| | | | | It still needs dependencies update to remove all the other bitflags versions.
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Fix commonmark Markdown warnings in docs, part 1Matt Brubeck2017-10-171-4/+4
| | | | | | | | Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is passed to rustdoc. This is mostly a global find-and-replace for bare URIs on lines by themselves in doc comments.
* Remove use of unstable box syntax.Simon Sapin2017-10-161-2/+2
| | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* Fix the form action IDL attributesAnthony Ramine2017-10-111-1/+1
| | | | | The returned string, if the attribute is present and non-empty, should be a URL resolved against the element's document's base URL.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-22/+22
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-3/+3
| | | | | | | | I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
* Rename OnceCellJS<T> to DomOnceCell<T>Anthony Ramine2017-09-261-2/+2
| | | | Like DOMRefCell<T>.
* Rename JS<T> to Dom<T>Anthony Ramine2017-09-261-2/+2
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Auto merge of #18059 - sendilkumarn:mito, r=noxbors-servo2017-09-211-11/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using OnceCell<T> from Mitochondria <!-- 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 - [x] These changes fix #13402 (github issue number if applicable). <!-- 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/18059) <!-- Reviewable:end -->
| * moving to oncecellsendilkumarn2017-09-091-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding oncecell for JS references removing option<JS<T>> to <JS<T>> changing return types removing get method and refactoring the function changing getElements method lint fixes moving to default simplifying return ordering Removing elements linting
* | Introduce TaskOnceAnthony Ramine2017-09-201-1/+1
| | | | | | | | | | Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing from CancellableTask<T>.
* | Use task! for form planned navigations.Anthony Ramine2017-09-181-34/+19
| |
* | Move Task to its own moduleAnthony Ramine2017-09-181-1/+2
| |
* | Rename Runnable to TaskAnthony Ramine2017-09-161-5/+5
|/ | | | | | | | | | | | The changes are: * `*Runnable` -> `*Task`; * `RunnableMsg` -> `Task`; * `RunnableWrapper` -> `TaskCanceller`; * `MainThreadRunnable` -> `MainThreadTask`; * `wrap_runnable` -> `wrap_task`; * `get_runnable_wrapper` -> `task_canceller`; * `handler` -> `run`; * `main_thread_handler` -> `run_with_script_thread`.
* move name implementation as default implementation to the trait and remove ↵toidiu2017-09-031-2/+0
| | | | overrides.
* order derivable traits listsClément DAVID2017-08-231-9/+9
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Make non-initial about:blank loads asynchronousConnor Brewster2017-05-121-1/+1
| | | | | | | | | | | | | | | Don't update iframe pipeline until load completes To preserve the previous functionality of delaying load events when a new navigation is triggered, pending pipeline id represents the current pending load. The load event is only fired if the load message's pipeline id matches the pending pipeline id. Track frame size on Frame instead of Pipeline Disabled matchMedia test Track creator pipeline id
* Solving merge conficts related to the html5ever_atoms -> html5ever changeChristian Poveda2017-05-031-1/+1
|\
| * Upgrade to html5ever 0.16Simon Sapin2017-05-021-1/+1
| |
* | Changed all prefixes from DOMString to the atomic Prefix from html5everChristian Poveda2017-05-031-3/+3
|/
* Remove some useless Option<T> wrappers from ServoUrl methodsAnthony Ramine2017-03-261-13/+12
|
* Implement the form owner conceptMukilan Thiyagarajan2017-03-151-39/+231
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* An in-memory RNG that shares its file descriptor.Alan Jeffrey2017-01-051-1/+1
|
* Remove and allow some dead code.Ms2ger2016-12-221-4/+2
|
* Remove HeapGCValueAnthony Ramine2016-12-121-2/+2
| | | | | | It could be used to have mutable JSVal fields without GC barriers. With the removal of that trait, MutHeap and MutNullableHeap can respectively be replaced by MutJS and MutNullableJS.
* Rename `Reflectable` to `DomObject`.Corey Farwell2016-12-081-2/+2
| | | | Fixes https://github.com/servo/servo/issues/8473.
* Auto merge of #13969 - bbansalWolfPack:master, r=jdmbors-servo2016-11-251-7/+38
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | html form validation initial steps with test html file <!-- Please describe your changes on the following line: --> Added code for initial steps in html form validation. 1. Added methods for trait validatable 2. implemented stub methods for elements like HTMLInputElement, HTMLButtonElement, etc <!-- 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 _____ <!-- 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/13969) <!-- Reviewable:end -->
| * html form validation initial steps with test html file, added stub methods, ↵Bhavya Bansal2016-11-231-7/+38
| | | | | | | | added code to handle validations
* | Remove redundant url clonesPu Xingyu2016-11-181-1/+1
| | | | | | | | | | They are now redundant since now document.url() returns a struct rather than a reference.
* | Urlmageddon: Use refcounted urls more often.Emilio Cobos Álvarez2016-11-171-10/+14
| |
* | Migrate `EventTarget` event firing functions to use `Atom`s.Corey Farwell2016-11-031-4/+4
| | | | | | | | This allows us to utilize more `atom` macros.
* | Remove "fire a simple event" concept, refactor event firing API.Corey Farwell2016-11-031-11/+4
| | | | | | | | | | "fire a simple event" concept was removed in https://github.com/whatwg/html/pull/1933.