Commit graph

23 commits

Author SHA1 Message Date
Nicholas Nethercote
32548e5312 Overhaul MallocSizeOf and related things.
This patch makes the MallocSizeOf stuff in Stylo work more like the HeapSizeOf
stuff already in Servo, except better. In particular, it adds deriving support
for MallocSizeOf, which will make it easier to improve coverage.

The patch does the following.

- Combines servo/components/style/stylesheets/memory.rs and the heapsize crate
  into a new crate, malloc_size_of.

- Forks the heapsize_derive crate, calling it malloc_size_of, so that
  MallocSizeOf can be derived.

- Both the new crates have MIT/Apache licenses, like heapsize, in case they are
  incorporated into heapsize in the future.

- Renames the methods within MallocSizeOf and the related traits so they are
  more concise.

- Removes MallocSizeOfWithGuard.

- Adds `derive(MallocSizeOf)` to a lot of types, in some cases replacing an
  equivalent or almost-equivalent hand-written implementation.

- Adds stuff so that Rc/Arc can be handled properly.
2017-09-12 12:37:51 +10:00
Matt Brubeck
17f4d0c5d9 Bug 1348489 - stylo: Implement :-moz-window-inactive. 2017-06-30 09:31:01 -07:00
Boris Zbarsky
0527190c8f Add pseudo-classes to match on the state of the "dir" attribute.
Fixes the servo parts of Gecko bug 1373798 <https://bugzilla.mozilla.org/show_bug.cgi?id=1373798>
2017-06-19 22:09:03 -04:00
Wes Kocher
10917ce73f Revert "Add pseudo-classes to match on the state of the "dir" attribute." for preventing me from backing out a gecko-side patch
This reverts commit e4660c2b5b.
2017-06-19 15:44:00 -07:00
Boris Zbarsky
e4660c2b5b Add pseudo-classes to match on the state of the "dir" attribute.
Fixes the servo parts of Gecko bug 1373798 <https://bugzilla.mozilla.org/show_bug.cgi?id=1373798>
2017-06-19 14:44:12 -04:00
Boris Zbarsky
cd29916c99 Fix dynamic updates when :dir matching changes in stylo.
This is the servo part of https://bugzilla.mozilla.org/show_bug.cgi?id=1364280
2017-05-15 12:31:49 -04:00
Cameron McCormack
bc685fde68 style: Support :-moz-autofill and :-moz-autofill-preview in Gecko. 2017-05-12 17:36:37 +08:00
Cameron McCormack
c0ab74324a style: Fix IN_LOADING_STATE value. 2017-05-11 16:01:40 +08:00
Emilio Cobos Álvarez
a6277d5513
Bug 1350140: stylo: Implement all the remaining state pseudo-classes. r=heycam
Also implements :link, :visited, and :any-link more efficiently, and stops
matching :-moz-read-only in everything that is not read-write, which is kind of
dumb, and probably creates some artifacts.

MozReview-Commit-ID: 6BQqi7nAWdT
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-29 11:52:53 +02:00
Boris Zbarsky
5a5a6cd876 Implement :required/:optional support for stylo.
Servo side of https://bugzilla.mozilla.org/show_bug.cgi?id=1349659
2017-03-22 20:20:17 -04:00
Boris Zbarsky
5415e8aa4c Use less fragile and more readable numbering for ElementState. 2017-03-22 16:23:16 -04:00
Nazım Can Altınova
d23cbd37b8
Stylo: Add support for -moz-* pseudo-classes for alt text 2017-03-18 19:46:53 +03:00
Nazım Can Altınova
bd7c8eb513
Stylo: Add support for :valid/:invalid/:-moz-ui-valid pseudo-classes 2017-03-16 13:44:50 +03:00
Xidorn Quan
381651fd10 Change order of element state bits 2017-01-06 10:04:49 +11:00
Emilio Cobos Álvarez
eb90004f5a
style: Avoid missing docs in element_state. 2016-12-31 23:24:17 +01:00
Jansen Jan
55f0e56224 Add support for fullscreen #10102 2016-12-09 11:45:50 +01:00
Steve Melia
04f5369577 Issue 7720: Add target selector and update when scrolling to fragment 2016-08-03 13:23:10 +01:00
Ms2ger
79e0d18a1d Add some documentation to the style crate. 2016-06-27 17:33:14 +02:00
Simon Sapin
00b6210519 Make the style crate almost build on stable Rust.
`discriminant_value` will need to be replaced with something else later.
2016-06-22 15:44:13 +02:00
Anthony Ramine
ff899dc703 Implement :placeholder-shown (fixes #10561) 2016-06-03 14:45:14 +02:00
Matt Brubeck
1e23d90631 Upgrade to bitflags 0.6.0 and selectors 0.5.6
Types generated by `bitflags!` are now private by default.  This PR marks them
`pub` where necessary.
2016-04-30 10:14:03 -07:00
Yoav Alon
9bf909ac2f added support for :read-only and :read-write pseudo-classes
partial fix for https://github.com/servo/servo/issues/10732
2016-04-27 01:38:58 +03:00
Emilio Cobos Álvarez
a1c830f1c1 Update rust-selectors
This commits updates rust-selectors to use the generic parser, and as
such it moves the element state into the style crate.
2016-02-03 02:11:31 +01:00