Commit graph

33063 commits

Author SHA1 Message Date
bors-servo
c20d0c00d7
Auto merge of #20375 - servo:webgl, r=emilio
Fall down the WebGL rabbit hole and fix some bugs there

<!-- 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/20375)
<!-- Reviewable:end -->
2018-03-22 15:32:45 -04:00
Nakul Jindal
7d4e2b11e9 Implements profiler for blocked recv 2018-03-22 11:48:27 -07:00
Josh Matthews
391d0626db Workaround #20149 - presumed rustc bug on android. 2018-03-22 14:27:52 -04:00
Anthony Ramine
c033b48def Don't disable canvas3d tests involving CSS transforms (fixes #8766)
Those don't seem to be intermittent anymore, and it's better to let
the intermittent tracker do its job anyway.
2018-03-22 19:17:36 +01:00
Anthony Ramine
e34b19c42c Implement gl.getParameter(gl.VIEWPORT) 2018-03-22 19:17:36 +01:00
Anthony Ramine
cb6fa6e6b0 Implement gl.getParameter(gl.CURRENT_PROGRAM) 2018-03-22 19:17:35 +01:00
Anthony Ramine
f532e79dc1 Make some WebGL parameters non-optional (fixes #8753)
Those parameters aren't optional in the current spec.

The test element-array-buffer-delete-recreate.html now fails because we don't
actually implement gl.getParameter(gl.CURRENT_PROGRAM).
2018-03-22 19:17:35 +01:00
Anthony Ramine
3229c62282 Implement a missing INVALID_OPERATION check in DrawArrays 2018-03-22 18:51:58 +01:00
Anthony Ramine
2a9c2bc8fd Fix an off-by-one error with limits.max_vertex_attribs 2018-03-22 18:51:58 +01:00
bors-servo
563f0ec824
Auto merge of #20386 - emilio:computed-style-rename, r=jwatt
style: Rename StyleContext to ComputedStyle.

Bug: 1447483
Reviewed-by: jwatt
MozReview-Commit-ID: KATZ6DkmpVY

<!-- 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/20386)
<!-- Reviewable:end -->
2018-03-22 13:48:24 -04:00
Christian Poveda
723e03ef01 getRandomValues uses ArrayBufferView now 2018-03-22 12:12:16 -05:00
Emilio Cobos Álvarez
4c6d1321ec
style: Update bindings.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2018-03-22 18:04:29 +01:00
Emilio Cobos Álvarez
bd70c405b4
style: Rename StyleContext to ComputedStyle.
Bug: 1447483
Reviewed-by: jwatt
MozReview-Commit-ID: KATZ6DkmpVY
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2018-03-22 18:04:29 +01:00
bors-servo
4aaac61a87
Auto merge of #20317 - gootorov:webgl-getFramebufferAttachmentParameter, r=jdm
Implement WebGL getFrameBufferAttachmentParameter API

<!-- Please describe your changes on the following line: -->
Implementation of `getFramebufferAttachmentParameter` as in WebGL1 specification.

Part of https://github.com/servo/servo/issues/10209.

r? emilio or 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- 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/20317)
<!-- Reviewable:end -->
2018-03-22 12:28:30 -04:00
Igor Gutorov
ee5bdbbd8b Implement WebGL getFramebufferAttachmentParameter API 2018-03-22 18:26:18 +02:00
bors-servo
2de89377db
Auto merge of #20228 - paulrouget:ports_refactor, r=jdm
Ports refactoring

Depends on https://github.com/servo/servo/pull/20071 and https://github.com/servo/servo/pull/19895

This PR does 3 things:
1) merge all the embedder coordinates callbacks into one
2) hand the embedder messages directly to the embedder
3) split the embedder code in 2 files: window.rs and browser.rs

This is in preparation for tabs support in `ports/`. We want to separate the windowing logic (glutin stuff) and the browsing logic (tabs management, browsers state, etc). It's also easier to bypass the callbacks and directly handle events.

---
<!-- 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 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/20228)
<!-- Reviewable:end -->
2018-03-22 08:10:45 -04:00
Paul Rouget
18a02f8def loop until we exhausted all the servo events 2018-03-22 08:07:44 +01:00
Paul Rouget
abea15d419 Use the --device-pixel-ratio in opt instead of /components/servo/ 2018-03-22 08:07:43 +01:00
Paul Rouget
aa72b8783d remove useless pref 2018-03-22 08:07:43 +01:00
Paul Rouget
1cdba8843d split window code and browser code in two different files 2018-03-22 08:07:32 +01:00
Paul Rouget
34c2150e4f move key code into dedicated file 2018-03-22 07:58:40 +01:00
Paul Rouget
5e33dcd29d forward EmbedderMsg to embedder 2018-03-22 07:56:51 +01:00
Paul Rouget
10abe03948 Reduce the number of calls to the embedder by grouping the screen and window coordinates into one structure 2018-03-22 07:56:50 +01:00
bors-servo
28c92db268
Auto merge of #20327 - kwonoj:fix-ignore, r=paulrouget
fix(keyevent): do not emit default ignorable codepoint

<!-- Please describe your changes on the following line: -->
This PR intends to update `KeyEvent` emit behavior around #18130. Issue https://github.com/servo/servo/issues/17146#issue-233361568 briefly explains what's happening in servo currently - there are KeyboardInput event emitted for separated key (modifier, and `V` in case of paste) and there are also `ReceivedCharacter` event corresponds to `\u{0016}`.

`0x0016` is unicode representation of `Synchronous Idle` (https://en.wikipedia.org/wiki/Synchronous_Idle), belong under category of `Default Ignorable` charater in unicode range doesn't have visual representation (http://www.unicode.org/L2/L2002/02368-default-ignorable.pdf). Currently servo forwards all of emitted event from `winit` including this, eventually leads into double execution of control event.

In this change try to omit default ignorable charater , if given char received is within range of ignorable do not dispatch `KeyEvent`. Once those are omitted, current event handling logic already takes care of key event with correct modifier state so duplicated event handling won't occur.

For implementation perspective, `std::char` in Rust doesn't seem to support `isIdentifierIgnorable` like other platform does (i.e: https://msdn.microsoft.com/en-us/library/aa285330(v=vs.60).aspx / https://docs.oracle.com/javase/7/docs/api/java/lang/Character.html) - so does quick, naïve range comparison check based on unicode range specified in spec, similar to halfbuzz and other does. (https://github.com/harfbuzz/harfbuzz/blob/master/src/hb-unicode-private.hh#L134)

Lastly, this is indeed behavior of `winit` to emit all characters by default. *Why not try to make upstream changes instead?* While I've been reading through issues in `winit`, issue like https://github.com/tomaka/winit/issues/350 trying to emit ignorable character by its intention (delete key `ReceivedCharacter` is also under category of default ignorable) and let each consumer application handles it as needed. I assume it'll cause breaking changes in winit's design if it intends to omit those characters, instead tried to make application-level changes.

Couple of consideration for review

- Is it desired changes to not emit `KeyEvent` for default ignorable chars? Do we rather want mapping / or restoring back to original char as @paulrouget mentioned in https://github.com/servo/servo/issues/17146#issue-233361568?
- Any better, recommended approach to detect unicode char range?
- Maybe try to make upstream changes to `winit` still, like having configuratble way to opt-in(out) those char event?

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
- This PR has been locally tested on Windows, Linux machines.

<!-- 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/20327)
<!-- Reviewable:end -->
2018-03-22 02:00:09 -04:00
bors-servo
4433550c94
Auto merge of #20381 - servo-wpt-sync:wpt_update_21-03-2018, r=jdm
Sync WPT with upstream (21-03-2018)

Automated downstream sync of changes from upstream as of 21-03-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/20381)
<!-- Reviewable:end -->
2018-03-21 23:05:24 -04:00
WPT Sync Bot
6b4026ce2f Update web-platform-tests to revision 26e8a76d7fbea0721468e791a325444ac9939a4f 2018-03-21 22:47:14 -04:00
bors-servo
4e26212d5e
Auto merge of #20368 - kwonoj:refactor-counter-style, r=emilio
refactor(counter_style): parse int via parse_non_negative

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

This PR intends to refactor `counter_style` to use `parse_non_negative` where applicable, mostly which uses `expect_integer` currently. Change still grabs value from parsed result then assign it into each struct as needed and does not change definition of struct (i.e `AdditiveTuple`) itself.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
- This PR has locally built & ran unit test on macOS.

<!-- 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/20368)
<!-- Reviewable:end -->
2018-03-21 18:18:55 -04:00
OJ Kwon
c8592ead6f
refactor(counter_style): parse int via parse_non_negative 2018-03-21 15:03:38 -07:00
bors-servo
1c2bed5a69
Auto merge of #20378 - Eijebong:parking_lot, r=jdm
Bump parking_lot to 0.5

<!-- 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/20378)
<!-- Reviewable:end -->
2018-03-21 14:16:57 -04:00
Bastien Orivel
f71e34ccab Bump parking_lot to 0.5 2018-03-21 18:19:29 +01:00
bors-servo
de04783fd9
Auto merge of #20370 - christianpoveda:issue_20348, r=jdm
Blobs support typed arrays now

<!-- Please describe your changes on the following line: -->
Blobs support typed arrays now, the relevant test were modified

---
<!-- 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 #20348 (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/20370)
<!-- Reviewable:end -->
2018-03-21 11:10:27 -04:00
Christian Poveda
3df9492dcf Blobs support typed arrays now 2018-03-21 09:29:24 -05:00
bors-servo
797fb553bb
Auto merge of #20376 - Eijebong:cc, r=asajeffrey
Remove our dependency on the gcc crate

<!-- 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/20376)
<!-- Reviewable:end -->
2018-03-21 10:20:58 -04:00
Bastien Orivel
15b98e5dc3 Remove our dependency on the gcc crate 2018-03-21 15:17:39 +01:00
bors-servo
02c758a226
Auto merge of #20371 - Eijebong:ipc-channel, r=nox
Bump ipc-channel and bincode

<!-- 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/20371)
<!-- Reviewable:end -->
2018-03-21 09:00:16 -04:00
Bastien Orivel
570d865065 Bump ipc-channel and bincode
This required bumping uuid too which unfortunately duplicated rand.
2018-03-21 13:05:47 +01:00
bors-servo
5b575e3647
Auto merge of #20298 - Eijebong:websocket, r=nox
Bump servo-websocket to 0.21

<!-- 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/20298)
<!-- Reviewable:end -->
2018-03-21 06:41:31 -04:00
bors-servo
1594d0b54c
Auto merge of #20374 - paulrouget:hittest, r=glennw
Fix mouse click

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

PR #20071 broke mouse click on hidpi screens.

---
<!-- 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 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/20374)
<!-- Reviewable:end -->
2018-03-21 05:46:09 -04:00
Paul Rouget
c5a0b3e285 Mouse position from glutin is DevicePixel 2018-03-21 07:34:10 +01:00
OJ Kwon
da586d0994
fix(keyevent): do not emit default ignorable codepoint 2018-03-20 20:57:35 -07:00
bors-servo
fd60007a28
Auto merge of #20373 - servo-wpt-sync:wpt_update_20-03-2018, r=jdm
Sync WPT with upstream (20-03-2018)

Automated downstream sync of changes from upstream as of 20-03-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/20373)
<!-- Reviewable:end -->
2018-03-20 22:54:37 -04:00
WPT Sync Bot
40c0b971f1 Update web-platform-tests to revision 3a8328470d53c4501e31cec2775c4d33821c2275 2018-03-20 22:48:56 -04:00
bors-servo
f92f0809f8
Auto merge of #20369 - gootorov:move-validation, r=emilio
Move WebGL validation

This moves validation from `canvas/webgl_thread` to `dom/webglrenderingcontext` for consistency and speed and simplifies it where it is possible.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because: 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/20369)
<!-- Reviewable:end -->
2018-03-20 19:58:58 -04:00
Igor Gutorov
bdd53f35af Simplify GetShaderPrecisionFormat 2018-03-21 01:57:44 +02:00
Igor Gutorov
7e5160b79e Simplify BufferParameter 2018-03-20 21:24:10 +02:00
Igor Gutorov
0747853ad0 Simplify VertexAttribOffset 2018-03-20 21:08:28 +02:00
Igor Gutorov
431e3ddf8d Simplify GetTexParameter 2018-03-20 21:00:46 +02:00
bors-servo
730bd5ec80
Auto merge of #20367 - CYBAI:ignore-type-in-document-open, r=jdm
Ignore type in document.open

Spec: https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-open

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20279
- [x] There are tests for these changes; the tests in `dynamic-markup-insertion/opening-the-input-stream/type-argument.window.js` should pass

<!-- 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/20367)
<!-- Reviewable:end -->
2018-03-20 12:32:00 -04:00
CYBAI
a35214b6b6 Make type-argument.window.js test as pass 2018-03-20 22:28:41 +08:00
CYBAI
aad6efa8f3 Update steps with new spec 2018-03-20 22:24:52 +08:00