aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Replaced DOMString by String in devtools.Alan Jeffrey2015-11-121-3/+3
| | |
* | | Auto merge of #8492 - jdm:e10s-timer-events, r=jdmbors-servo2015-11-131-17/+7
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | script: Make timer events e10s-safe. Closes #8235. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8492) <!-- Reviewable:end -->
| * | script: Make timer events e10s-safe.Patrick Walton2015-11-121-17/+7
| |/ | | | | | | Closes #8235.
* | Auto merge of #8428 - Ms2ger:conversions, r=Manishearthbors-servo2015-11-131-5/+7
|\ \ | |/ |/| | | | | | | | | | | Update js. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8428) <!-- Reviewable:end -->
| * Use the conversion traits from js.Ms2ger2015-11-121-5/+7
| |
* | Auto merge of #7844 - Wafflespeanut:requests, r=jdmbors-servo2015-11-121-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | Cancelable network requests! fixes #4974 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7844) <!-- Reviewable:end -->
| * Implement cancellation listener for cancelling network requestsRavi Shankar2015-11-121-1/+1
| |
* | Execute XHR timeout callbacks directly. (Fixes #8468.)benshu2015-11-111-2/+0
|/
* Auto merge of #8286 - eefriedman:no-move, r=noxbors-servo2015-11-081-5/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary uses of #[no_move] The patch makes RootCollection a bit safer by making the StackRootTLS hold it in place. RootedVec was doing an extremely delicate dance and just hoping nobody messed it up; switch to a Box to be safe. CodeGenRust seemed to be using no_move for no particularly good reason. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8286) <!-- Reviewable:end -->
| * Clean up some code related to #[no_move].Eli Friedman2015-11-071-5/+6
| | | | | | | | | | | | | | | | The patch makes RootCollection a bit safer by making the StackRootTLS hold it in place. The use of no_move in CodeGenRust was leftover from when roots couldn't be moved.
* | Auto merge of #8039 - tschneidereit:script-owns-stylesheets, r=jdmbors-servo2015-11-081-12/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move Stylesheet loading and ownership from the layout task into HTML elements Stylesheets for `HTMLLinkElement`s are now loaded by the resource task, triggered by the element in question. Stylesheets are owned by the elements they're associated with, which can be `HTMLStyleElement`, `HTMLLinkElement`, and `HTMLMetaElement` (for `<meta name="viewport">). Additionally, the quirks mode stylesheet (just as the user and user agent stylesheets a couple of commits ago), is implemented as a lazy static, loaded once per process and shared between all documents. This all has various nice consequences: - Stylesheet loading becomes a non-blocking operation. - Stylesheets are removed when the element they're associated with is removed from the document. - It'll be possible to implement the CSSOM APIs that require direct access to the stylesheets (i.e., ~ all of them). - Various subtle correctness issues are fixed. One piece of interesting follow-up work would be to move parsing of external stylesheets to the resource task, too. Right now, it happens in the link element once loading is complete, so blocks the script task. Moving it to the resource task would probably be fairly straight-forward as it doesn't require access to any external state. Depends on #7979 because without that loading stylesheets asynchronously breaks lots of content. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8039) <!-- Reviewable:end -->
| * | Move Stylesheet loading and ownership from the layout task into HTML elementsTill Schneidereit2015-11-071-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stylesheets for `HTMLLinkElement`s are now loaded by the resource task, triggered by the element in question. Stylesheets are owned by the elements they're associated with, which can be `HTMLStyleElement`, `HTMLLinkElement`, and `HTMLMetaElement` (for `<meta name="viewport">). Additionally, the quirks mode stylesheet (just as the user and user agent stylesheets a couple of commits ago), is implemented as a lazy static, loaded once per process and shared between all documents. This all has various nice consequences: - Stylesheet loading becomes a non-blocking operation. - Stylesheets are removed when the element they're associated with is removed from the document. - It'll be possible to implement the CSSOM APIs that require direct access to the stylesheets (i.e., ~ all of them). - Various subtle correctness issues are fixed. One piece of interesting follow-up work would be to move parsing of external stylesheets to the resource task, too. Right now, it happens in the link element once loading is complete, so blocks the script task. Moving it to the resource task would probably be fairly straight-forward as it doesn't require access to any external state.
* | | Auto merge of #8355 - Ms2ger:Exit, r=noxbors-servo2015-11-071-9/+9
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup exit messages and related code. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8355) <!-- Reviewable:end -->
| * | | Remove the unused PipelineExitType field from ↵Ms2ger2015-11-051-1/+1
| | | | | | | | | | | | | | | | ConstellationControlMsg::ExitPipeline.
| * | | Remove the unused PipelineExitType arguments from ↵Ms2ger2015-11-051-7/+7
| | | | | | | | | | | | | | | | ScriptTask::handle_exit_pipeline_msg and shut_down_layout.
| * | | Remove the unused PipelineExitType field from layout_interface::Msg::ExitNow.Ms2ger2015-11-051-3/+3
| | | |
* | | | Auto merge of #8359 - ben0x539:js-url-query-fragment, r=eefriedmanbors-servo2015-11-071-2/+24
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Append query string + fragment to javascript: url. When loading a URL whose scheme is javascript, we should do what https://html.spec.whatwg.org/multipage/browsers.html#javascript-protocol says and append the URL's query and fragment components to the scheme data, as well as percent- and utf-8-decode the whole thing, before evaluating it as javascript. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8359) <!-- Reviewable:end -->
| * | | Append query string + fragment to javascript: url.Benjamin Herr2015-11-061-2/+24
| |/ / | | | | | | | | | | | | | | | | | | | | | When loading a URL whose scheme is javascript, we should do what https://html.spec.whatwg.org/multipage/#javascript-protocol says and append the URL's query and fragment components to the scheme data, as well as percent- and utf-8-decode the whole thing, before evaluating it as javascript.
* / / Implement cancellable runnables.Josh Matthews2015-11-061-2/+37
|/ / | | | | | | Additionally, make image load events cancellable. Resolves #7731.
* | Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-5/+5
| | | | | | | | | | | | | | | | | | | | 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.
* | Use DOMString::new() somewhat consistently.Ms2ger2015-11-041-2/+2
| |
* | Get rid of a bunch of explicit derefsDavid Zbarsky2015-11-031-53/+53
| |
* | Auto merge of #8221 - wenderen:8130-reorganise, r=jdmbors-servo2015-11-041-1/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | move modules around for #8130 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8221) <!-- Reviewable:end -->
| * \ merge from masterrohan.prinja2015-11-031-19/+24
| |\ \
| * | | move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+2
| | | |
* | | | Auto merge of #8232 - mbrubeck:glutin-touch, r=glennwbors-servo2015-11-031-25/+25
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct event dispatching for multiple simultaneous touch points Instead of just converting the mouse into a single "touch" input, Servo can now listen for multi-touch events from Glutin, maintain a list of active touch points, and dispatch events for all of them. r? @glennw (for the compositor changes) and @jdm (for the DOM changes) <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8232) <!-- Reviewable:end -->
| * | | | Handle multi-touch events from glutinMatt Brubeck2015-11-031-25/+25
| | |_|/ | |/| |
* | | | Auto merge of #8239 - Ms2ger:ScriptReflow, r=pcwaltonbors-servo2015-11-031-1/+0
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Remove unused code around ScriptReflow. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8239) <!-- Reviewable:end -->
| * | | Remove unused Window::control_chan.Ms2ger2015-10-311-1/+0
| | | |
* | | | Remove JSTraceable implementation from RefCell.Eli Friedman2015-11-021-2/+2
| |/ / |/| | | | | | | | | | | The implementation wasn't really right, and we would rather just use DOMRefCell anyway.
* | | Removed JS::root Fixes #8251nxnfufunezn2015-10-311-2/+1
|/ /
* | Auto merge of #8276 - mrobinson:fragment-ticks, r=mbrubeckbors-servo2015-10-311-3/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Snap fragment scroll points to pixel boundaries These don't match hardware pixels, but work well enough when the device pixel ratio is a whole number. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8276) <!-- Reviewable:end -->
| * | Snap fragment scroll points to pixel boundariesMartin Robinson2015-10-301-3/+12
| |/ | | | | | | | | These don't match hardware pixels, but work well enough when the device pixel ratio is a whole number.
* / Use if let in ScriptTask::notify_devtools.Ms2ger2015-10-301-12/+9
|/
* remove DocumentProgressTask enumRohan Prinja2015-10-271-2/+2
|
* Improve spec-compliance of script loading and execution during document startupTill Schneidereit2015-10-261-13/+9
| | | | Including proper support for async and deferred scripts.
* Auto merge of #8155 - Ms2ger:join, r=jdmbors-servo2015-10-231-23/+4
|\ | | | | | | | | | | | | | | | | | | Remove Window::layout_join_port. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8155) <!-- Reviewable:end -->
| * Remove the ConstellationControlMsg::ReflowComplete message.Ms2ger2015-10-221-2/+0
| |
| * Remove Window::handle_reflow_complete_msg and ↵Ms2ger2015-10-221-17/+2
| | | | | | | | | | | | | | | | | | | | | | ScriptTask::handle_reflow_complete_msg. Code on the script thread can only observe self.layout_join_port being Some() between the time it is set in force_reflow, and the join_layout call later in that function, and no significant code is called in that code. Since these functions do nothing useful if layout_join_port is None, there is no point in keeping them.
| * Remove layout_is_idle.Ms2ger2015-10-221-6/+4
| | | | | | | | | | | | | | | | | | Code on the script thread can only observe self.layout_join_port being Some() between the time it is set in force_reflow, and the join_layout call later in that function, and no significant code is called in that code. This implies that layout_is_idle will always return true, so there is no reason for the function to exist.
* | Dispatch touch events and perform default touch actions.Matt Brubeck2015-10-221-1/+34
|/ | | | | This is currently limited to simple single-touch actions. It does not include momentum scrolling or pinch zooming.
* Timers are scheduled by a dedicated per-constellation thread.benshu2015-10-211-44/+73
|
* Clean up the cast callsAnthony Ramine2015-10-211-16/+8
|
* Introduce trait CastableAnthony Ramine2015-10-211-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Move Event States to |Element|.Bobby Holley2015-10-161-7/+6
| | | | | | Conceptually they belong there, rather than on |Node|. Fixes #7934.
* Issue 8028: `parse_html` should take `Url` rather than `&Url`Stephen Li2015-10-151-1/+1
|
* Auto merge of #7972 - nox:codegen-heapsize, r=Ms2gerbors-servo2015-10-151-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce DOMClass::heap_size_of It holds a function pointer to the HeapSizeOf::heap_size_of_children() implementation corresponding to that IDL interface. This removes the need for a clumsly TypeId-based match expression in the former heap_size_of_eventtarget() function. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7972) <!-- Reviewable:end -->
| * Introduce DOMClass::heap_size_ofAnthony Ramine2015-10-141-3/+3
| | | | | | | | | | | | | | | | It holds a function pointer to the HeapSizeOf::heap_size_of_children() implementation corresponding to that IDL interface. This removes the need for a clumsly TypeId-based match expression in the former heap_size_of_eventtarget() function.
* | Support the updated spidermonkey bindingsMichael Wu2015-10-141-1/+1
|/
* Make it possible for iframes to create their own pipeline ID.Glenn Watson2015-10-061-1/+4
| | | | | | | | This doesn't change any functionality, but it's the first step towards removing SubpageId. Adding this change now will allow us to gradually change over code referencing subpage id rather than in one massive PR. Introduces a namespace for pipeline ID generation - there is a namespace for the constellation thread, and one per script thread.