aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlstyleelement.rs
Commit message (Collapse)AuthorAgeFilesLines
* Introduce BindContext with in_doc and connected flagsFernando Jiménez Moreno2019-04-261-5/+5
| | | | Fix some is_in_doc -> is_connected mistakes
* Make StyleSheetListOwner an enum instead of a trait objectFernando Jiménez Moreno2019-04-261-0/+1
|
* Remove stylesheets ownership from DocumentOrShadowRootFernando Jiménez Moreno2019-04-261-1/+1
|
* ShadowRoot stylesheet listFernando Jiménez Moreno2019-04-261-5/+6
|
* Add is_connected flag to node and use it to replace most uses of is_in_docFernando Jiménez Moreno2019-04-261-4/+4
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Unify the task source and task canceller APIAgustin Chiappe Berrini2018-11-141-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I moved away from the `Window` struct all the logic to handle task sources, into a new struct called `TaskManager`. In a happy world, I'd be able to just have there two functions, of the types: ```rust fn task_source<T: TaskSource>(&self, name: TaskSourceName) -> Box<T> fn task_source_with_canceller<T: TaskSource>(&self, name: TaskSourceName) -> (Box<T>, TaskSourceCanceller) ``` And not so much duplicated code. However, because TaskSource can't be a trait object (because it has generic type parameters), that's not possible. Instead, I decided to reduce duplicated logic through macros. For reasons[1], I have to pass both the name of the function with canceller and the name of the function without, as I'm not able to concatenate them in the macro itself. I could probably use `concat_idents` to create both types already defined and reduce the amount of arguments by one, but that macro is nightly only. At the same time, not being able to declare macros inside `impl` forces me to pass `self` as an argument. All this makes this solution more verbose than it would be ideally. It does reduce duplication, but it doesn't reduce the size of the file. [1](https://github.com/rust-lang/rust/issues/29599)
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-2/+2
|
* Reorder importsPyfisch2018-11-061-2/+4
|
* Sort `use` statementsSimon Sapin2018-11-061-2/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-14/+14
|
* Format script componentchansuke2018-09-191-24/+37
|
* Fix other parts of the Servo build.Emilio Cobos Álvarez2018-09-031-0/+1
|
* layout: script: Fix build.Emilio Cobos Álvarez2018-06-231-13/+20
|
* Fix Servo build.Emilio Cobos Álvarez2018-06-181-4/+6
|
* queue event instead of immediately fireddh2017-11-301-3/+3
| | | | | | created checks to see if parser is in use before event dispatch changed tests to expect crash and added async style test
* Bump bitflags to 1.0 in every servo crateBastien Orivel2017-10-301-2/+2
|
* Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-191-2/+2
| | | | | | failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE Backs out https://github.com/servo/servo/pull/18809
* Update bitflags to 1.0 in every servo crateBastien Orivel2017-10-191-2/+2
| | | | | It still needs dependencies update to remove all the other bitflags versions.
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Fix commonmark Markdown warnings in docs, part 1Matt Brubeck2017-10-171-1/+1
| | | | | | | | Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is passed to rustdoc. This is mostly a global find-and-replace for bare URIs on lines by themselves in doc comments.
* Remove use of unstable box syntax.Simon Sapin2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | 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 Root<T> to DomRoot<T>Anthony Ramine2017-09-261-5/+5
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-3/+3
| | | | | | | | I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
* Rename MutNullableJS<T> to MutNullableDom<T>Anthony Ramine2017-09-261-3/+3
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* script: Fix stylesheet adoption.Emilio Cobos Álvarez2017-09-131-3/+2
|
* stylo: Error reporting for unknown media featuresFernando Jiménez Moreno2017-09-081-6/+9
|
* Use cssparser's new_with_line_number_offsetTom Tromey2017-08-281-1/+1
| | | | | | cssparser provides a way to set the initial line number on a ParserInput. This patch changes servo to use this facility, rather than reimplement the same functionality itself.
* Devirtualize CSS error reporting.Josh Matthews2017-08-241-1/+0
|
* style: Replicate the list of stylesheets on the layout thread.Emilio Cobos Álvarez2017-08-181-6/+17
| | | | | | This is a patch that unifies a bit how Gecko and Stylo stylesheets work, in order to be able to eventually move the stylesheets into the stylist, and be able to incrementally update the invalidation map.
* 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).
* Force HTMLStyleElement to create a new CSSStyleSheet when re-parsing.Jonathan Chan2017-06-221-0/+1
| | | | | | | | | | | We already call Document::invalidate_style_sheets and set the stylesheet member to a new Stylesheet. This matches the behavior of Firefox, and means the new CSSStyleSheet you get from accessing .sheet from JS will be correct instead of stale. (::get_cssom_stylesheet already tries to use the new Stylesheet, but MutNullableJS::or_init is called, so if we already created a CSSStyleSheet we will continue to return that one).
* Move ParsingMode into style_traits.Hiroyuki Ikezoe2017-06-141-1/+2
|
* Thread ParseError return values through CSS parsing.Josh Matthews2017-06-091-2/+3
|
* Make ParsingMode bitflags.Hiroyuki Ikezoe2017-05-141-2/+2
| | | | | assert_parsing_mode_match() is mostly the same as assert_restyle_hints_match().
* Rename LengthParsingMode to ParsingMode and LengthParsingMode::SVG to ↵Hiroyuki Ikezoe2017-05-141-2/+2
| | | | | | | PasingMode::AllowUnitlessLength. We need another flag that represents allow-negative-number for SMIL, so this enum will also comprise the another parsing mode that allows negative number.
* Solving merge conficts related to the html5ever_atoms -> html5ever changeChristian Poveda2017-05-031-2/+2
|\
| * Auto merge of #16689 - servo:m5e, r=noxbors-servo2017-05-031-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Upgrade to html5ever 0.16 <!-- 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/16689) <!-- Reviewable:end -->
| | * Upgrade to html5ever 0.16Simon Sapin2017-05-021-1/+1
| | |
| * | Fix up script and layout.Bobby Holley2017-05-021-1/+1
| |/
* / Changed all prefixes from DOMString to the atomic Prefix from html5everChristian Poveda2017-05-031-4/+3
|/
* Propagate quirks mode all the way to ParserContextAnthony Ramine2017-04-271-2/+4
| | | | The quirks mode is still not properly propagated in geckolib.
* SVG length parsing modeJ. Ryan Stinnett2017-04-141-2/+3
| | | | | | | SVG allows non-zero lengths to be accepted and assumes they are in px. This adds this length parsing mode to Servo. MozReview-Commit-ID: Kxd3x64r9Ye
* Support line number offsets for inline stylesheetsmckaymatt2017-04-131-1/+4
|
* Bug 1325878: Pass the MediaList down to Servo, making <style media> work. ↵Emilio Cobos Álvarez2017-04-121-1/+2
| | | | | | | r=xidorn MozReview-Commit-ID: BUCSQJs2CNI Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* Pass ParserContext down to lengthsJ. Ryan Stinnett2017-04-121-4/+8
| | | | | | | | | | To make it possible to check the rule type when parsing lengths, we need to pass the `ParserContext` down through many layers to the place where length units are parsed. This change leaves it unused, so it's only to prepare for the next change. MozReview-Commit-ID: 70YwtcCxnWw
* Use a UrlExtraData type alias to unify url handling logic.Xidorn Quan2017-04-031-3/+1
|
* Replace RwLock<MediaList> with shared_lock::Locked<MediaList>Simon Sapin2017-03-191-1/+2
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|