aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/webdriver_handlers.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove `get_*` on getters as per RFC 0344.Corey Farwell2016-03-311-4/+4
| | | | | | https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis https://github.com/servo/servo/issues/6224
* find_node_by_unique_id should use findDaniel Robertson2016-02-241-9/+1
| | | | find_node_by_unique_id should use find instead of for-loop
* Implement GetElementRect webdriver commandDaniel Robertson2016-02-241-0/+41
| | | | Implement the webdriver Get Element Rect command
* task -> threadrohan.prinja2016-01-101-1/+1
|
* Fix a bunch of clippy lintsJohannes Linke2016-01-021-1/+1
|
* Removed duplicate webdriver_traits file and added webdriver handler for ↵David Raifaizen2015-11-291-1/+51
| | | | GetWindowSize, IsSelected and IsEnabled
* Add support for getting an element's computed style through WebDriver.James Graham2015-11-201-0/+17
|
* Implement Get Element Attribute WebDriver commandJames Graham2015-11-181-0/+15
|
* Implement support for WebDriver send keys command.James Graham2015-11-161-0/+21
| | | | | | Supports sending keys to an element. The specification here is still rather unfinished so the error handling and so on in this code will need iteration as it becomes clearer what the expected behaviour is.
* Replaced DOMString constructor by conversion functions.Alan Jeffrey2015-11-121-6/+6
| | | | | | Replaced DOMString(...) by DOMString::from(...). Replaced ....0 by String::from(...). Removed any uses of .to_owner() in DOMString::from("...").
* Use the conversion traits from js.Ms2ger2015-11-121-6/+10
|
* Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-8/+8
| | | | | | | | | | 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-18/+18
|
* merge from masterrohan.prinja2015-11-031-2/+2
|\
| * Avoid string copies in handle_find_{element,elements}_css.Ms2ger2015-10-301-2/+2
| |
* | move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+2
|/
* Clean up the cast callsAnthony Ramine2015-10-211-4/+2
|
* Introduce trait CastableAnthony Ramine2015-10-211-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 webdriver use of SubpageIdGlenn Watson2015-10-151-3/+3
|
* script: Stop copying the document URL.Patrick Walton2015-09-241-2/+3
|
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-3/+3
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-2/+1
| | | | This merges import blocks that were reported by tidy as unmerged.
* Remove helper traitsAnthony Ramine2015-08-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that JSRef<T> is gone, there is no need to have helper traits. On components/script/*.rs: # Remove imports. /^ *use dom::[a-z]+::\{.*Helpers/ { s/\{(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers, /\{/ s/, (Raw[^L]|[^L][^a])[a-zA-Z]+Helpers([,}])/\2/g s/\{([a-zA-Z]+)\}/\1/ /\{\}/d s/::self;$/;/ } /^ *use dom::[a-z]+::\{?(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers\}?;$/d On components/script/dom/*.rs: # Ignore layout things. /^(pub )?(impl|trait).*Layout.* \{/,/^}$/ { P; D; } # Delete helpers traits. /^(pub )?trait ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? \{$/,/^\}$/D # Patch private helpers. /^impl.*Private.*Helpers/,/^\}$/ { s/^impl<'a> Private([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for &'a ([^ ]+) \{$/impl \3 {/ /^ *(unsafe )?fn .*\(self.*[<&]'a/ { s/&'a /\&/g s/<'a, /</g } /^ *(unsafe )?fn /s/\(self([,)])/\(\&self\1/ } # Patch public helpers. /^impl.*Helpers/,/^\}$/ { s/^impl(<'a>)? ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for (&'a )?([^ ]+) \{$/impl \5 {/ /^ *(unsafe )?fn .*\(self.*[<&]'a/ { s/&'a /\&/g s/<'a, /</g } /^ *(unsafe )?fn .*\(&?self[,)]/s/(unsafe )?fn/pub &/ /^ *pub (unsafe )?fn /s/\(self([,)])/\(\&self\1/ } The few error cases were then fixed by hand.
* sort all usesJohann Tuffe2015-08-201-7/+7
|
* Added support for int32 to webdriver.Christopher Hotchkiss2015-07-241-1/+1
|
* Ensure we get the post-redirect urlJames Graham2015-07-191-0/+8
|
* compositing: Make the constellation messages serializable.Patrick Walton2015-07-181-12/+27
|
* Upgrade to SM 39Michael Wu2015-06-191-32/+34
|
* Add support for switching frames with the webdriver API.James Graham2015-06-011-3/+34
| | | | This moves webdriver_traits into msg to avoid a circular dependency.
* Reduce max line length from 150 to 120 charactersCorey Farwell2015-05-241-4/+9
| | | | Part of https://github.com/servo/servo/issues/6041
* Add support for timing out scriptsJames Graham2015-05-141-11/+10
|
* Add basic support for executeAsyncScript.James Graham2015-05-141-15/+29
| | | | | | This relies on a global webdriverCallback function, which is visible to content. Obviously that's not a long term solution for a number of reasons, but it allows us to experiment for now
* Make WebDriver Get() command wait on pages loading before returning.James Graham2015-05-141-1/+1
| | | | | This makes using WebDriver significantly less racy. Also refactors the message structure a little
* Add support for getActiveElement webdriver commandJames Graham2015-05-111-0/+5
|
* Add WebDriver support for getting elements by selector.James Graham2015-05-081-1/+68
| | | | Also adds example support for getting the name and text properties of the elements.
* Implement webdriver commands for back/forward/title/handles.James Graham2015-05-061-1/+6
|
* Uniformise root() methodsAnthony Ramine2015-04-281-1/+1
| | | | | They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable and ResultRootable.
* Add script execution support via WebDriverJames Graham2015-04-231-0/+38