aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlbuttonelement.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* This commit refactors altKey to alt_key when possible.Arthur Marble2016-09-171-2/+2
|
* This commit refactors shiftKey to shift_key where possible.Arthur Marble2016-09-171-2/+2
|
* This commit refactors ctrlKey to ctrl_key wherever possible.Arthur Marble2016-09-171-2/+2
|
* Reorder `use` statementsUK9922016-09-091-1/+1
|
* Inline DOM element creation into box expressions in components/script/dom/Kuba Birecki2016-07-141-2/+3
|
* delete suffixesRafael Quintero2016-06-041-2/+2
| | | | | | | | delete suffixes for variants SubmittedFrom, ResetFrom delete suffixes for variants SubmittedFrom, ResetFrom
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Include <button type=submit> data whilst constructing the form datasetManish Goregaokar2016-05-231-2/+36
|
* Removed unused importsPer Lundberg2016-05-151-1/+0
| | | | This fixes #11185.
* Remove `get_*` on getters as per RFC 0344.Corey Farwell2016-04-101-1/+1
| | | | | | 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
|
* Call synthetic_click_activation for all clicksRebecca2016-03-101-2/+7
| | | | | | | Moved synthetic_click_actiavtion out of Activatable trait so it can be called by all elements (not just activatable). Calls appropriately from click. Also updates the isdisabled check in click to check for all types of elements
* 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.
* Implement support for modifying the type attribute of button elements. Fixes ↵Josh Matthews2015-12-301-2/+16
| | | | #9091.
* Make button elements activatable. Fixes #4837. Fixes #8101.Josh Matthews2015-12-291-9/+16
|
* Auto merge of #8506 - nox:finish-ranges, r=dzbarskybors-servo2015-12-261-5/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Properly propagate changes when range or trees are mutated Does the same thing as #6817, but storing Range instances directly in their start and end containers. Cc @dzbarsky <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8506) <!-- Reviewable:end -->
| * 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.
* | Implement basic framework for static and interactive validation on formsKeith Yeung2015-12-151-0/+6
|/
* Remove unnecessary conversion to/from DOMString for localName.Eli Friedman2015-12-021-2/+3
|
* Compute attribute name atoms at compile-time.Eli Friedman2015-11-271-9/+11
|
* 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-2/+1
| | | | | | 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-1/+1
| | | | | | | | | | 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-4/+4
|
* merge from masterrohan.prinja2015-11-031-10/+9
|\
| * Auto merge of #8245 - eefriedman:misc-attribute-fixes, r=noxbors-servo2015-11-021-9/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Use attribute getter/setter macros for misc DOM attributes. This fixes a few minor bugs. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8245) <!-- Reviewable:end -->
| | * Use attribute getter/setter macros for misc DOM attributes.Eli Friedman2015-11-011-9/+1
| | | | | | | | | | | | | | | | | | This fixes a few minor bugs. Also adds some better testing for "unsigned long" attributes.
| * | Implement 'labels' attribute on 'labelable elements'Corey Farwell2015-11-011-0/+6
| | |
| * | Move EventState to rust-selectors.Bobby Holley2015-10-301-1/+2
| |/
* / move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+1
|/
* Clean up the cast callsAnthony Ramine2015-10-211-11/+6
|
* Introduce trait CastableAnthony Ramine2015-10-211-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Button prefix from names of variants of ButtonType enumBrandon Fairchild2015-10-201-6/+6
| | | | Fixes #8106.
* Remove explicit lifetimes which can be elided.Adam Szopa2015-10-211-2/+2
|
* Removed unsafe from 'query_selector_iter'Leo Lahti2015-10-201-8/+4
|
* Move Event States to |Element|.Bobby Holley2015-10-161-16/+16
| | | | | | Conceptually they belong there, rather than on |Node|. Fixes #7934.
* Explicitly customise flags of new nodes where neededAnthony Ramine2015-10-151-4/+5
| | | | | | | 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-11/+2
|
* Generate the TypeId enums in codegenAnthony Ramine2015-10-141-6/+8
|
* 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-5/+1
| | | | | The trait is now implemented for HTMLFooElement instead of &HTMLFooElement and does no longer require an impl body.
* Add form getter for input/button elements; update test expectationsManish Goregaokar2015-09-241-1/+6
|
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-2/+2
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-1/+0
| | | | This merges import blocks that were reported by tidy as unmerged.
* Auto merge of #7452 - nox:cleanup-attributes, r=noxbors-servo2015-09-021-27/+18
|\ | | | | | | | | | | | | | | | | | | Introduce VirtualMethods::attribute_mutated() <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7452) <!-- Reviewable:end -->
| * Introduce VirtualMethods::attribute_mutated()Anthony Ramine2015-09-021-27/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces before_remove_attr(), after_remove_attr() and after_set_attr(). The virtual method takes the mutated attribute and an AttributeMutation value to disambiguate between "attribute is changed", "attribute is added" and "attribute is removed". In the case of "attribute is changed", the mutation value contains a reference to the old value of the mutated attribute, which is used to unregister outdated named elements when the "id" attribute is changed on an element. This greatly simplifies the handling of attributes, which in many cases don't have any specific behaviour whether they are removed or changed or added. It also fixes a few bugs where things were put in before_remove_attr() instead of after_remove_attr() (e.g. when removing an href attribute from a base element). A few helper functions in Element were also renamed and made private.
* | Enforce linking to spec for method implementations via macrosCorey Farwell2015-08-311-1/+8
|/
* Make the traits for the IDL interfaces take &selfAnthony Ramine2015-08-271-3/+3
|
* Remove AttributeHandlersAnthony Ramine2015-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | On components/script/*.rs: # Remove imports. /^ *use dom::element::\{.*AttributeHandlers/ { s/\{AttributeHandlers, /\{/ s/, AttributeHandlers//g s/\{([a-zA-Z]+)\}/\1/ /\{\}/d s/::self;$/;/ } /^ *use dom::element::\{?AttributeHandlers\}?;$/d # Remove AttributeHandlers. /^pub trait AttributeHandlers \{$/,/^\}$/D # Patch AttributeHandlers methods. /^impl<'a> AttributeHandlers for &'a Element \{/,/^\}$/ { s/^impl<'a> AttributeHandlers for &'a Element \{/impl Element {/ /^ *fn /s/\(self([,)])/\(\&self\1/ /^ *fn.*\(&self/s/fn/pub fn/ } The few error cases were then fixed by hand.