Tom Tromey
7224a5617f
Expose the source map URL on a style sheet
...
This changes Servo to track the source map URL of a style sheet. This
parallels a change going in to Gecko:
https://bugzilla.mozilla.org/show_bug.cgi?id=1388855
2017-08-17 06:51:30 -06:00
Michael Partheil
b07ebbae6b
Replace all uses of the style::stylearc alias with servo_arc.
...
The alias is left there temporarilly and will be removed completely in a later commit where
also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still
use the old alias).
2017-07-19 09:29:05 +02:00
Fausto Núñez Alberro
6032940fb8
Change RequestInit origin type to ImmutableOrigin
2017-07-16 21:44:33 +02:00
Emilio Cobos Álvarez
1263075776
stylo: Fix StyleSheetInner/Stylesheet mapping
...
The key of this patch is the split between Stylesheet and StylesheetContents.
Gecko will use StylesheetContents, which maps to a ServoStyleSheetInner.
2017-07-02 15:49:40 +02:00
Xidorn Quan
cdc537f23e
Bug 1331291 part 1 - Set stylesheet url_data correctly for import rule.
2017-06-13 10:07:06 +10:00
Bobby Holley
7b0679848b
Fix up script and layout.
2017-05-02 17:35:45 -07:00
Anthony Ramine
f68e2fded9
Propagate quirks mode all the way to ParserContext
...
The quirks mode is still not properly propagated in geckolib.
2017-04-27 10:41:55 +02:00
bors-servo
ebc61bb2c3
Auto merge of #16407 - jdm:style_panic, r=emilio
...
Allow loading multiple stylesheets for the same link element.
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16399
- [x] There are tests for these changes
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16407 )
<!-- Reviewable:end -->
2017-04-13 11:29:58 -05:00
Josh Matthews
3c3311b16a
Allow loading multiple stylesheets for the same link element.
2017-04-13 16:02:17 +10:00
Emilio Cobos Álvarez
ac7bc414d9
Bug 1325878: Pass the MediaList down to Servo, making <style media> work. r=xidorn
...
MozReview-Commit-ID: BUCSQJs2CNI
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-12 22:27:45 +08:00
Emilio Cobos Álvarez
2999222436
Bug 1325878: Don't use nsMediaList for loading imports. r=xidorn
...
MozReview-Commit-ID: HR23bqZcmcA
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-12 21:24:51 +08:00
Xidorn Quan
2628ebe612
Use final url for updating stylesheet from @import rule.
2017-04-03 21:57:17 +10:00
Xidorn Quan
37585309e9
Use a UrlExtraData type alias to unify url handling logic.
2017-04-03 21:57:16 +10:00
Simon Sapin
d9491187dc
Parse stylesheets without acquiring a shared lock.
2017-03-19 22:30:40 +01:00
Simon Sapin
cc046300f0
Remove some indirection.
2017-03-19 22:30:39 +01:00
Simon Sapin
1e38013783
Refactor StylesheetLoader so impls do not need to acquire a shared lock.
...
This fixes a deadlock:
https://github.com/servo/servo/pull/16014#issuecomment-287527067
2017-03-19 22:30:39 +01:00
Simon Sapin
adb97d4cbe
Wrap most CSS rules in Locked<_> instead of RwLock<_>
2017-03-19 22:30:36 +01:00
Simon Sapin
f35b4e27b3
Replace RwLock<CssRules> with Locked<CssRules>
2017-03-19 22:30:35 +01:00
Simon Sapin
c5a7294e05
Replace RwLock<MediaList> with shared_lock::Locked<MediaList>
2017-03-19 22:30:31 +01:00
SwagColoredKitteh
bb2826e41f
fix issue #15101 and make sure out-of-order stylesheet loads work correctly for the same element
2017-01-24 15:52:01 +01:00
Nazım Can Altınova
fd950a7309
Support origins in CSSOM stylesheets
2017-01-20 22:00:49 +03:00
mrnayak
3d9e44a8c4
Handle crossorigin in link and refactor crossorigin handling
...
Implemented Step three and handled step four of obtain the resource part
of 4.2.4 The link element.
Link to spec : https://html.spec.whatwg.org/multipage/semantics.html#concept-link-obtain
Refactored crossOrigin handling in HTMLScriptElement, HTMLImageElement
2017-01-13 23:35:00 +05:30
charlesvdv
19e31d5c50
Handle properly alternate stylesheet
2017-01-10 15:38:38 +01:00
mrnayak
a3026499f4
Implement Subresource Integrity
...
Implemented response validation part of
https://w3c.github.io/webappsec-subresource-integrity/ .
Implemented step eighteen of the main fetch. If a request has integrity
metadata, then following steps are performed
*Wait for response body
*If the response does not have a termination reason and response does not
match request’s integrity metadata, set response to a
network error.# Please enter the commit message for your changes. Lines starting
2017-01-08 08:52:18 +05:30
Josh Matthews
318a047ee5
Interact with the originating document for stylesheet loads, rather than the element's current document.
2017-01-04 09:55:45 -05:00
Emilio Cobos Álvarez
b9901fbd89
script: Abstract HTMLLinkElement and StyleElement into StylesheetOwner.
2016-12-16 17:59:45 +01:00
Emilio Cobos Álvarez
7582a2d59d
script: Move the stylesheet loading code from htmllinkelement to stylesheet_loader. Make it track subresource loads properly.
2016-12-16 16:57:20 +01:00