Commit graph

31404 commits

Author SHA1 Message Date
Bobby Holley
f858ce91e8 Avoid entraining various Debug impls in release builds.
MozReview-Commit-ID: Lp9i9EI5qdU
2018-01-13 09:51:46 -08:00
CYBAI
0291a75b3c style: Remove -servo-display-for-hypothetical-box from longhand 2018-01-13 20:54:50 +08:00
Emilio Cobos Álvarez
72e62fe308
style: Ruby style adjustments shouldn't reset mOriginalDisplay.
This matches what Gecko does:

  https://searchfox.org/mozilla-central/rev/7476b71e0010ab3277b77cc0ae4d998c4b1d2b64/layout/style/GeckoStyleContext.cpp#992

And it's conceptually more right, since we ideally shouldn't mutate
mOriginalDisplay from StyleAdjuster.
2018-01-13 13:21:58 +01:00
bors-servo
e81193c5c9 Auto merge of #19758 - emilio:adjust-display-right, r=emilio
style: Adjust the writing-mode fixup to call set_adjusted_display on Servo.

This is functionally equivalent right now (set_adjusted_display will just do
set_display), but won't be after #19709.

<!-- 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/19758)
<!-- Reviewable:end -->
2018-01-13 06:00:45 -06:00
Emilio Cobos Álvarez
76f22adccc
style: Adjust the writing-mode fixup to call set_adjusted_display on Servo.
This is functionally equivalent right now (set_adjusted_display will just do
set_display), but won't be after #19709.
2018-01-13 12:57:02 +01:00
Gregory Terzian
993e2f55ed handle caching of response with a body of ResponseBody::Receiving 2018-01-13 10:48:36 +08:00
Gregory Terzian
609e975c50 ignore aborted response in http caching 2018-01-13 10:48:35 +08:00
bors-servo
6ca651c0c8 Auto merge of #19751 - servo:selectors, r=bholley
Clean up the selectors crate for a new crates.io release

<!-- 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/19751)
<!-- Reviewable:end -->
2018-01-12 16:55:12 -06:00
bors-servo
1a8366598a Auto merge of #19753 - bholley:notedirtyelement_optimizations, r=emilio
NoteDirtyElement optimizations

https://bugzilla.mozilla.org/show_bug.cgi?id=1398119
2018-01-12 12:22:10 -06:00
Bobby Holley
2b1c1d7b68 Avoid atomic overhead in Servo_Element_IsDisplayNone.
This reduces time spent in NoteDirtyElement by about 15% in the testcase. Even
though the subsequent patch will cause us to call Servo_Element_IsDisplayNone less
for this particular testcase, it could still be hot on other testcases, and so
it's worth optimizing.

MozReview-Commit-ID: 3F3Zfp48dDW
2018-01-12 10:19:07 -08:00
Bobby Holley
ac74cf7a60 Add machinery to assert single-threadedness from geckolib.
MozReview-Commit-ID: 9LBNm2h5Ct3
2018-01-12 10:19:06 -08:00
CYBAI
a061f2a89f Use Python's True instead of string for arbitrary Python code in mako 2018-01-12 10:17:37 -08:00
Simon Sapin
befadc563a Prepare to publish selectors 0.19.0 to crates.io 2018-01-12 18:13:50 +01:00
bors-servo
865181b6e6 Auto merge of #19752 - CYBAI:fix-mako-true, r=nox
style: Use Python's True instead of string for arbitrary Python code in mako

As discussion in IRC with @nox and @gootorov , it's more correct to use Python's `True` for `${arbitrary Python code}` in mako.

Following is related IRC logs

```
15:39 nox
As I said, that's because there are 2 ways to invoke the things with Mako.

15:40 nox
${arbitrary Python code} vs <%named_helper ..>...</%named_helper>

15:40 nox
IIRC <%foo bar=True></%foo> is not valid Mako syntax,

15:40 nox
but with bar="True" it is.

15:42 cybai
gootorov: I did meet some issues when moving makos if I set "True" instead of Python's `True`. Thus, like nox mentioned above, it's related to how the code works

15:44 gootorov
nox: Alright, I got it now, thanks. There are a couple ${function} blocks that still use `boxed="True" though. They aren't <%named_helpers>, shouldn't they use Python's True too, then?

15:45 nox
gootorov: I think there is an issue because this specific attribute is also used as a string through other <%helpers>,

15:46 nox
gootorov: Seems like it's not an issue anymore because the boxed attribute is passed to arg_to_bool,

15:46 nox
which either returns the boolean as is or check whether it's a "True" or "False" string.

15:47 nox
gootorov: So indeed, you can probably make those use booleans now.

15:47 gootorov
nox: Okay, got it, thanks for the explanation :)
```

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests

<!-- 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/19752)
<!-- Reviewable:end -->
2018-01-12 10:56:30 -06:00
CYBAI
3f6a613bea Use Python's True instead of string for arbitrary Python code in mako 2018-01-13 00:23:30 +08:00
Igor Gutorov
c72066af2d style: Move -moz-context-properties outside of mako 2018-01-12 17:46:02 +02:00
Simon Sapin
358bac953d Move Visit trait bounds to where they’re needed 2018-01-12 15:44:07 +01:00
Simon Sapin
1a6010f19f Document selectors::Visit 2018-01-12 15:40:16 +01:00
Simon Sapin
c14b766ff5 Rename SelectorMethods to Visit, after its one method. 2018-01-12 15:26:56 +01:00
bors-servo
75f39b42ab Auto merge of #19750 - glennw:update-wr-api, r=jdm
Update WR (new transaction API).

In the future we'll want to start making use of this in Servo
to get atomic updates of resources with display list changes etc.

<!-- 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/19750)
<!-- Reviewable:end -->
2018-01-12 08:20:59 -06:00
Simon Sapin
79f93cfb5b The selectors crate has had many contributors 2018-01-12 15:11:00 +01:00
Simon Sapin
116a6de59c Make OpaqueElement’s field private.
It’s not used anywhere, and this reduces the public API surface.
2018-01-12 15:11:00 +01:00
Simon Sapin
7d1dc7286a Move selectors size_of tests to Stylo tests 2018-01-12 15:10:56 +01:00
Simon Sapin
5d920df460 Move PrecomputedHash bounds to where they’re actually needed. 2018-01-12 15:10:47 +01:00
Simon Sapin
b0003f77e4 Prepare servo_arc for publication on crates.io 2018-01-12 15:10:44 +01:00
Simon Sapin
5a82a1d455 Reverse the dependency between selectors and malloc_size_of 2018-01-12 15:10:04 +01:00
Simon Sapin
0929f72709 Re-enable selectors doctests
Closes #16710, which was actually fixed by
6dff251e35 in #19395.
This exercises that fix.

Green AppVeyor build: https://ci.appveyor.com/project/servo/servo/build/1.0.24124
2018-01-12 14:42:38 +01:00
bors-servo
50e4171958 Auto merge of #19747 - emilio:doc-state-invalidator, r=upsuper
style: Add a document state invalidator.

Don't use it yet (since I was working from a Servo tree). Will hook it up and improve in the Gecko bug.

Right now it takes a `StyleRuleCascadeData`, which means that if all the origins in the document have state selectors we could do just one walk over the tree and not multiple, that will be improved.

Other than that, this is completely untested of course, but I prefer to land it, given I don't think it's complex, and work on the Gecko integration separately. The reason for this is that I also plan to fix the `<slot>` bugs, which will change `StyleRuleCascadeData` and such, and I want the two bugs to conflict as little as possible.

<!-- 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/19747)
<!-- Reviewable:end -->
2018-01-12 05:09:04 -06:00
Emilio Cobos Álvarez
335ca47361
style: Use Default for ExtraStyleData instead of Option. 2018-01-12 12:08:47 +01:00
Emilio Cobos Álvarez
9a1f20f1e8
style: Add a comment about figuring out what the best way to deal with XBL is. 2018-01-12 12:08:46 +01:00
Emilio Cobos Álvarez
a69d229615
style: Use a more compact form for should_process_descendants. 2018-01-12 12:08:43 +01:00
Emilio Cobos Álvarez
5b7d9eb94a
style: Add a document state invalidator. 2018-01-12 12:08:42 +01:00
Emilio Cobos Álvarez
2c1d72ad1a
style: Track document state dependencies in the invalidation maps. 2018-01-12 12:08:41 +01:00
Emilio Cobos Álvarez
14661e470f
style: Add a couple FIXMEs I've noticed while working on this.
::slotted is hard.
2018-01-12 12:08:40 +01:00
Emilio Cobos Álvarez
cb1a951477
style: Allow storing a DocumentState for invalidation. 2018-01-12 12:08:39 +01:00
Emilio Cobos Álvarez
1e27f2883b
selectors: Allow defining an implementation-dependent field in the matching context. 2018-01-12 12:08:38 +01:00
Glenn Watson
69b6f3dcdf Update WR (new transaction API).
In the future we'll want to start making use of this in Servo
to get atomic updates of resources with display list changes etc.
2018-01-12 17:38:23 +10:00
bors-servo
005dc85a88 Auto merge of #19748 - bholley:remove_lazy_pseudo_cache, r=emilio
Adjust size of gecko ComputedValues struct for removal of separate lazy pseudo cache

https://bugzilla.mozilla.org/show_bug.cgi?id=1429529

<!-- 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/19748)
<!-- Reviewable:end -->
2018-01-11 12:16:01 -06:00
Bobby Holley
fd41646699 Adjust size of gecko ComputedValues struct for removal of separate lazy pseudo cache. 2018-01-11 10:15:35 -08:00
bors-servo
2b9dbc3415 Auto merge of #19740 - servo:jdm-patch-2, r=aneeshusa
Allow warnings during mutation tests.

Sometimes mutations include removing the only use of a variable. When we deny warnings globally, we inhibit these mutations that trigger new warnings.

<!-- 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/19740)
<!-- Reviewable:end -->
2018-01-11 10:30:19 -06:00
Josh Matthews
c55f25b3aa Take throw-on-dynamic-markup-insertion-counter into account when check script safety. 2018-01-11 11:14:41 -05:00
Connor Brewster
4593195b49 Implement throw-on-dynamic-markup-insertion-counter 2018-01-11 11:14:10 -05:00
Connor Brewster
43526c80bb Add a check for when the js execution stack is empty 2018-01-11 11:14:10 -05:00
Connor Brewster
87475b11d3 Implement the create an element for token algorithm 2018-01-11 11:14:10 -05:00
bors-servo
9b3fc43f5a Auto merge of #19744 - emilio:doc-invalidation-preparation, r=upsuper
style: A few trivial changes in preparation for document state invalidation.

<!-- 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/19744)
<!-- Reviewable:end -->
2018-01-11 07:50:55 -06:00
Emilio Cobos Álvarez
268f0f75b9
style: Factor out a few invalidation functions that are going to be shared soon. 2018-01-11 14:49:31 +01:00
Emilio Cobos Álvarez
b91efadd8d
style: Move invalidation::element::collector to invalidation::element::state_and_attributes.
Since it's what that file is about.
2018-01-11 14:49:31 +01:00
Emilio Cobos Álvarez
b6a2bff032
style: Move :-moz-locale-dir matching to rust. 2018-01-11 14:47:29 +01:00
bors-servo
1a4df8f876 Auto merge of #19716 - pyfisch:conversions, r=emilio
Use a ToLayout trait for converting from style to webrender types

<!-- 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/19716)
<!-- Reviewable:end -->
2018-01-11 03:41:43 -06:00
bors-servo
f47cd758fa Auto merge of #19743 - EdgarChen:unresolved, r=heycam
style: Remove :unsolved pseudo-class

<!-- Please describe your changes on the following line: -->

This is the servo part changes of https://bugzilla.mozilla.org/show_bug.cgi?id=1417829.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1417829.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because this PR is to remove a feature.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/19743)
<!-- Reviewable:end -->
2018-01-10 21:06:04 -06:00