Commit graph

284 commits

Author SHA1 Message Date
Ying-Ruei Liang(KK)
55a2270e16 Bring referrer policy delivery to <a> and <link> via rel attribute 2016-09-20 21:17:37 +08:00
Arthur Marble
883902bd97 Most of the code refactoring needed to be done is done with this commit. 2016-09-18 03:41:16 -05:00
Malisa Smith
faf32a7cfb dom::Response implementation 2016-09-06 19:58:32 -07:00
Anthony Ramine
7ad51dcd7a Update serde to 0.8 (fixes #12659) 2016-08-12 18:37:27 +02:00
Mike MacDonald (crazymykl)
aed761509b
Fire load event for external stylesheets
Do not load stylesheets with the wrong Content-Type

Fixes #11912, #11910
2016-08-03 17:13:26 -04:00
Simon Sapin
6d0e48f6cc Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
Kuba Birecki
85f4da18a6 Inline DOM element creation into box expressions in components/script/dom/ 2016-07-14 08:44:22 +02:00
Connor Brewster
315ffe7677 Make network listener runnable cancellable 2016-07-08 09:00:59 -06:00
Anthony Ramine
8ecb5962f3 Move util::str to style 2016-07-05 10:43:54 +02:00
Josh Matthews
29d3cbf34a Avoid loading stylesheets in inactive documents. 2016-07-04 11:25:17 -04:00
Josh Matthews
1b495de29c Allow pages to finish loading when external stylesheets have network errors. 2016-06-29 09:06:20 -04:00
Ms2ger
9e2e0ff98c Move the remainder of layout_interface into script_layout_interface. 2016-06-20 19:08:12 +02:00
Manish Goregaokar
d4f428ad95 Abstractify the Listener abstractions further 2016-06-10 20:53:19 +05:30
Ms2ger
684510bc94 Stop re-exporting AttrValue. 2016-06-07 13:15:23 +02:00
Ms2ger
e94f3d4fe0 Remove the LayoutChan type.
It is a pointless abstraction.
2016-05-27 15:33:04 +02:00
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01:00
bors-servo
2a2b88f42c Auto merge of #11287 - heycam:moz-binding, r=bholley
Support -moz-binding in geckolib

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 --faster` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because changes target stylo

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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11287)
<!-- Reviewable:end -->
2016-05-24 14:41:04 -07:00
Anthony Ramine
cdc7bca944 Move DOMString back to script
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
Cameron McCormack
bb85f5faf0 Add an extra data field to ParserContext.
This will be used for passing Gecko-specific information through
the CSS parser in stylo.
2016-05-24 12:12:10 +10:00
Ms2ger
cc2b2b50a7 Remove ConstellationChan.
It's a pointless abstraction that propagates the obsolete chan terminology,
swaps the order in which the sender and receiver are returned, and hides a
source of panics.
2016-05-19 17:13:44 +02:00
Ms2ger
897be5f6ee Reduce channel cloning. 2016-04-29 14:55:52 +02:00
bors-servo
210803b4b2 Auto merge of #10887 - askeing:fix_10374, r=KiChjang
Dispatch error event when link elements get invalid response

fix #10374

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10887)
<!-- Reviewable:end -->
2016-04-28 14:30:04 -07:00
Keith Yeung
33acb1937c Remove extraneous script_chan parameter from Trusted::new 2016-04-28 10:52:44 +02:00
askeing
d6863e6800 modified the code, following the suggestions from reviewer 2016-04-28 15:06:01 +08:00
askeing
80fd18676f Dispatch error event when link elements get invalid response 2016-04-28 13:06:16 +08:00
Ravi Shankar
5e6f32a59b Propagating the load errors from network loader 2016-04-20 12:38:35 -04:00
Ms2ger
5645a59e05 Fix some compile warnings. 2016-04-19 18:15:16 +02:00
Nazım Can Altınova
ffd7960ad8 Use the document base url when resolving stylesheets 2016-04-18 19:54:37 +03:00
Hugo Thiessard
c39c7533ca Issue #10284 Ignore alternate stylesheets 2016-04-05 23:57:39 +02:00
Kamil Muszyński
076cc409e6 Issue #9561 Renamed *_thread_source to *_task_source and ThreadSource to TaskSource 2016-02-14 15:29:44 +01:00
Emilio Cobos Álvarez
dd503dfacb Refactor style to be completely backend-independent
This commit refactors the style crate to be completely independent of
the actual implementation and pseudo-elements supported.

This also adds a gecko backend which introduces parsing for the
anonymous box pseudo-elements[1], although there's still no way of
querying them.

https://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSAnonBoxList.h
2016-02-13 16:05:14 +01:00
apopiak
4b773cefe9 move MozBrowserEvent to script_traits (+ documentation) 2016-01-13 17:48:50 +01:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
Mathieu Agopian
11234f5370 Use Url.join instead of UrlParser.base_url(...).parse (#9002) 2015-12-18 17:02:41 +01:00
Arthur Skobara
8acb21a594 Remove from Trusted::new an unnecessary argument 2015-12-12 22:31:19 +06:00
Tomas Cernaj
5507be2653 Move ScriptMsg from msg crate into script_traits 2015-12-09 20:50:11 +01:00
Keith Yeung
8d90034d29 Split fn script_chan into 5 different task channel fn 2015-12-06 12:12:14 -08:00
Eli Friedman
e42dcb3712 Remove unnecessary conversion to/from DOMString for localName. 2015-12-02 13:42:45 -08:00
Eli Friedman
c02c0576c8 Compute attribute name atoms at compile-time. 2015-11-27 15:42:34 -08:00
GauriGNaik
996e9e06b2 Defined new trait ParseErrorReporter and added error_reporter member to ParserContext 2015-11-25 18:28:30 -05:00
Alan Jeffrey
3dec6edd10 Update string_cache to 0.2.
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.
2015-11-25 10:13:21 -06:00
Keith Yeung
19294db6e5 Split ConstellationMsg into ScriptMsg and CompositorMsg 2015-11-16 23:10:53 -08:00
Roman Klauke
0813ee7257 replace Atom::from_slice("sizes") with atom!(sizes")
Closes: #8488
2015-11-14 20:58:57 +01:00
Paul Rouget
5263a4c4c9 [Browser API] implement mozbrowsericonchange event 2015-11-14 09:59:50 +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
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
rohan.prinja
51df8e310b rearrange imports to be in alphabetical order 2015-10-30 20:28:59 +09:00
rohan.prinja
bb2536cd01 move Castable into dom::bindings::inheritance 2015-10-30 20:24:42 +09:00
Anthony Ramine
68014af78e Clean up the cast calls 2015-10-21 11:40:34 +02:00