Nicholas Nethercote
09143e627b
Fix a panic in Stylo memory reporting.
...
`MallocSizeOfOps::enclosing_size_of_op` is an `Option<>` type, and the panic in
question is caused by not providing a value in a case where it's needed for
measuring a HashSet.
HashMaps and HashSets are common enough that it makes sense to make
`enclosing_size_of_op` non-optional, which this patch does.
2017-09-18 13:37:53 +10:00
Nicholas Nethercote
9d057724eb
Implement MallocSizeOf properly for SmallBitVec.
2017-09-18 13:19:31 +10:00
bors-servo
2387dbedbb
Auto merge of #18547 - emilio:self-sharing, r=heycam
...
style: Resolver cleanup and sharing by rule node fixes.
See the individual commits for details.
This is the only coherent story I have for crashes like:
https://crash-stats.mozilla.com/report/index/bcdfe629-ca1f-4e4d-aa17-27f890170917
(And the fact that there are crashes like it on the main thread kinda indicates it's the case)
<!-- 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/18547 )
<!-- Reviewable:end -->
2017-09-17 21:58:06 -05:00
Emilio Cobos Álvarez
a5842165d9
style: Assert we don't try to share against ourselves.
2017-09-18 04:57:53 +02:00
Emilio Cobos Álvarez
891bc7d174
style: Massage the resolver code so it's cleaner and prevents the problem.
...
This way all the borrows stay in the sharing code, and prevents an extra borrow
on a cache hit, which is not a big deal but nice.
2017-09-18 04:57:50 +02:00
Emilio Cobos Álvarez
36fed07b1c
style: avoid testing against ourselves in lookup_for_rules.
...
There's a path in finish_restyle, where we can recascade a style for a given
element, in get_after_change_style.
I haven't been able to construct a test-case for this, but this is the only
coherent story I have for crashes like:
https://crash-stats.mozilla.com/report/index/bcdfe629-ca1f-4e4d-aa17-27f890170917#tab-details
2017-09-18 03:23:32 +02:00
Anthony Ramine
c051fc1995
Use task! for raf events from VR
2017-09-18 02:47:28 +02:00
Anthony Ramine
76745699d2
Use task! to post worker messages
2017-09-18 02:47:26 +02:00
Anthony Ramine
56a546afcd
Use task! to send a storage notification
2017-09-18 02:47:24 +02:00
Anthony Ramine
915a4f8385
Use task! for the details notification steps
2017-09-18 02:47:23 +02:00
Anthony Ramine
b3e27509b7
Use task! for step 11.4 of updating the image data
2017-09-18 02:47:21 +02:00
Anthony Ramine
5b41e66f27
Use task! to process image responses
2017-09-18 02:47:18 +02:00
Anthony Ramine
3592108759
Use task! for form planned navigations.
2017-09-18 02:47:17 +02:00
Anthony Ramine
aa67ff30db
Use task! for step 5.3.7 of updating the image data
2017-09-18 02:47:15 +02:00
Anthony Ramine
407af95db5
Use task! for step 9 of updating the image data
2017-09-18 02:47:14 +02:00
Anthony Ramine
fba54c7735
Use task! to fire a progress event when updating the image data
2017-09-18 02:47:12 +02:00
Anthony Ramine
30a1d3f617
Use task! for the dedicated media source failure steps
2017-09-18 02:47:11 +02:00
Anthony Ramine
91c2865e36
Use task! for notifying about playing
2017-09-18 02:47:09 +02:00
Anthony Ramine
e9f6ea40c2
Use task! instead of DocumentProgressHandler
2017-09-18 02:47:07 +02:00
Anthony Ramine
5412767f46
Introduce a task! macro and use it for internal pause steps
2017-09-18 02:47:06 +02:00
Anthony Ramine
46628fba05
Move Task to its own module
2017-09-18 02:47:04 +02:00
bors-servo
280ccf685d
Auto merge of #18542 - mhaessig:selector-tests, r=emilio
...
Land the test cases that should've landed with the selectors update
PR for #15448
- Added test for pseudo-element with whitespace #15335
- Added tests for empty values in `[att^=""]`, `[att$=""]` and `[att*=""]` selectors #15394 (tests for `[att~=""]` have been added with #15440 )
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15448
- [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/18542 )
<!-- Reviewable:end -->
2017-09-17 16:22:56 -05:00
bors-servo
f95da332a3
Auto merge of #18525 - emilio:border-spacing, r=nox
...
style: various serialization fixes
This should close https://github.com/servo/servo/pull/18458 , and fix https://bugzilla.mozilla.org/show_bug.cgi?id=1397619 .
<!-- 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/18525 )
<!-- Reviewable:end -->
2017-09-17 15:12:46 -05:00
Emilio Cobos Álvarez
7a265793c8
style: Be a little less From-happy with rect.
2017-09-17 21:33:22 +02:00
Emilio Cobos Álvarez
7e4338eed8
style: Be a bit more explicit about background-size.
...
We have a ton of ad-hoc `From` impls which seem overly generic, I think.
2017-09-17 21:33:19 +02:00
Emilio Cobos Álvarez
2ac1327e4b
style: Make border-spacing serialization consistent, and move it to precomputed_type.
2017-09-17 21:33:17 +02:00
Emilio Cobos Álvarez
f9c06d7932
style: Generalise BorderCornerRadius as Size
.
2017-09-17 21:33:14 +02:00
Emilio Cobos Álvarez
4936314b7e
style: Simplify serialisation of BorderCornerRadius when possible.
...
Closes #18458 .
Matches other browsers in test-cases like:
<div id="t" style="border-top-left-radius: 5px 5px"></div>
<script>alert(t.style.borderTopLeftRadius)</script>
(I think it'd be nicer to preserve the original value completely, but not going
to complain given we already do this for all sorts of Rect<T>s and such, and
this is much easier).
2017-09-17 21:33:11 +02:00
bors-servo
14529da2a3
Auto merge of #18537 - emilio:spring-cleanup, r=nox
...
style: Spring cleanup
<!-- 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/18537 )
<!-- Reviewable:end -->
2017-09-17 13:35:45 -05:00
Manuel Hässig
62d363b3cb
added tests for empty values in prefix, suffix and substring selectors
2017-09-17 19:05:21 +02:00
bors-servo
6f97dd1c96
Auto merge of #18539 - emilio:dom-conversion-fixes, r=nox
...
script: a couple DOM conversion fixes
Fixes https://github.com/servo/servo/issues/18535
<!-- 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/18539 )
<!-- Reviewable:end -->
2017-09-17 11:57:05 -05:00
Emilio Cobos Álvarez
91f238f326
script: Properly throw when "this" is not an object in a generic call.
2017-09-17 18:42:27 +02:00
Emilio Cobos Álvarez
5281fc1a44
script: Add a comment about some conversion that looks fishy.
2017-09-17 18:42:24 +02:00
Emilio Cobos Álvarez
b29e56eefc
script: Fix code generation for named getters.
...
Fixes part of #18535
2017-09-17 18:42:23 +02:00
bors-servo
4b4a744265
Auto merge of #18538 - emilio:font-size-dep-correct, r=heycam
...
stylo: Don't add a font-size dependency to the rule cache if the reference size is not our current style.
We enter the Custom(..) code path from other random places, like to remove the
relative lengths from a calc expression while zooming, or whatever craziness
MathML font-size uses, and we don't want to set the dependency on those cases.
<!-- 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/18538 )
<!-- Reviewable:end -->
2017-09-17 10:45:40 -05:00
Manuel Hässig
8b589dd6aa
added test for whitespace in pseudo element
2017-09-17 16:24:14 +02:00
bors-servo
c28cf7490f
Auto merge of #18541 - servo:rustup, r=SimonSapin
...
Upgrade to rustc 1.22.0-nightly (277476c4f 2017-09-16)
https://github.com/rust-lang/rust/pull/43017
<!-- 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/18541 )
<!-- Reviewable:end -->
2017-09-17 08:32:23 -05:00
Simon Sapin
aa5b3ae452
Upgrade to rustc 1.22.0-nightly (277476c4f 2017-09-16)
2017-09-17 15:27:09 +02:00
bors-servo
06628d2f60
Auto merge of #18540 - paulrouget:no_bt, r=nox
...
Use BluetoothAdapter mock when bluetooth is disabled
Today, only the DOM API is disabled.
When bluetooth is disabled, can we also disable bluetooth device code?
<!-- 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/18540 )
<!-- Reviewable:end -->
2017-09-17 07:16:07 -05:00
Paul Rouget
c5a79b0f09
Use BluetoohAdapter mock when bluetooth is disabled
2017-09-17 12:15:00 +02:00
Anthony Ramine
8e78f18d2d
Introduce MainThreadScriptMsg::DispatchJobQueue
...
This removes the last remaining use of Task::run_with_script_thread
2017-09-17 10:46:00 +02:00
Anthony Ramine
1d52df0562
Remove uses of AsyncJobHandler from script_thread
2017-09-17 10:27:02 +02:00
Anthony Ramine
f58207b851
Introduce MainThreadScriptMsg::RegisterPaintWorklet
...
This avoids the need for a generic task to send messages to the layout thread
through the main script thread.
2017-09-17 10:19:59 +02:00
Emilio Cobos Álvarez
ee49f0eaec
style: bonus point: only add the condition when computing reset properties.
2017-09-17 05:07:27 +02:00
Emilio Cobos Álvarez
60511611bb
stylo: Don't add a font-size dependency to the rule cache if the reference size is not our current style.
...
We enter the Custom(..) code path from other random places, like to remove the
relative lengths from a calc expression while zooming, or whatever craziness
MathML font-size uses, and we don't want to set the dependency on those cases.
MozReview-Commit-ID: HNatSGlzDkK
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-17 05:01:34 +02:00
Emilio Cobos Álvarez
efb2019f4c
style: Remove unused FnvHashMap re-export.
...
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-17 04:31:21 +02:00
Emilio Cobos Álvarez
162acd6cab
style: Remove unused stubbing support for Gecko properties.
...
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-17 04:31:21 +02:00
Emilio Cobos Álvarez
041de7ba65
style: Remove useless skip_additionals argument in gecko.mako.rs.
...
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-17 04:31:20 +02:00
Emilio Cobos Álvarez
0c2ebcbd1f
style: Remove a useless level of indirection in gecko.mako.rs
...
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-17 04:31:20 +02:00
Emilio Cobos Álvarez
6139f8175c
style: Remove useless Data::manual_style_structs.
...
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-17 04:31:19 +02:00