Commit graph

19254 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
35a1a30f6b
style: Remove invalid assertion.
We can look at stale styles while trying to figure out if we need any
invalidation, and that's ok.

Bug: 1449243
MozReview-Commit-ID: 4mBIFNm9qJv
2018-06-12 12:15:04 -07:00
Yusuf Sermet
ea5417b29c
style: Make contain:paint trigger clipping independent of the overflow property.
Bug: 1465250
Reviewed-by: mattwoodrow
MozReview-Commit-ID: 2QbfZD1jnWX
2018-06-12 12:15:03 -07:00
bors-servo
527d874bc1
Auto merge of #21028 - asajeffrey:script-dont-trace-parsers, r=Manishearth
Fixed panic due to GC while parsing

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

Don't trace the incomplete parsing contexts during GC, as parsing triggers GC while holding a mutable borrow of the context.

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

<!-- Either: -->
- [X] These changes do not require tests because fixing a panic

<!-- 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/21028)
<!-- Reviewable:end -->
2018-06-08 12:50:22 -04:00
Alan Jeffrey
40ea4c4946 Fixed panic due to GC while parsing 2018-06-08 10:59:17 -05:00
cadubentzen
3a6679b3b5 Refactor draw_image and make draw_image_self call draw_image in canvas. 2018-06-08 00:15:10 -03:00
bors-servo
40f7da0aac
Auto merge of #20923 - jdm:canvas-source, r=avadacatavra
Respect the source rectangle when drawing a canvas to another canvas.

This allows us to run the three.js examples without panicking, since they use self-drawing canvases to scroll the FPS graph.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- 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/20923)
<!-- Reviewable:end -->
2018-06-07 17:37:03 -04:00
bors-servo
d83dc8b968
Auto merge of #21019 - dwijnand:patch-1, r=jdm
Make a doc URL a clickable link

Made a URL in the docs of net::http_cache a clickable link.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's just a doc fix.

<!-- 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/21019)
<!-- Reviewable:end -->
2018-06-07 13:10:17 -04:00
bors-servo
56f6762cf8
Auto merge of #21015 - tigercosmos:yyy, r=jdm
Support cloning steps for textarea/input

<!-- 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 #13282 (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/21015)
<!-- Reviewable:end -->
2018-06-07 10:13:30 -04:00
tigercosmos
73c0af6759 support textarea clone 2018-06-07 06:54:26 -07:00
Dale Wijnand
55e254fd27
Make a doc URL a clickable link 2018-06-07 14:42:07 +01:00
bors-servo
1994712314
Auto merge of #20959 - servo:webgl, r=avadacatavra
Implement EXT_texture_filter_anisotropic

<!-- 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/20959)
<!-- Reviewable:end -->
2018-06-07 05:07:48 -04:00
Matt Brubeck
f6404f0ec2 Update dependencies to use new_debug_unrechable
Because reem/rust-debug-unreachable#6 makes `debug_unreachable` enable debug checks even in release builds since Rust 1.0.
2018-06-06 08:54:51 -07:00
Anthony Ramine
f1288cc6e0 Implement EXT_texture_filter_anisotropic 2018-06-06 12:24:47 +02:00
Josh Matthews
57440549d8 Respect the source rectangle when drawing a canvas to another canvas. 2018-06-05 19:17:31 -04:00
bors-servo
a07c718895
Auto merge of #20767 - mrobinson:use-reference-frame-for-fixed-position, r=gw3583
Use reference frames explicitly for fixed positioning

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

<!-- Either: -->
- [x] There are tests for these changes because they should not change behavior.
- [ ] 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/20767)
<!-- Reviewable:end -->
2018-06-05 04:16:56 -04:00
bors-servo
652a177ff5
Auto merge of #19511 - DonatJR:implement-read-methods-on-filereadersync, r=jdm
Implement read methods on FileReaderSync

<!-- Please describe your changes on the following line: -->
Implemented the read methods on the FileReaderSync struct according to https://w3c.github.io/FileAPI/#dfn-FileReaderSync

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

<!-- 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/19511)
<!-- Reviewable:end -->
2018-06-04 15:55:14 -04:00
Jonas Reinwald
0fdafb08c8 Implement read methods on FileReaderSync 2018-06-04 15:53:08 -04:00
bors-servo
0b6df7ef4d
Auto merge of #20915 - servo:webgl, r=jdm
Implement 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/20915)
<!-- Reviewable:end -->
2018-06-04 11:11:31 -04:00
Anthony Ramine
4e5e1e6c33 Implement EXT_shader_texture_lod 2018-06-04 16:33:05 +02:00
Martin Robinson
32f00ef821 Use reference frames explicitly for fixed positioning
Now that WebRender gives us reference frame ClipIds, we can use those to
implement fixed positioning in Servo. This will allow us to remove the
feature from WebRender entirely.
2018-06-04 13:52:08 +02:00
bors-servo
65eff4fb8a
Auto merge of #20865 - gterzian:improve_spec_compliance_window_close, r=cbrewster
improve spec compliance of window.close

<!-- Please describe your changes on the following line: -->
Improve the spec compliance of https://html.spec.whatwg.org/multipage/window-object.html#dom-window-close, mainly by implementing the steps related to [closing a browsing context](https://html.spec.whatwg.org/multipage/window-object.html#close-a-browsing-context)

---
<!-- 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 #__ (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/20865)
<!-- Reviewable:end -->
2018-06-04 06:16:45 -04:00
Gregory Terzian
2753e5efab improve spec compliance of window.close 2018-06-04 15:02:23 +08:00
CYBAI
f2ad35209f Fix typo for worklet 2018-06-03 20:34:28 +08:00
Emilio Cobos Álvarez
aea5e146fe
dom: Remove CSSStyleDeclaration.setPropertyValue/setPropertyPriority. 2018-06-02 17:24:12 +02:00
Emilio Cobos Álvarez
97d8f6b09e
layout_thread: Don't parse internal properties in paint registration code. 2018-06-02 12:27:42 +02:00
Emilio Cobos Álvarez
274bc4df3e
dom: don't parse internal properties in CSSStyleDeclaration. 2018-06-02 12:24:44 +02:00
Emilio Cobos Álvarez
9bb72139e4
atoms: Add scroll-position as a static atom.
That way we avoid cfg churn in WillChange stuff.
2018-06-02 12:19:32 +02:00
Emilio Cobos Álvarez
8777c4ee63
style: followup: set the rule type in the custom properties code, since we use it.
Though I think it may be slightly fishy if used in, e.g., a @keyframes block.

For our purposes right now it doesn't make a difference, I think.

Bug: 1466008
MozReview-Commit-ID: A7VCTOqaIuB
2018-06-02 12:08:58 +02:00
Emilio Cobos Álvarez
600f19540e
style: Make PropertyId::parse less of a footgun.
Bug: 1466095
Reviewed-by: xidorn
MozReview-Commit-ID: 2BmtSDPmHj9
2018-06-02 12:08:40 +02:00
Emilio Cobos Álvarez
5db1387f39
style: Make will-change honor prefs properly, and clean it up while at it.
Bug: 1466008
Reviewed-by: xidorn
MozReview-Commit-ID: JyzwaRgf5Ct
2018-06-02 12:08:25 +02:00
Nazım Can Altınova
93472bcdea
style: Merge ServoDeclarationBlock and DeclarationBlock.
Bug: 1464496
Reviewed-by: emilio
MozReview-Commit-ID: By9fV70Oq0K
2018-06-02 12:08:06 +02:00
Dan Glastonbury
4108b1b278
style: Change nscolor to StyleComplexColor in SVG properties.
Change mStopColor, mFloodColor, and mLightingColor in nsStyleSVGReset.

Bug: 1457353
Reviewed-by: xidorn
MozReview-Commit-ID: KMRMtHk1jNK
2018-06-02 12:07:42 +02:00
Morgan Rae Reschenberg
0bfd1dc5c0
style: Add contain:size and contain:content parsing functionality.
Bug: 1463589
Reviewed-by: emilio
MozReview-Commit-ID: 4fOqln3oOpC
2018-06-02 12:07:28 +02:00
Emilio Cobos Álvarez
5507d53611
style: Make element-backed pseudos inherit from NAC subtree roots and other NAC inherit from their parents.
Currently, NAC always inherits from the closest non-NAC ancestor element,
regardless of whether it is for an element-backed pseudo or not.

This patch changes the inheritance so that for element-backed pseudos, we
inherit from the closest native anonymous root's parent, and for other NAC we
inherit from the parent.

This prevents the following two issues and allows us to remove the
NODE_IS_NATIVE_ANONYMOUS flag:

 * Avoiding inheriting from the non-NAC ancestor in XBL bindings bound to NAC.

   - This is no longer a problem since we apply the rule only if we're a
     pseudo-element, and all pseudo-elements are in native anonymous subtrees.

   - This also allows to remove the hack that propagates the
     NODE_IS_NATIVE_ANONYMOUS flag from the ::cue pseudo-element from
     BindToTree.

 * Inheriting from the wrong thing if we're a nested NAC subtree.

   - We no longer look past our NAC subtree, with the exception of
     ::-moz-number-text's pseudo-elements, for which we do want to propagate
     ::placeholder to.

A few rules from forms.css have been modified because they're useless or needed
to propagate stuff to the anonymous form control in input[type="number"] which
previously inherited from the input itself.

Bug: 1460382
Reviewed-by: heycam
MozReview-Commit-ID: IDKYt3EJtSH
2018-06-02 12:07:07 +02:00
Emilio Cobos Álvarez
92e2adf45f
style: Cleanup transform animation.
Reviewed-by: hiro
But: 1465066
MozReview-Commit-ID: D9rq8CZIgf5
2018-06-02 12:06:22 +02:00
Emilio Cobos Álvarez
d5e19a146e
style: Some trivial cleanup.
Bug: 1464865
Reviewed-by: xidorn
MozReview-Commit-ID: 8ClaBR9ooGb
2018-06-02 12:06:05 +02:00
Emilio Cobos Álvarez
142c9eca4b
style: Don't let @namespace rules that aren't going to be inserted affect the namespace map.
Bug: 1464865
Reviewed-by: xidorn
MozReview-Commit-ID: 9bjlEBExqsr
2018-06-02 12:05:47 +02:00
Emilio Cobos Álvarez
e77a28d543
style: trivial TopLevelRuleParser construction cleanup.
MozReview-Commit-ID: 5CdOdQPZzyb
2018-06-02 12:05:41 +02:00
Hiroyuki Ikezoe
378fcc2b6a
style: Implement the smarter interporation for transform.
Corresponding to this spec change;
32812668df

The expected value in test_transitions_per_property.html can be calculated;

  'start' + ('end' - 'start') * 0.25

Bug: 1464647
Reviewed-by: birtles, emilio
MozReview-Commit-ID: NI9gOUuPnG
2018-06-02 12:05:11 +02:00
Yusuf Sermet
f0fbcf204e
style: Create a stacking context for contain:paint.
Bug: 1463599
Reviewed-by: mattwoodrow
MozReview-Commit-ID: Ln72MOlHXwi
2018-06-02 12:04:48 +02:00
bors-servo
022daccbe1
Auto merge of #20884 - jdm:more-limits, r=avadacatavra
Don't forward GL parameter gets for constant limits.

This avoids IPC traffic for unchanging constants that are determined when the GL context is created. These changes require https://github.com/emilio/rust-offscreen-rendering-context/pull/123.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20876.
- [x] There are tests for these changes

<!-- 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/20884)
<!-- Reviewable:end -->
2018-05-31 15:03:43 -04:00
Josh Matthews
76c29f8bd0 Don't forward GL parameter gets for constant limits. 2018-05-31 14:24:18 -04:00
bors-servo
35cd2e93c2
Auto merge of #20878 - jdm:paramdebug, r=avadacatavra
Improve debugging output for WebGL errors.

This changes made it much easier to figure out what was triggering #20876.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they only affect error output.

<!-- 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/20878)
<!-- Reviewable:end -->
2018-05-31 10:40:29 -04:00
Alan Jeffrey
d0cc9d2cd5 Updated to mozjs v0.7.1. 2018-05-30 14:44:47 -05:00
bors-servo
0356be3021
Auto merge of #20879 - tigercosmos:ccc, r=jdm
Update type of custom element constructor

<!-- 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 #20875 (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/20879)
<!-- Reviewable:end -->
2018-05-30 08:09:36 -04:00
Anthony Ramine
a553964123 Upgrade to rustc 1.28.0-nightly (524ad9b9e 2018-05-29)
Fixes https://github.com/servo/servo/issues/20844
2018-05-30 10:50:59 +02:00
tigercosmos
6d426f7c14 Update type of custom element constructor 2018-05-30 10:00:12 +08:00
Josh Matthews
41ced88f71 Improve debugging output for WebGL errors. 2018-05-29 17:25:03 -04:00
Josh Matthews
b1202cfa9f
Don't panic when tearing down a WebGL context and the thead is unreachable.
This avoids some cascading double-panics when there are errors in the WebGL rendering thread.
2018-05-29 15:26:39 -04:00
bors-servo
7cc4165dda
Auto merge of #20868 - tigercosmos:gg1, r=emilio
fix logic in overflow_direction, also add a FIXME

<!-- Please describe your changes on the following line: -->
This PR fix #19477, which the logic is obviously wrong.

However, it is impossible to add a test for this.

Due to #20867, the ` overflow_direction` is a hard code now. It never go to other conditions.
I add a FIXME there, and also add a SPEC link.

---
<!-- 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 #19477(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/20868)
<!-- Reviewable:end -->
2018-05-28 18:50:18 -04:00