aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlselectelement.rs
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #14085 - frewsxcv:list-of-options, r=asajeffreybors-servo2016-12-131-20/+45
|\ | | | | | | | | | | | | | | | | | | | | | | Implement "list of options" concept on `HTMLSelectElement`. Fixes #13763. <!-- 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/14085) <!-- Reviewable:end -->
| * Implement "list of options" concept on `HTMLSelectElement`.Corey Farwell2016-12-011-20/+45
| | | | | | | | Fixes https://github.com/servo/servo/issues/13763.
* | 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.
* Auto merge of #13969 - bbansalWolfPack:master, r=jdmbors-servo2016-11-251-2/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+11
| | | | | | | | added code to handle validations
* | Update to string-cache 0.3Simon Sapin2016-11-031-6/+6
|/
* Implement `selectedIndex` property on `<select>`.Corey Farwell2016-10-241-0/+30
|
* Implement "reset algorithm" for `<select>`.Corey Farwell2016-10-191-0/+10
|
* Implement `value` property on `<select>`.Corey Farwell2016-10-161-0/+31
|
* Remove intrinsic Root::r()Anthony Ramine2016-10-111-6/+6
|
* implement HTMLOptionsCollection and add related items to HTMLSelectElementAlexandrov Sergey2016-09-261-34/+64
|
* Implement indexed access on select elementsMaciej Skrzypkowski2016-09-221-1/+46
| | | refs #11763
* Most of the code refactoring needed to be done is done with this commit.Arthur Marble2016-09-181-4/+4
|
* Inline DOM element creation into box expressions in components/script/dom/Kuba Birecki2016-07-141-2/+3
|
* Stop re-exporting AttrValue.Ms2ger2016-06-071-1/+2
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-2/+2
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Support form submission of multipart/form-dataPrabhjyot Singh Sodhi2016-04-301-2/+2
|
* Remove `get_*` on getters as per RFC 0344.Corey Farwell2016-04-101-2/+2
| | | | | | https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis https://github.com/servo/servo/issues/6224
* Implement initial pieces of form validation.Sagar Muchhal2016-03-241-1/+4
|
* Update rust-selectorsEmilio Cobos Álvarez2016-02-031-1/+1
| | | | | This commits updates rust-selectors to use the generic parser, and as such it moves the element state into the style crate.
* form submission for <textarea> and <select>Nicolas2015-12-301-1/+18
| | | | | | small changes from code review !child.get_disabled_state() becomes child.get_enabled_state()
* Introduce UnbindContextAnthony Ramine2015-12-131-5/+3
| | | | | This holds the context that describes the original node that was removed from a tree when unbinding from a tree.
* Remove unnecessary conversion to/from DOMString for localName.Eli Friedman2015-12-021-2/+2
|
* Compute attribute name atoms at compile-time.Eli Friedman2015-11-271-3/+3
|
* Update string_cache to 0.2.Alan Jeffrey2015-11-251-1/+1
| | | | | | | | | | | Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock. Removed references to string_cache_plugin. Import atom! and ns! from string_cache. Replaced ns!("") by ns!(). Replaced ns!(XML) and co by ns!(xml) and co. Replaced atom!(foo) by atom!("foo"). Replaced Atom::from_slice by Atom::from. Replaced atom.as_slice() by &*atom.
* Replaced DOMString constructor by conversion functions.Alan Jeffrey2015-11-121-3/+2
| | | | | | Replaced DOMString(...) by DOMString::from(...). Replaced ....0 by String::from(...). Removed any uses of .to_owner() in DOMString::from("...").
* Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-4/+4
| | | | | | | | | | 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.
* Get rid of a bunch of explicit derefsDavid Zbarsky2015-11-031-1/+1
|
* merge from masterrohan.prinja2015-11-031-3/+10
|\
| * Implement 'labels' attribute on 'labelable elements'Corey Farwell2015-11-011-0/+6
| |
| * Move EventState to rust-selectors.Bobby Holley2015-10-301-1/+2
| |
| * Fix some rust-clippy violationsCorey Farwell2015-10-301-2/+2
| |
* | move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+1
|/
* Add fixes based on review.Dongie Agnir2015-10-271-7/+6
| | | | | | - Use if let instead of match for Option - Refactor common code into pick_if_selected_and_reset
* Add fixes based on review.Dongie Agnir2015-10-271-1/+2
| | | | | | | | - Whitespace and indentation issues - call as_for_reset on option insert - add link to 'pick' in standard
* Replace if-else with match.Dongie Agnir2015-10-241-8/+7
|
* Implement pick_option.Dongie Agnir2015-10-231-9/+21
|
* Implement ask_for_reset for HTMLSelectElement.Dongie Agnir2015-10-231-0/+49
| | | | Fixes #7774
* Clean up the cast callsAnthony Ramine2015-10-211-4/+2
|
* Introduce trait CastableAnthony Ramine2015-10-211-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This trait is used to hold onto the downcast and upcast functions of all castable IDL interfaces. A castable IDL interface is one which either derives from or is derived by other interfaces. The deriving relation is represented by implementations of marker trait DerivedFrom<T: Castable> generated in InheritTypes. /^[ ]*use dom::bindings::codegen::InheritTypes::.*(Base|Cast|Derived)/ { /::[a-zA-Z]+(Base|Cast|Derived);/d s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g /\{([a-zA-Z]+(Base|Cast|Derived))?\};$/d s/\{([a-zA-Z_]+)\};$/\1;/ } s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.upcast::<\1>()/g s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.upcast::<\1>()/g s/\(([a-zA-Z]+)Cast::from_ref\)/\(Castable::upcast::<\1>\)/g s/([a-zA-Z]+)Cast::from_root/Root::upcast::<\1>/g s/([a-zA-Z]+)Cast::from_layout_js\(\&([a-zA-Z_.]+)\)/\2.upcast::<\1>()/g s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.downcast::<\1>()/g s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.downcast::<\1>()/g s/\(([a-zA-Z]+)Cast::to_ref\)/\(Castable::downcast::<\1>\)/g s/([a-zA-Z]+)Cast::to_root/Root::downcast::<\1>/g s/([a-zA-Z]+)Cast::to_layout_js\(&?([a-zA-Z_.]+(\(\))?)\)/\2.downcast::<\1>()/g s/\.is_document\(\)/.is::<Document>()/g s/\.is_htmlanchorelement\(\)/.is::<HTMLAnchorElement>()/g s/\.is_htmlappletelement\(\)/.is::<HTMLAppletElement>()/g s/\.is_htmlareaelement\(\)/.is::<HTMLAreaElement>()/g s/\.is_htmlbodyelement\(\)/.is::<HTMLBodyElement>()/g s/\.is_htmlembedelement\(\)/.is::<HTMLEmbedElement>()/g s/\.is_htmlfieldsetelement\(\)/.is::<HTMLFieldSetElement>()/g s/\.is_htmlformelement\(\)/.is::<HTMLFormElement>()/g s/\.is_htmlframesetelement\(\)/.is::<HTMLFrameSetElement>()/g s/\.is_htmlhtmlelement\(\)/.is::<HTMLHtmlElement>()/g s/\.is_htmlimageelement\(\)/.is::<HTMLImageElement>()/g s/\.is_htmllegendelement\(\)/.is::<HTMLLegendElement>()/g s/\.is_htmloptgroupelement\(\)/.is::<HTMLOptGroupElement>()/g s/\.is_htmloptionelement\(\)/.is::<HTMLOptionElement>()/g s/\.is_htmlscriptelement\(\)/.is::<HTMLScriptElement>()/g s/\.is_htmltabledatacellelement\(\)/.is::<HTMLTableDataCellElement>()/g s/\.is_htmltableheadercellelement\(\)/.is::<HTMLTableHeaderCellElement>()/g s/\.is_htmltablerowelement\(\)/.is::<HTMLTableRowElement>()/g s/\.is_htmltablesectionelement\(\)/.is::<HTMLTableSectionElement>()/g s/\.is_htmltitleelement\(\)/.is::<HTMLTitleElement>()/g
* Remove explicit lifetimes which can be elided.Adam Szopa2015-10-211-1/+1
|
* Move Event States to |Element|.Bobby Holley2015-10-161-14/+15
| | | | | | Conceptually they belong there, rather than on |Node|. Fixes #7934.
* Explicitly customise flags of new nodes where neededAnthony Ramine2015-10-151-4/+4
| | | | | | | Given codegen now generates the various TypeId enums, it seems pointless to still have to write their respective values in every DOM struct inheriting from Node just to set the initial IS_IN_DOC flag in Document and IN_ENABLED_STATE in form controls.
* Generate all Derived implementations in codegenAnthony Ramine2015-10-141-12/+1
|
* Generate the TypeId enums in codegenAnthony Ramine2015-10-141-5/+7
|
* Explicitly place '/' before fragment for multipage spec linksCorey Farwell2015-10-101-3/+3
| | | | | This prevents us from 301 redirecting, which could cause the fragment to get lost
* Replace usage of old-style WHATWG spec linksCorey Farwell2015-10-101-2/+2
|
* Refactor FormControl traitPhilipp Hartwig2015-09-301-7/+3
| | | | | The trait is now implemented for HTMLFooElement instead of &HTMLFooElement and does no longer require an impl body.
* Add form getters for additional elements; update test expectationsPhilipp Hartwig2015-09-271-2/+14
| | | | | This adds form getters for fieldset, label, object, output, select and textarea elements.
* changing test_union.html to union.html fixes #7744Jayflux2015-09-271-1/+1
|