Commit graph

33063 commits

Author SHA1 Message Date
bors-servo
1d8fd8f863
Auto merge of #20661 - cbrewster:history_state_discard, r=asajeffrey
Remove insaccessible history states

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

---
<!-- 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 build-geckolib` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #__ (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/20661)
<!-- Reviewable:end -->
2018-04-19 17:39:44 -04:00
bors-servo
89bf7c2a92
Auto merge of #20658 - kvark:deglify, r=emilio
Make gleam optional for compositor, switch various names from glutin to winit

<!-- Please describe your changes on the following line: -->
The PR goes an extra step towards discriminating GL to a level of an optional dependency. This would ease up the transition to gfx-hal when the time calls for it, and upstreams some of the patches we've been using locally, cleans up some of the old cruft along the way.

---
<!-- 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 build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20612

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

<!-- 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/20658)
<!-- Reviewable:end -->
2018-04-19 16:18:14 -04:00
bors-servo
319de3b0fe
Auto merge of #20578 - kwonoj:refactor-bluetooth-manager, r=paulrouget
refactor(bluetooth): removes direct ui invocation from bluetooth thread

<!-- Please describe your changes on the following line: -->
Relates to #20429.

This PR is mostly blocked by https://github.com/servo/servo/pull/20480, cause both are nearly identical change in crux and based on review of prior changes this PR need to be updated. Just didn't want assigned issue hanging without visible progresses, so prepped PR to followup further.

(mostly copy-paste from pair PR)

Probably point of review / need to be updated are

1. Communication between components
Currently it's wired as like below:
```
+----------------+                    +---------------+              +---------+
|                |  constellationMsg  |               | embedderMsg  |         |
| bluetooth_thread +----------------->+ constellation +------------->+ browser |
|                |                    |               |              |         |
+-----+----------+                    +---------------+              +----+----+
      ^                                                                   |
      +-------------------------------------------------------------------+
                                device: String
```
- is this feasible approach?
- does organization of message / fn (where to put consteallation / embedder msg & fns) are legit?

2. Invoking tfd in a separate thread
- This was mainly to align behavior to previous implentation, where tfd was invoked inside of filemanager_thread so does not block main. It may possibly just let block instead.

and of course, a lot of other codes need to follow better practices.

---
<!-- 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
- [ ] `./mach build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20429 (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/20578)
<!-- Reviewable:end -->
2018-04-19 15:11:20 -04:00
bors-servo
3c5f0a85de
Auto merge of #20453 - talklittle:issue-19157, r=cbrewster
History: update document URL on pushState/replaceState

<!-- Please describe your changes on the following line: -->
Update Document URL when calling pushState and replaceState on History.

https://html.spec.whatwg.org/multipage/#dom-history-pushstate
Steps 6, 7, 10

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

<!-- Either: -->
- [x] 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/20453)
<!-- Reviewable:end -->
2018-04-19 12:29:44 -04:00
Simon Sapin
e7e52d855b Fix building servo_url by itself
Fix #20664
2018-04-19 17:01:14 +02:00
Dzmitry Malyshau
7af725bff0 Small key utils refactor 2018-04-19 08:53:00 -04:00
Dzmitry Malyshau
7fa295d8e6 Make gleam optional for compositor, switch various names from glutin to winit 2018-04-18 22:40:47 -04:00
Andrew Shu
68c4791c7d History: update document URL on pushState/replaceState
https://html.spec.whatwg.org/multipage/#dom-history-pushstate
Steps 6, 7, 10
2018-04-18 17:18:48 -07:00
OJ Kwon
61b4a891bb
refactor(bluetooth): uses embedderproxy directly 2018-04-18 11:39:33 -07:00
OJ Kwon
5574b42126
feat(constellation): add handler for scriptmsg 2018-04-18 11:39:33 -07:00
OJ Kwon
6fa74133dd
refactor(bluetooth): send message to open select dialog 2018-04-18 11:39:33 -07:00
OJ Kwon
410cf63a8e
refactor(bluetooth): factory fn returns constellation channel 2018-04-18 11:39:32 -07:00
OJ Kwon
c2161da3ca
feat(browser): implement device select dialog 2018-04-18 11:39:32 -07:00
OJ Kwon
a352dcc145
refactor(constellation): add handler for new scriptmsg 2018-04-18 11:39:32 -07:00
OJ Kwon
c141090d61
feat(constellation): expose msg for bluetooth thread 2018-04-18 11:39:31 -07:00
bors-servo
3695fc4efc
Auto merge of #20662 - mbrubeck:smallbitvec, r=nox
Update to smallbitvec 2.1

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because covered by existing 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/20662)
<!-- Reviewable:end -->
2018-04-18 03:04:10 -04:00
bors-servo
b182d7c2ea
Auto merge of #20648 - mattnenterprise:aliased-line-width-range, r=nox
Implement gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE)

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

Implement gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE)

---
<!-- 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 build-geckolib` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #20535

<!-- 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/20648)
<!-- Reviewable:end -->
2018-04-18 02:05:35 -04:00
Matt McCoy
36c0e387dd Implement gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE) 2018-04-17 20:44:35 -04:00
Matt Brubeck
e3f79d9130 Update to smallbitvec 2.1 2018-04-17 17:24:54 -07:00
Connor Brewster
c08ad45681 Remove insaccessible history states 2018-04-17 19:21:51 -05:00
bors-servo
087bd20b6d
Auto merge of #20657 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central.

See each individual commit from details.
2018-04-17 14:06:08 -04:00
Emilio Cobos Álvarez
a82ed50257
style: Fix build after 1bc30a6732. 2018-04-17 20:03:55 +02:00
Emilio Cobos Álvarez
827b82dc39
style: Fix build bustage after afe484e46b. 2018-04-17 20:02:58 +02:00
Emilio Cobos Álvarez
f5c85a816a
style: Remove an unused import. 2018-04-17 20:02:33 +02:00
Emilio Cobos Álvarez
376aafc2c8
style: Update bindings. 2018-04-17 20:02:33 +02:00
Xidorn Quan
b11c3f1f45
style: Remove trailing underscore of float ident.
Bug: 1454528
Reviewed-by: heycam
MozReview-Commit-ID: DN7rQu3adSB
2018-04-17 20:02:16 +02:00
Emilio Cobos Álvarez
1bc30a6732
style: Move unboxing to style, and handle display: contents before other suppressions.
This also adopts the resolution of [1] while at it, and switches XUL to not
support display: contents until a use case appears.

This makes our behavior consistent both with the spec and also in terms of
handling dynamic changes to stuff that would otherwise get suppressed.

Also makes us consistent with both Blink and WebKit in terms of computed style.
We were the only ones respecting "behaves as display: none" without actually
computing to display: none. Will file a spec issue to get that changed.

It also makes us match Blink and WebKit in terms of respecting display: contents
before other suppressions, see the reftest which I didn't write as a WPT
(because there's no spec supporting neither that or the opposite of what we do),
where a <g> element respects display: contents even though if it had any other
kind of display value we'd suppress the frame for it and all the descendants
since it's an SVG element in a non-SVG subtree.

Also, this removes the page-break bit from the display: contents loop, which I
think is harmless.

As long as the tests under style are based in namespace id / node name /
traversal parent, this should not make style sharing go wrong in any way, since
that's the first style sharing check we do at [2].

The general idea under this change is making all nodes with computed style of
display: contents actually honor it. Otherwise there's no way of making the
setup sound except re-introducing something similar to all the state tracking
removed in bug 1303605.

[1]: https://github.com/w3c/csswg-drafts/issues/2167
[2]: https://searchfox.org/mozilla-central/rev/fca4426325624fecbd493c31389721513fc49fef/servo/components/style/sharing/mod.rs#700

Bug: 1453702
Reviewed-by: mats, xidorn
MozReview-Commit-ID: JoCKnGYEleD
2018-04-17 20:01:46 +02:00
Bobby Holley
afe484e46b
style: Allow placeholder import sheets.
This is necessary because we can't create GeckoStyleSheets off-main-thread,
so we need a placeholder until it can be filled in.

Bug: 1454030
Reviewed-by: emilio
MozReview-Commit-ID: ssRme4fLYg
2018-04-17 20:01:27 +02:00
bors-servo
5081755418
Auto merge of #20656 - jwatt:patch-1, r=nox
Fix error name in comment for try_match_ident_ignore_ascii_case

Trivial spelling error fix.

<!-- 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/20656)
<!-- Reviewable:end -->
2018-04-17 08:32:39 -04:00
Jonathan Watt
ccbd84886b
Fix error name in comment for try_match_ident_ignore_ascii_case 2018-04-17 13:24:30 +01:00
bors-servo
be4ac6c4cd
Auto merge of #20647 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central.

Se each individual commit for details.

<!-- 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/20647)
<!-- Reviewable:end -->
2018-04-16 14:34:40 -04:00
Xidorn Quan
7403ec8b70
style: Support prefs for aliases.
Bug: 1453521
Reviewed-by: heycam
MozReview-Commit-ID: 8DAFmLDVYlR
2018-04-16 20:15:13 +02:00
bors-servo
441f1cd231
Auto merge of #20646 - servo:webgl, r=emilio
Some drive-by error condition fix for gl.drawElements

<!-- 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/20646)
<!-- Reviewable:end -->
2018-04-16 12:43:33 -04:00
bors-servo
11733d3d8a
Auto merge of #20638 - cbrewster:history_state, r=asajeffrey
Implement History State

<!-- Please describe your changes on the following line: -->
This just handles history states in the session history. URL handling and hashchange events still nee to be implemented.

---
<!-- 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 build-geckolib` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #19156 (github issue number if applicable).

<!-- Either: -->
- [X] 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/20638)
<!-- Reviewable:end -->
2018-04-16 11:21:41 -04:00
Connor Brewster
17bd80a7b1 Implement history state 2018-04-16 10:21:15 -05:00
Anthony Ramine
d16a73001f Check the bound buffer element array only for count > 0 in gl.drawElements
See https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.2
2018-04-16 16:23:13 +02:00
Anthony Ramine
7f1590dac0 Check mode first in gl.drawElements 2018-04-16 16:23:07 +02:00
bors-servo
1c9bbce38c
Auto merge of #20641 - servo:alloc, r=nox
Fork the jemallocator crate, fix for nightly-2018-04-15

CC https://github.com/alexcrichton/jemallocator/pull/40, https://github.com/rust-lang/rust/pull/49669

The new version of jemallocator requires a more recent jemalloc https://github.com/alexcrichton/jemallocator/pull/34 which doesn’t build on our current Android toolchain https://github.com/jemalloc/jemalloc/issues/1175.

To avoid blocking on figuring that out, duplicate ~70 lines from jemallocator and use the older jemalloc-sys directly.

<!-- 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/20641)
<!-- Reviewable:end -->
2018-04-16 04:10:27 -04:00
Simon Sapin
7dbc524207 Fork the jemallocator crate, fix for nightly-2018-04-15
CC https://github.com/alexcrichton/jemallocator/pull/40,
https://github.com/rust-lang/rust/pull/49669

The new version of jemallocator requires a more recent jemalloc
https://github.com/alexcrichton/jemallocator/pull/34
which doesn’t build on our current Android toolchain
https://github.com/jemalloc/jemalloc/issues/1175.

To avoid blocking on figuring that out, duplicate ~70 lines
from jemallocator and use the older jemalloc-sys directly.
2018-04-16 08:56:08 +02:00
bors-servo
1fe0f32059
Auto merge of #20639 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central.

See each commit for details.
2018-04-15 08:31:39 -04:00
Kerem Kat
f5badf5400
style: Implement ServoStyleRule::SetSelectorText.
Bug: 37468
Reviewed-by: xidorn
2018-04-15 14:20:56 +02:00
bors-servo
d8dfa98970
Auto merge of #20637 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central.

See individual commits for details.
2018-04-14 15:22:42 -04:00
Emilio Cobos Álvarez
0d15ab17d3
style: Update binidngs. 2018-04-14 21:15:44 +02:00
Emilio Cobos Álvarez
3ef77f59d8
style: Fix IsInAnonymousSubtree to account for XBL in Shadow DOM.
Bug: 1453206
Reviewed-by: smaug
MozReview-Commit-ID: B2aYury8K7i
2018-04-14 21:15:44 +02:00
Jonathan Watt
245d848508
style: Use a user defined type for font weight everywhere.
Bug: 1436048
Reviewed-by: emilio
2018-04-14 21:15:43 +02:00
Bobby Holley
156ef81878
nsstring: Make ns{,C}String Sync/Send.
Bug: 1454021
Reviewed-by: mystor
MozReview-Commit-ID: DeBOgxxTvBR
2018-04-14 21:15:43 +02:00
bors-servo
e4472f7c1f
Auto merge of #20629 - cbrewster:session_history_fixup, r=asajeffrey
Session history fixup

<!-- Please describe your changes on the following line: -->
When a browsing context was removed, its entries were not removed from the joint session history.
The embedder should be notified that the history changed after a navigation matures.

---
<!-- 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 build-geckolib` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [X] 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/20629)
<!-- Reviewable:end -->
2018-04-12 12:33:06 -04:00
Connor Brewster
787ec4b209 Remove entries for removed iframes
Notify history changed after a navigation

Add history drop test
2018-04-12 11:30:57 -05:00
bors-servo
e0ea9e17af
Auto merge of #20627 - emilio:overflow-shorthand, r=xidorn
style: Let overflow parse two values.

Per https://github.com/w3c/csswg-drafts/issues/2484.

Bug: 1453148
Reviewed-by: xidorn
MozReview-Commit-ID: D7M3PhnTtD2

<!-- 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/20627)
<!-- Reviewable:end -->
2018-04-12 04:44:59 -04:00
Emilio Cobos Álvarez
061c87ad00
style: Let overflow parse two values.
Per https://github.com/w3c/csswg-drafts/issues/2484.

Bug: 1453148
Reviewed-by: xidorn
MozReview-Commit-ID: D7M3PhnTtD2
2018-04-12 10:44:38 +02:00