Commit graph

62 commits

Author SHA1 Message Date
Nicolas Silva
239f2da9d9
style: Update to euclid 0.20.
Differential Revision: https://phabricator.services.mozilla.com/D38530
2019-07-23 22:54:08 +02:00
Simon Sapin
1d38bc0419 Fix some new warnings 2019-06-22 14:59:09 +02:00
DutchGhost
d4d5d998b9
Update lib.rs
Fix `for` typo in the documentation, should be `fork` instead.
2019-06-06 20:37:27 +02:00
Emilio Cobos Álvarez
deba73a528 Remove a useless MallocSizeOf implementation.
Now that this is no longer used in AuthorStyles there's no point in doing this.
2019-05-07 12:55:59 +02:00
Emilio Cobos Álvarez
a23ad3be50 style: Add parsing support for ::part().
Disabled for now of course. This should be pretty uncontroversial I'd think.

Differential Revision: https://phabricator.services.mozilla.com/D28060
2019-05-07 12:55:44 +02:00
Josh Matthews
57d2b5a92d Remove mozjs dep from malloc_size_of. 2019-05-02 09:30:03 -04:00
Fernando Jiménez Moreno
542699691e Derive MallocSizeOf for QuirksMode 2019-04-26 11:31:18 +02:00
Josh Matthews
9f855ae847 Update webrender. 2019-01-17 17:52:35 -05:00
Bobby Holley
f2d6e07aa0 Put malloc_size_of_derive on crates.io, and add a reduced fork of malloc_size_of for WebRender.
Differential Revision: https://phabricator.services.mozilla.com/D16353
2019-01-13 21:59:15 +01:00
Emilio Cobos Álvarez
273705d7fb style: Fix tidy issues. 2018-12-16 13:35:09 +01:00
Emilio Cobos Álvarez
3f58e0b069 style: Deduplicate a bit the malloc_size_of code for hashmaps / hashsets.
This allows to experiment with other hash maps easily rather than
depending on what hashglobe::fake::HashMap dereferences to.

In particular I wrote it while trying to get a build working with hashbrown.

Differential Revision: https://phabricator.services.mozilla.com/D14098
2018-12-16 13:35:04 +01:00
Bastien Orivel
9a7eeb349a Update crossbeam-channel to 0.3 2018-11-18 19:33:19 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Bastien Orivel
08a535a4cb Use a BTreeMap to store formdata
I'm really unsure about the MallocSizeOf of BTreeMap as I took the same
code as for HashMap.

Fixes #13105
Fixes #21381
2018-11-05 08:20:31 +01:00
Bastien Orivel
024b40b39d Update hyper to 0.12 2018-11-01 19:17:36 +01:00
bors-servo
9a0404ac5f
Auto merge of #21881 - pyfisch:keyboard-types, r=paulrouget
Use keyboard-types crate

Have embedders send DOM keys to servo and use a strongly typed KeyboardEvent
from the W3C UI Events spec. All keyboard handling now uses the new types.

Introduce a ShortcutMatcher to recognize key bindings. Shortcuts are now
recognized in a uniform way.

Updated the winit port.
Updated webdriver integration.

part of #20331

What this PR does:

* allow the use non-ASCII keyboards for text input
* decouple keyboard event "key" from "code" (key meaning vs location)

What this PR does not do:

* completely improve keyboard events send from winit and webdriver
* add support for CompositionEvent or IME

Notes:

* The winit embedder does not send keyup events for printable keys (this is a regression)
* keyboard-types is on crates.io because I believe it to be useful outside of servo. If you prefer I can add a copy in this repo.

<!-- 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/21881)
<!-- Reviewable:end -->
2018-10-17 05:36:08 -04:00
Josh Matthews
171469c27c Update webrender to 923ee495bd9b0fda8a4a94c5a6cf42e2f0548731. 2018-10-09 18:23:19 -04:00
Pyfisch
0ccaa7e1a9 Use keyboard-types crate
Have embedders send DOM keys to servo and use a strongly typed KeyboardEvent
from the W3C UI Events spec. All keyboard handling now uses the new types.

Introduce a ShortcutMatcher to recognize key bindings. Shortcuts are now
recognized in a uniform way.

Updated the winit port.
Updated webdriver integration.

part of #20331
2018-10-07 22:39:00 +02:00
Emilio Cobos Álvarez
da5283d066
style: Fix Gecko build. 2018-09-15 19:19:18 +02:00
Simon Sapin
2a996fbc8f Replace mpsc with crossbeam/servo channel, update ipc-channel
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
2018-09-12 13:33:32 +08:00
bors-servo
4d18014241
Auto merge of #21615 - pyfisch:malloc_size_of-fmt, r=Manishearth
Rustfmt malloc_size_of & derive

Part of #21373. Formatting looks good.

<!-- 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/21615)
<!-- Reviewable:end -->
2018-09-05 04:52:26 -04:00
Pyfisch
5ba4df0441 Rustfmt malloc_size_of & derive 2018-09-05 10:32:44 +02:00
Cameron McCormack
e96b025f10
style: Add MallocSizeOf impls for 128-bit integers.
Differential Revision: https://phabricator.services.mozilla.com/D3947
2018-09-03 12:30:49 +02:00
Cameron McCormack
62419adaaa
style: Shrink selectors::Component to 24 bytes.
This saves about 37 KiB of memory across the UA style sheets.

Bug: 1475197
Reviewed-by: emilio
2018-08-08 01:36:53 +02:00
Cameron McCormack
a41127152b
style: Measure heap allocations hanging off selector components.
Bug: 1475191
Reviewed-by: emilio
MozReview-Commit-ID: D7vZQ7v8owS
2018-07-16 19:43:15 +02:00
Glenn Watson
823f3e2eb1 Update WR (transaction API change) 2018-06-20 09:15:31 +10:00
Anthony Ramine
0f91712800 Update to gleam 0.5 2018-05-05 13:08:36 +02:00
Josh Matthews
54c44a2751 Hide non-Servo heap measurement. 2018-04-02 10:21:18 -04:00
modal-d17
af445a357d Measure cache memory usage (#19251):
Made the memory cache data structure derive MallocSizeOf, along with
manual size_of() implementations in malloc_size_of.

Added a Measurable struct that acts as a container for fields size_of() can be called for.

Added a new IpcReceiver used for listening to messages from the memory profiler,
and used run_with_memory reporting to register a memory reporter in the thread.
Now when a message from the memory profiler arrives, report includes sizes of public and private http caches.

Updated test file.
2018-04-01 13:30:57 -04:00
Anthony Ramine
ce81420bef Use ByteBuf for the canvas messages
The type Vec<u8> is super unefficient to work with in Serde if all you want
to represent is a simple blob.
2018-03-26 20:48:02 +02:00
Martin Robinson
41cc348fc5 Update to handle WebRender API changes
Items now only take a clipping rectangle instead of a LocalClip.
2018-03-16 12:00:04 +10:00
Emilio Cobos Álvarez
25868beabd
style: Back out ordermap.
It was worth a shot!
2018-02-12 12:20:46 +01:00
Anthony Ramine
921d1aeeba Make AnimationValue::id be just a pointer cast 🐉🐲
Now that PropertyDeclaration and AnimationValue have the same discriminants,
that means the trick found in PropertyDeclaration::id can be done in
AnimationValue::id.
2018-02-10 16:31:45 +01:00
Anthony Ramine
79775541f2 Make AnimationValue have the same variants as PropertyDeclaration
By making AnimationValue have the same representation as PropertyDeclaration
and Void variants for non-animatable properties, we know by constructions
that all properties have the same discriminant in both.
2018-02-10 12:37:30 +01:00
Pyfisch
46ada747b0 Use LayoutRects for bounds and overflow in display lists
Convert text runs to glyphs in display list builder.
Remove ComplexClippingRegion and use the WebRender type.
2018-02-07 12:21:08 +01:00
Anni Ryynänen
f5a9e16e07 Remove indirect mozjs dependency from compositing 2018-02-06 17:35:09 +02:00
Martin Robinson
99eb457fc7 Update WebRender
This allows servo to use the ExternalScrollId API from WebRender fixing
some issues related to duplicate scroll root ids.

Fixes #17176.
Fixes #19287.
Fixes #19648.
2018-02-06 15:10:35 +01:00
Emilio Cobos Álvarez
a2c2d34753
hashglobe: Add a shim on top of OrderMap. 2018-01-31 15:14:30 +01:00
Pyfisch
8bb50ac0b9 Use more WebRender types in gfx
Removes ImageBorder details from gfx.
Use WebRender BorderRadius in BoxShadow.
Stores cursors as integer.
Use FilterOp, BorderWidths from WebRender.
Store content_rect as LayoutRect.
2018-01-30 11:37:20 +01:00
Pyfisch
8c7c5f6e79 Use more WebRender types in gfx/display_list
This uses floating-point (Layout) coordinates in where possible.
Replace NormalBorder struct with WebRender equivalent.
Remove ToPointF and ToRectF traits.
Convert border RepeatKeyword with ToLayout.
Add some definitions to malloc_size_of for WebRender types.
2018-01-17 23:29:57 +01:00
Simon Sapin
5a82a1d455 Reverse the dependency between selectors and malloc_size_of 2018-01-12 15:10:04 +01:00
Simon Sapin
e17697fb0e Update euclid, azure, skia, offscreen_gl_context, plane-split, webrender 2017-12-08 14:32:28 +01:00
Alan Jeffrey
8008ba5081 Renamed js crate to mozjs 2017-11-08 11:43:30 -06:00
Martin Robinson
f37fa0cf6d Update WR to use the new sticky positioning API 2017-10-30 10:15:30 +01:00
Manish Goregaokar
b118ba72d0 Revert "Diagnostic map semantics."
This reverts commit f5c5be00a7.
2017-10-23 13:51:08 -07:00
Simon Sapin
959ce482dd Stop relying on linking details of std’s default allocator
We’ve been bitten before by symbol names changing:
https://github.com/servo/heapsize/pull/46
and upstream is planning to stop using jemalloc by default:
https://github.com/rust-lang/rust/issues/33082#issuecomment-309781465

So use the (relatively) new `#[global_allocator]` attribute
to explicitly select the system allocator on Windows
and jemalloc (now in an external crate) on other platforms.
This choice matches current defaults.
2017-10-19 09:52:50 +02:00
Nicholas Nethercote
4506f0d30c Replace all uses of the heapsize crate with malloc_size_of.
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`.
2017-10-18 22:20:37 +11:00
Nicholas Nethercote
a26d25db12 Rename size_of_is_0! as malloc_size_of_is_0!.
The new name makes it clearer that it comes from the `malloc_size_of`
crate.
2017-10-18 14:26:56 +11:00
Bobby Holley
f5c5be00a7 Diagnostic map semantics.
MozReview-Commit-ID: C0a5g6xMPY0
2017-10-07 12:54:15 -07:00
Bobby Holley
15b866d8de Revert #18668 - Add mprotect diagnostics for HashMap crash 2017-10-03 12:44:26 -07:00