Commit graph

33454 commits

Author SHA1 Message Date
Dan Glastonbury
a055e8af89
style: Change nscolor to StyleComplexColor in nsCSSShadowItem.
Bug: 1467621
Reviewed-by: xidorn
MozReview-Commit-ID: moE2CI7fT8
2018-07-01 00:03:11 +02:00
bors-servo
9c243a115e
Auto merge of #21102 - asajeffrey:mozjs-sys-0.51.3, r=SimonSapin
Updated mozjs_sys to v0.51.3

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

Allows building servo for target `i686-linux-android`.

---
<!-- 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 #21093
- [X] These changes do not require tests because deperndency update

<!-- 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/21102)
<!-- Reviewable:end -->
2018-06-30 07:43:21 -04:00
Alan Jeffrey
a557e2f3ca Updated mozjs_sys to v0.51.3 2018-06-30 13:42:59 +02:00
WPT Sync Bot
4787b28da3 Update web-platform-tests to revision 7a6f5673ff5d146ca5c09c6a1b42b7706cfee328 2018-06-28 22:43:00 -04:00
bors-servo
e2fca1b228
Auto merge of #20892 - gw3583:update-wr, r=mbrubeck
Update WR (transaction API change)

<!-- 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/20892)
<!-- Reviewable:end -->
2018-06-26 17:27:31 -04:00
Glenn Watson
ee784a79c4 Update text expectations. 2018-06-25 14:15:46 +10:00
Martin Robinson
7d672555be Give stacking contexts the right reference frame id
Stacking contexts that create reference frames should be created with
the positioning node set to the reference frames that surround them.
2018-06-25 07:35:26 +10:00
Martin Robinson
253117ece6 New reference frames should create containing blocks
Transforms should always create containing blocks. This bug already
existed in Servo, but was covered up by the reference frame id
replacement feature in WebRender. Now that we create reference frames
manually we need to fix it.
2018-06-25 07:35:19 +10:00
Martin Robinson
d41c512e98 Allow inline elements to create reference frames
This is important so that transforms applied to elements actually apply
to the display items created for those elements.
2018-06-25 07:35:10 +10:00
bors-servo
16bdf9225d
Auto merge of #21088 - emilio:gecko-sync, r=emilio
style: Import changes from mozilla-central.

See each individual commit for details.
2018-06-23 14:43:07 -04:00
Emilio Cobos Álvarez
895946bb18
layout: script: Fix build. 2018-06-23 20:34:10 +02:00
Emilio Cobos Álvarez
750c223021
style: Fix tidy. 2018-06-23 20:34:10 +02:00
Emilio Cobos Álvarez
fc4998367b
style: Fix / remove unit tests.
Unit tests removed have WPT equivalents.
2018-06-23 20:34:10 +02:00
Emilio Cobos Álvarez
26720e10a9
style: Fix servo build. 2018-06-23 20:34:10 +02:00
Emilio Cobos Álvarez
82db42390d
style: Better debugging for media-query related code and ua-cache.
Bug: 1470145
Reviewed-by: xidorn
MozReview-Commit-ID: 3XHAxK2BOTS
2018-06-23 20:37:16 +02:00
Emilio Cobos Álvarez
f564b32b75
style: Better debugging for stylesheets and URLs.
Bug: 1470145
Reviewed-by: xidorn
MozReview-Commit-ID: FIcz2K1ZYX0
2018-06-23 20:37:03 +02:00
Nicholas Nethercote
46e572a497
Store nsDynamicAtom's chars after the end of the object.
This reduces memory usage because we only need one allocation instead of two
for the dynamic atom and its chars, and because we don't need to store a
refcount and a size. It precludes sharing of chars between dynamic atoms, but
we weren't benefiting much from that anyway.

This reduces per-process memory usage by up to several hundred KiB on my
Linux64 box.

One consequence of this change is that we need to allocate + copy in
DOMString::SetKnownLiveAtom(), which could make some things slower.

Bug: 1447951
Reviewed-by: froydnj
2018-06-23 20:36:41 +02:00
Emilio Cobos Álvarez
ce7b6616fb
style: Fix a typo in stylesheet cloning.
Summary: Just something I noticed while writing unrelated code.

Reviewers: jwatt

Bug #: 1470105

Differential Revision: https://phabricator.services.mozilla.com/D1747

MozReview-Commit-ID: 7KMTT9Kmdwc
2018-06-23 20:36:32 +02:00
Emilio Cobos Álvarez
3a0c3224b9
style: Move the error reporter into ParserContext.
Summary:
This should make it easier to report errors, and also reduce codesize.

The reason this was so generic is that error reporting was unconditionally
enabled and was super-hot, but now that's no longer the case after bug 1452143,
so we can afford the virtual call in the "error reporting enabled" case.

This opens the possibility of simplifying a lot the error setup as well, though
this patch doesn't do it.

Test Plan: No behavior change, so no new tests.

Reviewers: xidorn

Bug #: 1469957

Differential Revision: https://phabricator.services.mozilla.com/D1734

MozReview-Commit-ID: F3wTdhX9MB5
2018-06-23 20:36:23 +02:00
Emilio Cobos Álvarez
bab7be63b2
style: Fix windows build bustage.
Bug: 1468651
MozReview-Commit-ID: 9Xj5lMFG4Ab
2018-06-23 20:36:13 +02:00
Emilio Cobos Álvarez
202ec8a8c8
style: Generate different files for different structs.
Bug: 1468651
Reviewed-by: heycam
MozReview-Commit-ID: KEDJ1zJVwMx
2018-06-23 20:36:02 +02:00
Emilio Cobos Álvarez
a4dcb33986
style: Make StyleStruct.name_lower snake case.
Bug: 1468651
Reviewed-by: heycam
MozReview-Commit-ID: A3TpDTmFgF
2018-06-23 20:35:49 +02:00
Emilio Cobos Álvarez
4571a71bfc
style: Rename mask.mako.rs to svg.mako.rs for consistency.
Bug: 1468651
Reviewed-by: heycam
MozReview-Commit-ID: 6sqGxL8hhA0
2018-06-23 20:35:37 +02:00
Emilio Cobos Álvarez
0a95513368
style: Rename the properties directories from "shorthand" to "shorthands", "longhand" to "longhands".
Bug: 1468651
Reviewed-by: heycam
MozReview-Commit-ID: CY4THCC4zkX
2018-06-23 20:35:18 +02:00
Emilio Cobos Álvarez
5c15c59f56
style: remove shorthand/serialize.mako.rs.
Bug: 1468651
Reviewed-by: heycam
MozReview-Commit-ID: 8Xyep2Q7trR
2018-06-23 20:35:03 +02:00
Emilio Cobos Álvarez
3b90ddd5d1
style: Fix the broken invariants of the rule node cache.
We were spuriously reframing the <shadow> because it initially shared style with
the <br>, which ended up being display: none, while the <shadow> should've been
display: contents from the beginning.

lookup_by_rules seems pretty prone to obscure bugs, and also it's pretty
complex... Probably we should try to get rid of it, I'm unconvinced that it's
worth it.

Even with that, in a normal restyle the <details> wouldn't have ended up with a
style. It of course never had it before the reframe because the <shadow> was
display: none, but that doesn't mean it shouldn't have gotten one, since we
detected we needed to go through kids in:

  https://searchfox.org/mozilla-central/rev/6eea08365e7386a2b81c044e7cc8a3daa51d8754/servo/components/style/matching.rs#500

That code did happen, but since it's an animation-only restyle, we don't look at
unstyled stuff.

That looks somewhat fishy, but I guess for now it's fine as long as display
isn't animatable.

Bug: 1469076
Reviewed-by: heycam
MozReview-Commit-ID: B6NMSTNOKgK
2018-06-23 20:34:50 +02:00
Xidorn Quan
8db8f95f1f
style: Add scrollcorner to -moz-appearance so that widget can render it.
Bug: 1463917
Reviewed-by: heycam
MozReview-Commit-ID: 1Za22ifONfG
2018-06-23 20:34:26 +02:00
Emilio Cobos Álvarez
e6f9ad0edb
style: Don't call the before change closure with the locked declaration block.
Test Plan: No behavior change.

Reviewers: xidorn

Bug #: 1468665

Differential Revision: https://phabricator.services.mozilla.com/D1681
2018-06-23 20:34:14 +02:00
Emilio Cobos Álvarez
00b42fc6ef
style: Remove some cfgs. 2018-06-23 20:34:10 +02:00
bors-servo
d70e131247
Auto merge of #21079 - gterzian:fix_cache_refresh, r=jdm
Handle case of refreshed cache entry still receiving data

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

When refreshing cached entries, handle the case the the entry is still "receiving"...

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #20802 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/21079)
<!-- Reviewable:end -->
2018-06-23 10:16:00 -04:00
Gregory Terzian
96c124230b Ensure done_chan is Some, when refreshing a still receiving resource 2018-06-23 16:49:50 +08:00
bors-servo
920ea9fb17
Auto merge of #21086 - servo-wpt-sync:wpt_update_22-06-2018, r=jdm
Sync WPT with upstream (22-06-2018)

Automated downstream sync of changes from upstream as of 22-06-2018.
[no-wpt-sync]

<!-- 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/21086)
<!-- Reviewable:end -->
2018-06-22 22:48:54 -04:00
WPT Sync Bot
8c46b67f8e Update web-platform-tests to revision 4333a1d2f109795547fc5e22ebfc8481fa649de7 2018-06-22 22:44:39 -04:00
bors-servo
728ebcc932
Auto merge of #21080 - servo:webgl, r=emilio
Implement EXT_blend_minmax

<!-- 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/21080)
<!-- Reviewable:end -->
2018-06-22 08:11:33 -04:00
Anthony Ramine
02b8766e75 Implement EXT_blend_minmax 2018-06-22 14:10:56 +02:00
bors-servo
6a4bd8d3fa
Auto merge of #21081 - servo:lod, r=emilio
Properly enable EXT_shader_texture_lod

<!-- 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/21081)
<!-- Reviewable:end -->
2018-06-22 06:52:37 -04:00
Anthony Ramine
124fe69818 Properly enable EXT_shader_texture_lod 2018-06-22 12:20:22 +02:00
bors-servo
388a6f80ac
Auto merge of #21074 - jonathanKingston:toggle-attribute, r=Manishearth
Implement support for Element.toggleAttribute

Copy implementation following from [Firefox implementation](https://bugzilla.mozilla.org/show_bug.cgi?id=1469592) of soon to be standardised [Element.toggleAttribute](https://github.com/whatwg/dom/pull/656). [Other implementers agreed to ship](https://github.com/whatwg/dom/issues/461)

---
<!-- 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
- [ ] These changes don't fix an issue however the wpt-tests will merge soon and will cause an issue etc.

<!-- Either: -->
- [X] There are tests for these changes **(coming soon in wpt from Firefox and I tested them on this patch)**

<!-- 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/21074)
<!-- Reviewable:end -->
2018-06-21 03:54:23 -04:00
Jonathan Kingston
a271c615f7 Implement support for Element.toggleAttribute 2018-06-21 02:06:32 +01:00
OJ Kwon
c20efd5e9a
build(mach): locate vs via vswhere on win32 2018-06-20 11:30:58 -07:00
bors-servo
8f84f893a7
Auto merge of #21072 - servo:webgl, r=emilio
Implement checks for vertex attribs enabled as arrays without a bound buffer

<!-- 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/21072)
<!-- Reviewable:end -->
2018-06-20 10:19:38 -04:00
Anthony Ramine
fc3dd7cefc Implement checks for vertex attribs enabled as arrays without a bound buffer 2018-06-20 15:59:06 +02:00
Glenn Watson
2d4b223cf4 Update to WR with text snapping fix. 2018-06-20 10:34:51 +10:00
bors-servo
132bf17e87
Auto merge of #21071 - jdm:mozjs-android, r=ajeffrey
Update mozjs_sys to include cross-compilation fixes.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20958

<!-- 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/21071)
<!-- Reviewable:end -->
2018-06-19 20:25:27 -04:00
Martin Robinson
01c0e2aba0 Changes for separate reference frame PR (#2756) 2018-06-20 09:43:51 +10:00
bors-servo
7f745139a7
Auto merge of #21056 - tigercosmos:ttt, r=jdm
improve test-tidy

check wpt manifest when run tidy

If CI has already run `test-tidy`, and then no need to run `etc/ci/manifest_changed.sh`

<!-- 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/21056)
<!-- Reviewable:end -->
2018-06-19 19:33:01 -04:00
Glenn Watson
823f3e2eb1 Update WR (transaction API change) 2018-06-20 09:15:31 +10:00
bors-servo
e231a68acf
Auto merge of #21050 - jonathanKingston:fix-replacability-of-window-attrs, r=jdm
Allow supported window attributes to be replacable.

As seen in https://github.com/servo/servo/pull/21045 some Window attributes don't support JavaScript from being able to shadow and replace their values.

This PR adds all other attributes I could find that are supported by servo to be replaceable.

---
<!-- 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

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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/21050)
<!-- Reviewable:end -->
2018-06-19 18:11:06 -04:00
Josh Matthews
2544db1e79 Update mozjs_sys to include cross-compilation fixes. 2018-06-19 17:08:15 -04:00
bors-servo
c2d3f2a40f
Auto merge of #20421 - talklittle:issue-20219, r=jdm
mach: android install/run: infer adb path from SDK dir

<!-- Please describe your changes on the following line: -->
Infer Android `adb` path from SDK directory in environment variables.

---
<!-- 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 #20219 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it is a build script change

<!-- 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/20421)
<!-- Reviewable:end -->
2018-06-19 16:37:16 -04:00