aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/stylesheet_loader.rs
Commit message (Collapse)AuthorAgeFilesLines
* Remove use of unstable box syntax.Simon Sapin2017-10-161-2/+2
| | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* Rename Runnable to TaskAnthony Ramine2017-09-161-1/+1
| | | | | | | | | | | | The changes are: * `*Runnable` -> `*Task`; * `RunnableMsg` -> `Task`; * `RunnableWrapper` -> `TaskCanceller`; * `MainThreadRunnable` -> `MainThreadTask`; * `wrap_runnable` -> `wrap_task`; * `get_runnable_wrapper` -> `task_canceller`; * `handler` -> `run`; * `main_thread_handler` -> `run_with_script_thread`.
* Preserve sourceURL comment on style sheetsTom Tromey2017-09-141-0/+1
| | | | | | | | | | | | | In addition to the sourceMappingURL comment, there is a second special comment, "sourceURL", that can be used to set the "display name" of a style sheet for developer tools. This name is also used as the base URL for the source-map URL resolution algorithm. sourceURL is described here: https://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/ The devtools feature bug is here: https://bugzilla.mozilla.org/show_bug.cgi?id=880831 This patch changes servo to preserve and expose this value for use in M-C.
* style: Don't look for viewport units in stylesheets.Emilio Cobos Álvarez2017-08-281-1/+0
| | | | | | | | | | Use whether we've computed any viewport unit instead. This is more accurate (we avoid restyling unnecessarily if we've found anything ever on the stylesheet, but that hasn't matched). This has the benefit of also matching Gecko, and simplify some code and fishyness around, and also hopefully speeding up stylesheet parsing.
* Expose the source map URL on a style sheetTom Tromey2017-08-171-0/+1
| | | | | | 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
* Replace all uses of the style::stylearc alias with servo_arc.Michael Partheil2017-07-191-1/+1
| | | | | | 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).
* Change RequestInit origin type to ImmutableOriginFausto Núñez Alberro2017-07-161-1/+1
|
* stylo: Fix StyleSheetInner/Stylesheet mappingEmilio Cobos Álvarez2017-07-021-10/+39
| | | | | | The key of this patch is the split between Stylesheet and StylesheetContents. Gecko will use StylesheetContents, which maps to a ServoStyleSheetInner.
* Bug 1331291 part 1 - Set stylesheet url_data correctly for import rule.Xidorn Quan2017-06-131-1/+1
|
* Fix up script and layout.Bobby Holley2017-05-021-2/+3
|
* Propagate quirks mode all the way to ParserContextAnthony Ramine2017-04-271-1/+2
| | | | The quirks mode is still not properly propagated in geckolib.
* Auto merge of #16407 - jdm:style_panic, r=emiliobors-servo2017-04-131-4/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -->
| * Allow loading multiple stylesheets for the same link element.Josh Matthews2017-04-131-4/+1
| |
* | Bug 1325878: Pass the MediaList down to Servo, making <style media> work. ↵Emilio Cobos Álvarez2017-04-121-2/+2
| | | | | | | | | | | | | | r=xidorn MozReview-Commit-ID: BUCSQJs2CNI Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* | Bug 1325878: Don't use nsMediaList for loading imports. r=xidornEmilio Cobos Álvarez2017-04-121-4/+4
|/ | | | | MozReview-Commit-ID: HR23bqZcmcA Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* Use final url for updating stylesheet from @import rule.Xidorn Quan2017-04-031-0/+1
|
* Use a UrlExtraData type alias to unify url handling logic.Xidorn Quan2017-04-031-5/+2
|
* Parse stylesheets without acquiring a shared lock.Simon Sapin2017-03-191-3/+0
|
* Remove some indirection.Simon Sapin2017-03-191-12/+5
|
* Refactor StylesheetLoader so impls do not need to acquire a shared lock.Simon Sapin2017-03-191-25/+20
| | | | | This fixes a deadlock: https://github.com/servo/servo/pull/16014#issuecomment-287527067
* Wrap most CSS rules in Locked<_> instead of RwLock<_>Simon Sapin2017-03-191-9/+17
|
* Replace RwLock<CssRules> with Locked<CssRules>Simon Sapin2017-03-191-0/+2
|
* Replace RwLock<MediaList> with shared_lock::Locked<MediaList>Simon Sapin2017-03-191-0/+2
|
* fix issue #15101 and make sure out-of-order stylesheet loads work correctly ↵SwagColoredKitteh2017-01-241-18/+30
| | | | for the same element
* Support origins in CSSOM stylesheetsNazım Can Altınova2017-01-201-1/+17
|
* Handle crossorigin in link and refactor crossorigin handlingmrnayak2017-01-131-5/+18
| | | | | | | | 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
* Handle properly alternate stylesheetcharlesvdv2017-01-101-0/+3
|
* Implement Subresource Integritymrnayak2017-01-081-2/+3
| | | | | | | | | | | 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
* Interact with the originating document for stylesheet loads, rather than the ↵Josh Matthews2017-01-041-3/+6
| | | | element's current document.
* script: Abstract HTMLLinkElement and StyleElement into StylesheetOwner.Emilio Cobos Álvarez2016-12-161-41/+32
|
* script: Move the stylesheet loading code from htmllinkelement to ↵Emilio Cobos Álvarez2016-12-161-0/+254
stylesheet_loader. Make it track subresource loads properly.