Commit graph

369 commits

Author SHA1 Message Date
bors-servo
53c4a782a0 Auto merge of #9255 - ckimes89:remove-globalfield, r=nox
Remove global fields from DOM objects

Fixes #9227

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9255)
<!-- Reviewable:end -->
2016-01-12 18:32:37 +05:30
Bobby Holley
384cdfcfff Hoist ParseErrorReporter into style and remove the dependency on msg.
The pipeline id stuff is currently unused. If someone needs it, they can add
an additional trait bound on their css error reporter to get the pipeline id.
2016-01-11 18:01:48 -08:00
Chad Kimes
ce6075825d Add global default method for Reflectable trait 2016-01-11 20:23:47 -05:00
bors-servo
a5a7a8318c Auto merge of #8972 - GauriGNaik:expose-css-errors-1, r=jdm
M1501: CSS Error Reporting: Final Steps Last Part

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8972)
<!-- Reviewable:end -->
2016-01-12 03:47:50 +05:30
GauriGNaik
907322c666 Final steps 2016-01-11 18:48:54 +05:30
Ms2ger
9dc85e0d40 Stop reexporting ReflowGoal from layout_interface. 2016-01-11 10:00:17 +01:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
Johannes Linke
6b215f38ee Fix a bunch of clippy lints 2016-01-02 23:27:15 +01:00
bors-servo
b8e7cd71d6 Auto merge of #8871 - KiChjang:task-source-channels, r=KiChjang
Add 5 different task source channels

This is **not** complete. I really need feedback right away since I felt that the direction I'm heading is very wrong.

Partial #7959.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8871)
<!-- Reviewable:end -->
2016-01-01 14:31:51 +05:30
Brandon Fairchild
637afecec9 Move LayerKind and ScrollPolicy enums to gfx_traits
This also moves LayerId and LayerProperties to gfx_traits.

Fixes #8836.
2015-12-20 20:43:31 -05:00
bors-servo
9a4d82c314 Auto merge of #8863 - simartin:issue_8352, r=jdm
Issue #8352: Dispatch mozbrowsershowmodalprompt event for alert().

Fixes https://github.com/servo/servo/issues/8352

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8863)
<!-- Reviewable:end -->
2015-12-21 02:28:32 +05:30
Beomjin Kim
2637d30c2a Moved ScriptToCompositorMsg enum and EventResult enum to script_traits
Moved ScriptToCompositorMsg enum and EventResult enum to script_traits
resolving issue #8835.
2015-12-20 00:31:33 +09:00
Simon Martin
0d910bb934 Issue #8352: Dispatch mozbrowsershowmodalprompt event for alert(). 2015-12-19 12:51:33 +01:00
Glenn Watson
b670430cb2 Add test to constellation to avoid writing reftest image if there are pending frames.
Also change when pipelines become active.

This makes the constellation activate a pipeline as the current frame
when it is ready to do initial reflow, rather than when it is ready
to paint.

This fixes a number of intermittent failures that could previously occur
if an iframe was not visible - which would mean it was never moved from
a pending frame in the constellation to an active frame.

(It happens that webrender exposes these intermittents as permanent failures).
2015-12-17 12:30:19 +10:00
GauriGNaik
fc81276c8e Add pipeline information to CSS error reporting. 2015-12-14 11:18:30 -05:00
Ms2ger
b7b5c79787 Rename the browsercontext module. 2015-12-11 15:27:27 -05:00
Keith Yeung
f478194736 Split script_chan into 5 different task queue channels 2015-12-09 22:49:08 -08:00
Tomas Cernaj
5507be2653 Move ScriptMsg from msg crate into script_traits 2015-12-09 20:50:11 +01:00
bors-servo
02f4be9c9f Auto merge of #8862 - fstr:move_workerid, r=Ms2ger
Moved WorkerId type to devtools_traits

Fixes #8846.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8862)
<!-- Reviewable:end -->
2015-12-08 00:53:40 +05:30
Florian Strübe
b81f712ce1 Moved WorkerId type to devtools_traits 2015-12-07 20:11:26 +01:00
Keith Yeung
8d90034d29 Split fn script_chan into 5 different task channel fn 2015-12-06 12:12:14 -08:00
GauriGNaik
996e9e06b2 Defined new trait ParseErrorReporter and added error_reporter member to ParserContext 2015-11-25 18:28:30 -05:00
Eli Friedman
31c013858f Make the needs_reflow method actually work correctly.
The document node is always dirty because layout never clears the bit;
instead, check the dirty bit of the root element.
2015-11-21 15:49:58 -08:00
Keith Yeung
19294db6e5 Split ConstellationMsg into ScriptMsg and CompositorMsg 2015-11-16 23:10:53 -08:00
bors-servo
62acdd303b Auto merge of #8477 - asajeffrey:opaque-domstring, r=asajeffrey
Opaque DOMString

This patch makes DOMString an opaque wrapper round String (currently it's a transparent wrapper).

The changes are:

* Replacing DOMString(foo) by DOMString::from(foo).
* Replacing foo.0 by String::from(foo).
* Adding functions clear, push_str and extend for in-place mutation of DOMStrings.
* Replacing DOMString by String in other threads (devtools, storage and filereader).
* Making DOMString implement !Send.
* Removing the pub attribute from the contents of DOMString.

This enables experimenting with other string representations in the DOM.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8477)
<!-- Reviewable:end -->
2015-11-13 07:17:30 +05:30
Alan Jeffrey
84bde75b42 Replaced DOMString constructor by conversion functions.
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
2015-11-12 17:52:59 -06:00
bors-servo
9eaa8e7b1f Auto merge of #8492 - jdm:e10s-timer-events, r=jdm
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 -->
2015-11-13 05:19:48 +05:30
Josh Matthews
2340583e56 Differentiate between error and non-error event handlers per the spec. 2015-11-12 16:21:24 -05:00
Patrick Walton
1dc0d61c3c script: Make timer events e10s-safe.
Closes #8235.
2015-11-12 14:30:25 -05:00
Ms2ger
6d2ae85c1f Use the conversion traits from js. 2015-11-12 10:48:58 +01:00
Anthony Ramine
b290a3161d Clean up the conversion routines
Functions returning `Root<T>` are prefixed by "root_" and the ones returning
`*const T` by "native_".

Functions taking `*mut JSObject` are now suffixed by "_from_object" and the ones
taking `&T` by "_from_reflector".
2015-11-11 14:19:30 +01:00
benshu
d27a3244f2 XHR timeouts use same abstraction as scripts timers. (fixes #3396) 2015-11-11 00:52:34 +01:00
Till Schneidereit
543703e3d8 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.
2015-11-07 18:11:29 +01:00
bors-servo
69e6eb4d91 Auto merge of #8304 - dzbarsky:borrowck, r=Ms2ger
Cleanup some unneeded let bindings

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8304)
<!-- Reviewable:end -->
2015-11-07 01:31:40 +05:30
Josh Matthews
989e80036e Implement cancellable runnables.
Additionally, make image load events cancellable. Resolves #7731.
2015-11-06 10:41:38 -05:00
David Zbarsky
dfc90db1d7 Cleanup some unneeded let bindings 2015-11-06 00:22:31 -08:00
bors-servo
1dc144d168 Auto merge of #8332 - Ms2ger:8209-comment, r=frewsxcv
Remove obsolete comment (fixes #8209).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8332)
<!-- Reviewable:end -->
2015-11-05 06:25:54 +05:30
bors-servo
b4d234107e Auto merge of #7128 - Ms2ger:bc-root, r=jdm
Make BrowsingContext JS-managed.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7128)
<!-- Reviewable:end -->
2015-11-04 22:38:51 +05:30
Ms2ger
208140d208 Remove obsolete comment (fixes #8209). 2015-11-04 14:33:35 +01:00
Ms2ger
f86502f80c Make BrowsingContext JS-managed. 2015-11-04 12:30:13 +01:00
Ms2ger
6b75078503 Make DOMString a newtype around String, rather than a typedef.
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.
2015-11-04 12:09:11 +01:00
David Zbarsky
722aa86c89 Get rid of a bunch of explicit derefs 2015-11-03 19:51:46 -08:00
bors-servo
daad09d442 Auto merge of #8221 - wenderen:8130-reorganise, r=jdm
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 -->
2015-11-04 02:56:02 +05:30
rohan.prinja
6e774ea6eb merge from master 2015-11-03 19:01:23 +09:00
bors-servo
9a800becdf Auto merge of #8239 - Ms2ger:ScriptReflow, r=pcwalton
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 -->
2015-11-03 15:29:17 +05:30
Eli Friedman
df7fb8fa32 Remove JSTraceable implementation from RefCell.
The implementation wasn't really right, and we would rather just use
DOMRefCell anyway.
2015-11-02 14:40:57 -08:00
Olivia Nordquist
aebf87cf5b Un-boxed ScriptReflow 2015-10-31 22:29:16 -07:00
Ms2ger
7fc93c0770 Remove unused Window::control_chan. 2015-10-31 12:40:18 +01:00
Ms2ger
02692d201f Remove unused Window::last_reflow_id. 2015-10-31 12:40:17 +01:00
Ms2ger
40b3b749bf Remove unused fields from ScriptReflow. 2015-10-31 12:40:14 +01:00