Commit graph

19536 commits

Author SHA1 Message Date
bors-servo
6e7f7fc8eb
Auto merge of #21284 - servo:webgl, r=emilio
Various fixes for the lifecycle of WebGL objects

<!-- 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/21284)
<!-- Reviewable:end -->
2018-07-31 05:14:24 -04:00
Anthony Ramine
15d1215949 Properly check for context ownership of objects passed to gl.is*() 2018-07-31 11:12:45 +02:00
Anthony Ramine
76f23f7d78 Simplify gl.getShaderParameter() (fixes #20562)
The expectation change is due to the shader now using its DOM-side compile status.
It is actually a bug for the shader to think it actually compiled successfully,
but at least it does so consistently now.
2018-07-31 11:12:45 +02:00
Anthony Ramine
a0fc4c9832 Fix program and shader lifetime cycle 2018-07-31 11:12:40 +02:00
Anthony Ramine
43463e80cb Remove an obsolete todo in gl.compileShader()
We get the uniform data etc at link-time.
2018-07-31 00:28:14 +02:00
Anthony Ramine
6af2ce79a2 Remove an obsolete todo in gl.attachShader()
Attaching the same shader twice should indeed emit an InvalidOperation error.
2018-07-31 00:28:14 +02:00
bors-servo
1bd34e7c55
Auto merge of #21250 - paulrouget:fixkeys, r=jdm
Refactor winit key handling

This should improve keys input on Linux and Windows.
Should fix #17146 and fix #21161

Tested Mac, Windows and Linux. Basic typing works, combo work, text navigation works. I hit some strange issues where sometimes the text would be displayed late, but I believe it is unrelated to this PR.

If we land that now, we will hit a regression on Mac, we need a winit update that includes https://github.com/tomaka/winit/pull/610.

<!-- 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/21250)
<!-- Reviewable:end -->
2018-07-30 13:02:41 -04:00
Felix Rabe
cbae7c6131
Fix copy paste typo 2018-07-30 10:04:22 +02:00
bors-servo
de48f25d0b
Auto merge of #21272 - servo:rustup, r=avadacatavra
Use the packed_simd crate instead of std::simd

`std::simd` was removed in https://github.com/rust-lang/rust/pull/52535.
https://crates.io/crates/packed_simd is in the rust-lang-nursery org.

<!-- 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/21272)
<!-- Reviewable:end -->
2018-07-29 12:58:25 -04:00
bors-servo
076198fe80
Auto merge of #21111 - gterzian:implement_document_load_cancellation, r=jdm
Implement document load cancellation

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #19309 fix #21114 fix #21113 (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/21111)
<!-- Reviewable:end -->
2018-07-29 11:14:29 -04:00
Gregory Terzian
e67adfc290 use DOMTracker instead of WeakMediaQueryListVec 2018-07-29 16:42:59 +08:00
Gregory Terzian
8155cc66b0 close eventsources as part of document unloading 2018-07-29 16:42:59 +08:00
Gregory Terzian
31da37fa6c stopping tokenizer if parser is aborted 2018-07-29 16:42:59 +08:00
Gregory Terzian
e49c8e7f26 spec compliant active parser concept 2018-07-29 16:42:59 +08:00
Gregory Terzian
f2ee941da2 Introduce DOMTracker, cancel eventsource fetch when aborting document load 2018-07-29 16:42:59 +08:00
Gregory Terzian
ff62ca7c01 implement window.stop, improve aborting document load 2018-07-29 16:42:54 +08:00
Simon Sapin
1c0941ffc0 Use the packed_simd crate instead of std::simd
`std::simd` was removed in https://github.com/rust-lang/rust/pull/52535.
https://crates.io/crates/packed_simd is in the rust-lang-nursery org.
2018-07-27 22:44:14 +02:00
Paul Rouget
3c7bb87e6d Refactor winit key handling 2018-07-26 14:39:52 +02:00
Anthony Ramine
5a9ad01145 Cache which capabilities are enabled in the context (fixes #20534)
This is needed for #20555.
2018-07-25 19:58:02 +02:00
bors-servo
65df9cb73a
Auto merge of #21240 - servo:webgl, r=jdm
Properly check for GL object ownership (fixes #21133)

<!-- 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/21240)
<!-- Reviewable:end -->
2018-07-24 11:02:57 -04:00
Anthony Ramine
3179ed59c5 Properly check for GL object ownership (fixes #21133) 2018-07-24 15:05:35 +02:00
Anthony Ramine
661e258b28 Store a reference to the WebGLRenderingContext in WebGLObject 2018-07-24 13:27:33 +02:00
Emilio Cobos Álvarez
658b8e3312
style: Appease tidy. 2018-07-24 03:58:16 +02:00
Emilio Cobos Álvarez
9118dd838e
script: Fix build and tidy. 2018-07-24 03:47:40 +02:00
Emilio Cobos Álvarez
1716259a3a
style: Fix servo build. 2018-07-24 03:38:14 +02:00
Emilio Cobos Álvarez
3a0c8fc760
style: Avoid getting zero normalized vector of rotate3d for animations.
If we have a rotate axis whose length is extremely large, we will get an
infinite value, and its normalized vector is a zero vector, instead of an
unit vector, i.e. (x/inf, y/inf, z/inf) == (0, 0, 0).

The solution is: we scale the vector, so the length becomes a finite value, and
we could get a valid unit vector.

Therefore, we use a different normalization method, robust_normalize().

Bug: 1467277
Reviewed-by: hiro
2018-07-24 03:26:12 +02:00
Ting-Yu Lin
0c0ffef1a5
style: Convert NS_STYLE_COLUMN_SPAN_* to an enum class.
Bug: 1477533
Reviewed-by: heycam
MozReview-Commit-ID: F8M1DlpBop2
2018-07-24 03:31:53 +02:00
Ting-Yu Lin
23b1d4d640
style: Convert NS_STYLE_COLUMN_FILL_* to an enum class.
I put Balance as the first item in StyleColumnFill because it is the default
value.

Bug: 1477533
Reviewed-by: heycam
MozReview-Commit-ID: A4DVMLL6XBa
2018-07-24 03:31:41 +02:00
Ting-Yu Lin
9f5237b87c
style: Use static const class variable to represent column-count: auto.
NS_STYLE_COLUMN_COUNT_UNLIMITED is unused, so I remove it.

Bug: 1477533
Reviewed-by: heycam
MozReview-Commit-ID: HLHLn9ZbkUY
2018-07-24 03:31:24 +02:00
Emilio Cobos Álvarez
77f47eea34
style: Hide display: -moz-box|-moz-inline-box from content on Nightly and early beta.
Bug: 1477553
Differential Revision: https://phabricator.services.mozilla.com/D2288
2018-07-24 03:31:12 +02:00
Emilio Cobos Álvarez
7e77f4dd4e
style: Add @-moz-document media-document(image|video|plugin).
Bug: 1475511
Reviewed-by: xidorn
MozReview-Commit-ID: CD3O1vGLAoV
2018-07-24 03:30:59 +02:00
Emilio Cobos Álvarez
5634a3f670
style: Make document condition parsing a bit nicer.
Bug: 1475511
Reviewed-by: xidorn
MozReview-Commit-ID: Gi0FxrEAYcE
2018-07-24 03:30:46 +02:00
Emilio Cobos Álvarez
095841db7f
style: UrlMatchingFunction -> DocumentMatchingFunction.
Bug: 1475511
Reviewed-by: xidorn
MozReview-Commit-ID: HLcaVmehFW7
2018-07-24 03:30:33 +02:00
Emilio Cobos Álvarez
02d27ad3dd
style: Make svg:use use an actual shadow tree.
This fixes a couple fuzz bugs and prevents special-casing <svg:use> even more in
bug 1431255.

Unfortunately not as many hacks went away as I'd have hoped, since we still need
to match document rules, see the linked SVGWG issues.

But blocks_ancestor_combinators goes away, which is nice since it's on a very
hot path.

Bug: 1450250
Reviewed-by: heycam
Differential Revision: https://phabricator.services.mozilla.com/D2154

MozReview-Commit-ID: C4mthjoSNFh
2018-07-24 03:30:12 +02:00
Xidorn Quan
1a91beaf57
style: Remove DeclarationPushMode.
Bug: 1473180
Reviewed-by: emilio
MozReview-Commit-ID: LFgYeKE1SNk
2018-07-24 03:29:59 +02:00
Xidorn Quan
a0edeb1a92
style: Remove DeclarationPushMode::Update and related code.
Bug: 1473180
Reviewed-by: emilio
MozReview-Commit-ID: 1fI5YRa54lQ
2018-07-24 03:29:42 +02:00
Xidorn Quan
b14b2beaad
style: Add new algorithm for setting property to be used in later commit.
Bug: 1473180
Reviewed-by: emilio
MozReview-Commit-ID: CdM8hDB6rFj
2018-07-24 03:29:28 +02:00
Xidorn Quan
d245f8b579
style: Introduce a concept of logical group.
Bug: 1473180
Reviewed-by: emilio
MozReview-Commit-ID: GXlf8JNML4N
2018-07-24 03:29:15 +02:00
Emilio Cobos Álvarez
08dcd7fca0
style: Remove IS_STYLE_IF_VISITED.
Bug: 1474959
Reviewed-by: xidorn
MozReview-Commit-ID: 8rnlaMOJisA
2018-07-24 03:29:03 +02:00
Emilio Cobos Álvarez
4e1606bfaf
style: Push visited style computation a bit further down.
Bug: 1474959
Reviewed-by: xidorn
MozReview-Commit-ID: 1DILenWIw4D
2018-07-24 03:28:50 +02:00
Emilio Cobos Álvarez
45435a57e9
style: Cleanup might_need_transitions_update.
Thought I had to update this as well, but nope. When basically any style changes
we already update transitions.

needs_transitions_update already handles the physical mapping changing by
checking whether any transition for the physical property remain there or not.

Bug: 1309752
Reviewed-by: birtles
MozReview-Commit-ID: 6vKwal4yzRU
2018-07-24 03:28:36 +02:00
Emilio Cobos Álvarez
856e5d1db6
style: Update animations if the logical to physical property mapping changes.
Bug: 1309752
Reviewed-by: birtles
MozReview-Commit-ID: 1lbOcniojVO
2018-07-24 03:28:23 +02:00
Emilio Cobos Álvarez
5504cbdfd7
style: Animate logical properties.
The setup is that AnimationValue only contains physical properties, and
we physicalize when building keyframes and transitions.

Bug: 1309752
Reviewed-by: birtles
MozReview-Commit-ID: 9dI20N0LFrk
2018-07-24 03:28:10 +02:00
Emilio Cobos Álvarez
be9acba801
style: Introduce PropertyDeclaration::to_physical.
Bug: 1309752
Reviewed-by: heycam
MozReview-Commit-ID: FAL04K5G948
2018-07-24 03:27:56 +02:00
Bobby Holley
89880727ec
style: Use an acquire load for is_unique in servo_arc.
Fixes #21186

Bug: 1476445
Reviewed-by: Manishearth
Differential Revision: https://phabricator.services.mozilla.com/D2205
2018-07-24 03:27:08 +02:00
Sylvestre Ledru
498592ff61
style: autopep8
Bug: 1468273
Reviewed-by: ted
MozReview-Commit-ID: 8j8EU3E08GP
2018-07-24 03:26:12 +02:00
bors-servo
b539ae7fe5
Auto merge of #21219 - paavininanda:Update_the_image_data, r=jdm
Complete remaining algo update_the_image_data

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

<!-- Either: -->
- [x] These changes do not require tests

<!-- 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/21219)
<!-- Reviewable:end -->
2018-07-23 14:54:50 -04:00
Emilio Cobos Álvarez
39e647de06
script: Fix the logic for mutation observer attributes. 2018-07-23 19:28:29 +02:00
Emilio Cobos Álvarez
073629076f
script: Avoid useless string clones in mutation observer stuff. 2018-07-23 19:28:29 +02:00
Emilio Cobos Álvarez
e4f978e215
script: Queue a mutation record from CharacterData::append_data. 2018-07-23 19:06:22 +02:00