Commit graph

33989 commits

Author SHA1 Message Date
Cameron McCormack
f86e9a411a
style: Remove support for multiple static atom sources.
Differential Revision: https://phabricator.services.mozilla.com/D3285
2018-08-18 17:54:54 +02:00
Cameron McCormack
f75419dd7a
style: Move CSS anonymous box atoms to nsGkAtoms.
Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-18 17:54:54 +02:00
Cameron McCormack
99a292dd6d
style: Move CSS pseudo-element atoms to nsGkAtoms.
Differential Revision: https://phabricator.services.mozilla.com/D3283
2018-08-18 17:54:54 +02:00
Cameron McCormack
cc3c059bfc
style: Define atom type in nsGkAtomList.h.
Differential Revision: https://phabricator.services.mozilla.com/D3282
2018-08-18 17:54:54 +02:00
Nathan Froyd
064252437b
style: remove unused kernel32-sys dependency from style.
Bug: 1483344
Reviewed-by: emilio
2018-08-18 17:49:21 +02:00
Henri Sivonen
0ec5db90a6
Use encoding_rs for XPCOM string encoding conversions.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

Bug: 1402247
Reviewed-by: Nika,erahm,froydnj
2018-08-18 17:48:29 +02:00
Xidorn Quan
916dc79dc9
style: Rename StyleUserInterface to StyleUI.
Differential Revision: https://phabricator.services.mozilla.com/D3276
2018-08-18 17:48:22 +02:00
WPT Sync Bot
0114122fe0 Update web-platform-tests to revision 6c2d23b1b5e4dc00c944eedd16a11850e74a2d11 2018-08-18 15:48:20 +00:00
Cameron McCormack
e305b5a1f8
style: Remove unused BorrowedAtom.
Differential Revision: https://phabricator.services.mozilla.com/D3159
2018-08-18 17:48:12 +02:00
L. David Baron
9206283f7e
style: Swap order of values in 'overflow' shorthand property.
Differential Revision: https://phabricator.services.mozilla.com/D3069
2018-08-18 17:48:02 +02:00
Xidorn Quan
f14a3edd7d
style: Use function pointer rather than Fn trait object for collect_property_completion_keywords.
Differential Revision: https://phabricator.services.mozilla.com/D2985
2018-08-18 17:47:56 +02:00
Xidorn Quan
c77ecd6984
style: Implement flow-relative values for resize property.
Differential Revision: https://phabricator.services.mozilla.com/D2908
2018-08-18 17:47:51 +02:00
Xidorn Quan
5299ce31aa
style: Make several more specified values Copy.
Differential Revision: https://phabricator.services.mozilla.com/D2932
2018-08-18 17:47:44 +02:00
Xidorn Quan
e22850dc85
style: Add check for non-Copy specified value to ensure specified_is_copy always returns the right result.
Differential Revision: https://phabricator.services.mozilla.com/D2931
2018-08-18 17:47:37 +02:00
Xidorn Quan
e7945bbfcb
style: Put overflow: -moz-scrollbar-* behind pref.
Differential Revision: https://phabricator.services.mozilla.com/D2845
2018-08-18 17:47:30 +02:00
Boris Chiou
c87668fcd5
style: Use union to wrap different shape-like types. r=xidorn
1. We will add more shape-like types in the future, so it's better to
   use union to reduce the memory usage.
2. Those shape-like types are mutual exclusive, so we could use union to
   wrap them.

Differential Revision: https://phabricator.services.mozilla.com/D2746
2018-08-18 17:47:24 +02:00
Craig Disselkoen
d0a686a459 README: clarify Mac keyboard shortcuts 2018-08-17 10:47:21 -07:00
Carlo Abelli
9b4017e1e0 Fix Android back button behavior
Pressing the back button should call mServoView.goBack if possible.
2018-08-17 09:38:05 -04:00
bors-servo
ad83faa745
Auto merge of #21442 - kingdido999:rustfmt/bluetooth, r=jdm
Format components bluetooth and bluetooth_traits

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

```bash
rustfmt components/bluetooth/*.rs
rustfmt components/bluetooth_traits/*.rs
```
---
<!-- 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 a part of #21373 .
- [x] These changes do not require tests because it's code format 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/21442)
<!-- Reviewable:end -->
2018-08-17 03:14:56 -04:00
bors-servo
471dff5e21
Auto merge of #21441 - servo-wpt-sync:wpt_update_16-08-2018, r=jdm
Sync WPT with upstream (16-08-2018)

Automated downstream sync of changes from upstream as of 16-08-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/21441)
<!-- Reviewable:end -->
2018-08-17 02:11:38 -04:00
bors-servo
8bf62e5ef4
Auto merge of #21440 - kingdido999:rustfmt/atoms, r=jdm
Format components atoms

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

```bash
rustfmt components/atoms/*.rs
```

---
<!-- 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 a part of #21373 .
- [x] These changes do not require tests because it's code format 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/21440)
<!-- Reviewable:end -->
2018-08-17 01:24:39 -04:00
bors-servo
abb83a3dbd
Auto merge of #21422 - servo:jdm-patch-13, r=jdm
Add macOS gstreamer setup

This was obtained from the gstreamer website rather than looking for a minimal set of install targets.

<!-- 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/21422)
<!-- Reviewable:end -->
2018-08-17 00:36:30 -04:00
kingdido999
0e3131a54c Format component bluetooth_traits 2018-08-17 11:09:38 +08:00
kingdido999
949e50d662 Format component bluetooth 2018-08-17 11:08:56 +08:00
WPT Sync Bot
8edc7686ef Update web-platform-tests to revision 2dda7b8c10c7566fa6167a32b09c85d51baf2a85 2018-08-16 22:42:22 -04:00
kingdido999
8badac82db Format components atoms #21373 2018-08-17 09:12:29 +08:00
bors-servo
25ebde78aa
Auto merge of #21428 - kingdido999:rustfmt/allocator, r=jdm
Format component allocator

<!-- Please describe your changes on the following line: -->
Format `components/allocator` with:

```bash
rustfmt components/allocator/*.rs
```

---
<!-- 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. Waiting for #21423 to be resolved.
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix a part of #21373.
- [x] These changes do not require tests because they format the code only.

<!-- 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/21428)
<!-- Reviewable:end -->
2018-08-16 16:43:23 -04:00
bors-servo
173c204c4a
Auto merge of #21437 - servo:jdm-patch-20, r=mbrubeck
Add gstreamer instructions for windows.

<!-- 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/21437)
<!-- Reviewable:end -->
2018-08-16 13:23:14 -04:00
bors-servo
14fff5bbe0
Auto merge of #21431 - paulrouget:pinchtozoom, r=jdm
Pinch to zoom

Implement pinch to zoom.

Also, I added a marker in the toolbar to show if Servo is redrawing or not.

The label switches from "IDLE" to "LOOP" when Servo is looping (at 60FPS) to redraw the page.

Redrawing is necessary for 3 reasons:
- a CSS animation is ongoing
- scrolling
- zooming

This label is, for now, necessary to make sure we are not looping for not reason.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21303 (github issue number if applicable).

<!-- 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/21431)
<!-- Reviewable:end -->
2018-08-16 12:29:50 -04:00
Josh Matthews
fab6bb858c
Include link to recommended steps. 2018-08-16 08:20:58 -07:00
bors-servo
5da5ede9c7
Auto merge of #21427 - paulrouget:gstreamer-instructions-update, r=jdm
More gstreamer dependencies

Was running into this issue:

```
error: failed to run custom build command for `gstreamer-player-sys v0.5.0`
process didn't exit successfully: `/home/paul/git/servo/target/debug/build/gstreamer-player-sys-3591c80c70153c3c/build-script-build` (exit code: 1)
--- stderr
`"pkg-config" "--libs" "--cflags" "gstreamer-player-1.0 >= 1.12"` did not exit successfully: exit code: 1
--- stderr
Package gstreamer-player-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-player-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-player-1.0' found
```

<!-- 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/21427)
<!-- Reviewable:end -->
2018-08-16 11:14:43 -04:00
Bastien Orivel
a1925aab52 Properly set the origin on websocket messages 2018-08-16 16:53:38 +02:00
bors-servo
cfae377660
Auto merge of #21436 - Eijebong:ws-protocols, r=jdm
The WS protocols should be case sensitive, not insensitive

<!-- 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/21436)
<!-- Reviewable:end -->
2018-08-16 10:19:20 -04:00
Josh Matthews
12436047cb
Add gstreamer instructions for windows. 2018-08-16 07:14:17 -07:00
Bastien Orivel
75c746655c The WS protocols should be case sensitive, not insensitive 2018-08-16 15:50:50 +02:00
Josh Matthews
9ee7860665
Remove warnings about WPT syncing process. 2018-08-16 06:44:40 -07:00
Josh Matthews
53f2a2a446
Clean more build artifacts. 2018-08-16 06:38:55 -07:00
Paul Rouget
6aa653a46d Show animation status 2018-08-16 13:51:57 +02:00
Paul Rouget
296b76070c pinch to zoom 2018-08-16 13:51:57 +02:00
Pyfisch
1c438ed82c Do not emit DL items for zero images
Fixes wpt test failure.
2018-08-16 12:41:37 +02:00
Paul Rouget
a04fe144c7 More gstreamer dependencies 2018-08-16 17:16:56 +08:00
kingdido999
b25a01f492 Format component allocator #21373 2018-08-16 15:44:54 +08:00
bors-servo
83ade0c0b8
Auto merge of #21425 - servo-wpt-sync:wpt_update_15-08-2018, r=jdm
Sync WPT with upstream (15-08-2018)

Automated downstream sync of changes from upstream as of 15-08-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/21425)
<!-- Reviewable:end -->
2018-08-16 02:01:22 -04:00
bors-servo
89ab110357
Auto merge of #21424 - Eijebong:we-secure-now, r=jdm
Handle secure websockets

Fixes #20816

<!-- 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/21424)
<!-- Reviewable:end -->
2018-08-16 00:58:40 -04:00
WPT Sync Bot
2f89d25484 Update web-platform-tests to revision af43e2eb32555059316b67fba4a1d7df6ea3148d 2018-08-15 22:56:42 -04:00
Bastien Orivel
73ef02ff17 Handle secure websockets
Fixes #20816
2018-08-16 00:24:19 +02:00
bors-servo
97c6246385
Auto merge of #21386 - Eijebong:remove-websocket, r=jdm
Replace servo-websocket by ws

This is heavily based on previous work done in #16012.

Fixes #14517

<!-- 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/21386)
<!-- Reviewable:end -->
2018-08-15 14:54:32 -04:00
bors-servo
2ed30c5951
Auto merge of #21421 - servo:jdm-patch-10, r=mbrubeck
Add configuration for using ./wpt serve

This allows running `./wpt serve --alias_file ../aliases` to replicate Servo's multiple document root setup when running tests in other browsers.

<!-- 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/21421)
<!-- Reviewable:end -->
2018-08-15 13:36:31 -04:00
Bastien Orivel
2e11bc10fb Replace servo-websocket by ws
This is heavily based on previous work done in #16012.

Fixes #14517
2018-08-15 16:53:48 +02:00
bors-servo
71b67d8f94
Auto merge of #21420 - gootorov:gstreamer-gentoo, r=jdm
Add needed gstreamer packages for Gentoo build

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

r? @jdm

---
<!-- 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 #21418
- [x] These changes do not require tests because: docs

<!-- 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/21420)
<!-- Reviewable:end -->
2018-08-15 10:13:46 -04:00