aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/cssstylerule.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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`.
* 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-3/+3
| | | | | | | 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 MutNullableJS<T> to MutNullableDom<T>Anthony Ramine2017-09-261-2/+2
|
* Rename JS<T> to Dom<T>Anthony Ramine2017-09-261-2/+2
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10)Simon Sapin2017-08-151-1/+1
|
* style: Introduce Chrome UI privilege for parsersTing-Yu Lin2017-08-031-0/+1
| | | | | | | | | | | The motivation is that Chrome XBL stylesheets can be parsed under author level, but we allow some event-state pseudo classes like :-moz-handled-clicktoplay to be used. Also synchronize the privilege of pseudo classes in non_ts_pseudo_class_list.rs and nsCSSPseudoClassList.h (except :fullscreen). MozReview-Commit-ID: 8fUjjC8hbQO
* 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).
* Implement CSSStyleRule.selectorText.Jonathan Chan2017-07-121-1/+36
| | | | | | | | | | | | | | | | | | We parse when assigning using the namespaces of the stylesheet. It isn't clear if the spec says to do that (Firefox doesn't support the setter at all, Chrome does, Safari doesn't); the spec issue is here: https://github.com/w3c/csswg-drafts/issues/1511 Also fix ToCss implementation of AttrSelectorOperator to not pad with spaces, to conform with CSSOM. This means we have to update some unit tests that expect operators with spaces around them in attribute selectors to roundtrip. See the "attribute selector" section of "Serializing Selectors" here: https://drafts.csswg.org/cssom/#serializing-selectors CSSStyleRule.selectorText is specified here: https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext
* Fix up script and layout.Bobby Holley2017-05-021-1/+1
|
* Replace RwLock<StyleRule> with Locked<StyleRule>Simon Sapin2017-03-191-11/+15
|
* Introduce a ToCssWithGuard traitSimon Sapin2017-03-191-2/+3
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* script: Fix base url for style-rule-owned declarations.Emilio Cobos Álvarez2017-01-281-2/+3
|
* Implement CSSKeyframeRule.styleKeith Yeung2017-01-071-1/+1
|
* Remove and allow some dead code.Ms2ger2016-12-221-4/+0
|
* Implement CSSStyleRule.styleKeith Yeung2016-12-171-3/+23
|
* Make CSSRule always keep a pointer to its parent stylesheetSimon Sapin2016-11-281-4/+5
| | | | even when the parentStylesheet IDL attribute returns null.
* Make parent stylesheet optional for CSSRulesManish Goregaokar2016-11-231-2/+2
|
* Support basic immutable CSSOMManish Goregaokar2016-11-151-0/+50