Commit graph

6335 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
1654f297ca
style: Tidy a couple things. 2018-03-14 15:10:05 +01:00
Igor Matuszewski
712812d441 Add WPT test for WebIDL union conversion containing object values 2018-03-13 22:47:37 +01:00
Igor Matuszewski
17ecbaf8ff Support objects in WebIDL unions
Fixes #17011
2018-03-13 22:47:36 +01:00
bors-servo
5feb13ac66
Auto merge of #20277 - servo:test-webvr, r=jdm
Enable /webvr/ 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/20277)
<!-- Reviewable:end -->
2018-03-12 10:32:52 -04:00
Anthony Ramine
8013e7801e Properly pref-gate the VR WebIDL interface 2018-03-12 15:32:00 +01:00
bors-servo
345c373192
Auto merge of #20216 - servo:mozangle, r=emilio
Switch from servo/angle to the mozangle crate

https://github.com/servo/mozangle

<!-- 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/20216)
<!-- Reviewable:end -->
2018-03-12 09:23:52 -04:00
Simon Sapin
67d983cb12 Switch from servo/angle to the mozangle crate
https://github.com/servo/mozangle
2018-03-12 14:23:20 +01:00
Emilio Cobos Álvarez
21df4014db
constellation: Make setting up the WebGL state fallible.
This fixes a regression caused by the glutin update.

We now are creating EGL contexts in Linux Wayland, instead of X context, so the
GLContextFactory assumption of one GL back-end per platform is broken.

This just works around it, for now, but in general I think not relying on
available WebGL state is a good thing, and we do that already for WebVR anyway.
2018-03-09 23:27:29 +01:00
bors-servo
94a6c2c429
Auto merge of #20181 - fabricedesre:end-load-pageshow, r=jdm
Fire the pageshow event at the end of the page load

<!-- Please describe your changes on the following line: -->
This implements step 8 of https://html.spec.whatwg.org/multipage/parsing.html#the-end

---
<!-- 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 I could not find a wpt test for that, which is strange. I likely missed it :(

<!-- 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/20181)
<!-- Reviewable:end -->
2018-03-06 10:49:51 -05:00
Fabrice Desré
3dd015b2d9 Fire the pageshow event at the end of the page load r=jdm 2018-03-06 07:24:24 -08:00
Martina Kollarova
288ef50fb7 Add WebGL function glGetTexParameter
Set the expected result of the test `tex-input-validation.html` to CRASH, since
that is caused by unrelated problems. The test was previously not executing
completely, because it stopped when it didn't find the implementation of
getTexParameter.
2018-03-06 15:28:10 +02:00
Manish Goregaokar
19dba91e4d Fixup specified colspans and rowspans 2018-02-28 17:07:49 -08:00
Emilio Cobos Álvarez
15b0a32035
style: Put all the multicol props under the same pref for Servo.
Otherwise it becomes insane.
2018-02-28 12:04:47 +01:00
Emilio Cobos Álvarez
650e947c94
style: Make Servo deal with CSS property prefs more correctly.
Right now you could still set preffed-off properties from CSSStyleDeclaration.
2018-02-27 19:29:07 +01:00
bors-servo
ac162e8f72
Auto merge of #20012 - alexfjw:avoid_Window-GetComputedStyle_when_checking_for_display-none, r=emilio
Avoid `Window::GetComputedStyle` when checking for `display: none`

<!-- Please describe your changes on the following line: -->
Refactored Window::GetComputedStyle to use Element::Style.

Not sure which tests are relevant, but I've ran the dom, fetch & 2dcontext wpt tests. They don't seem to give errors.

---
<!-- 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 #19885.

<!-- Either: -->
- [x] These changes do not require tests because it's a refactoring task

<!-- 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/20012)
<!-- Reviewable:end -->
2018-02-27 04:52:05 -05:00
Alex Fong
8d09398230 Avoid Window::GetComputedStyle when checking for display: none 2018-02-26 19:07:04 +08:00
bors-servo
7de2043b9c
Auto merge of #20036 - paavininanda:BrowsingNames, r=jdm
Browsing context names

<!-- 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 https://github.com/servo/servo/issues/14453

<!-- 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/20036)
<!-- Reviewable:end -->
2018-02-25 21:26:08 -05:00
paavininanda
b9f7aa4686 Adding Name and SetName functions for window 2018-02-26 07:38:41 +05:30
bors-servo
b699dfac8b
Auto merge of #20115 - janvi-palan:NoNetworkConnForHtmlListMedia, r=emilio
Dont make a network request when the media attribute of a link element is modified

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because this needs to be tested manually

<!-- 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/20115)
<!-- Reviewable:end -->
2018-02-24 19:04:46 -05:00
Emilio Cobos Álvarez
7ab4b21bc3
selectors: Remove the get_ prefix from get_local_name and get_namespace. 2018-02-24 22:45:38 +01:00
janvipalan
cef24def1a removed the media match case from the attribute_mutated fn 2018-02-25 00:02:33 +05:30
bors-servo
0fa3248723
Auto merge of #20089 - paavininanda:RevertChanges, r=jdm
Revert previously merged code, better implementation for Default selectionStart and selectionEnd

<!-- 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 #__ (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/20089)
<!-- Reviewable:end -->
2018-02-22 17:35:33 -05:00
paavininanda
87e7b1ee7a Correct default selectionStart and selectionEnd 2018-02-23 02:37:11 +05:30
paavininanda
b517410a34 Revert "Correct default Selectionstart and SelectionEnd"
This reverts commit b2c1f89b93.
2018-02-23 01:55:21 +05:30
bors-servo
9c484452c0
Auto merge of #20068 - paavininanda:autocloseworker, r=jdm
added AutoCloseWorker for closing related workers when a page/another worker is closed.

<!-- Please describe your changes on the following line: -->
Followed steps as suggested in issue.
Error is not yet resolved!

---
<!-- 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 #17977 (https://github.com/servo/servo/issues/17977?).

<!-- Either: -->
- [x] These changes do not require tests because it will have manual test case.

<!-- 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/20068)
<!-- Reviewable:end -->
2018-02-22 13:34:55 -05:00
bors-servo
f6463c89d5
Auto merge of #20051 - jonleighton:prevent-invalid-selections, r=jdm
Disallow mutating the internals of TextInput

The TextInput::assert_ok_selection() method is meant to ensure that we
are not getting into a state where a selection refers to a location in
the control's contents which doesn't exist.

However, before this change we could have a situation where the
internals of the TextInput are changed by another part of the code,
without using its public API. This could lead to us having an invalid
selection.

I did manage to trigger such a situation (see the test added in this
commit) although it is quite contrived. There may be others that I
didn't think of, and it's also possible that future changes could
introduce new cases. (Including ones which trigger panics, if indexing
is used on the assumption that the selection indices are always valid.)

The current HTML specification doesn't explicitly say that
selectionStart/End must remain within the length of the content, but
that does seems to be the consensus reached in a discussion of this:

https://github.com/whatwg/html/issues/2424

The test case I've added here is currently undefined in the spec which
is why I've added it in tests/wpt/mozilla.

<!-- 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/20051)
<!-- Reviewable:end -->
2018-02-22 11:47:40 -05:00
Nupur Baghel
36991b9d79 added autoclose worker 2018-02-22 21:34:53 +05:30
yurket
c7e3def9b2 Move paintWorklet from "Window" to "CSS" according to new specification
Relevant discussion: https://github.com/w3c/css-houdini-drafts/issues/410
2018-02-22 13:21:41 +03:00
bors-servo
9e1479bbdd
Auto merge of #20101 - servo:rm-rootedvec, r=asajeffrey
Remove a use of rooted_vec in Document::handle_touch_event

<!-- 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/20101)
<!-- Reviewable:end -->
2018-02-22 03:36:29 -05:00
bors-servo
cccca27f4f
Auto merge of #20098 - servo:spurious-raf-optim, r=pcwalton
Avoid dropping arbitrary animation callbacks without running them

<!-- 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/20098)
<!-- Reviewable:end -->
2018-02-21 17:02:35 -05:00
Anthony Ramine
3d46f6749d Remove a use of rooted_vec in Document::handle_touch_event 2018-02-21 22:54:12 +01:00
Anthony Ramine
eb83826c01 Avoid dropping arbitrary animation callbacks without running them 2018-02-21 17:28:12 +01:00
Fernando Jiménez Moreno
ff81707928 Minor cleanup of element.innerText 2018-02-20 13:50:53 +01:00
bors-servo
e97693ee09
Auto merge of #20062 - servo:iamroot, r=emilio
Remove a single use of rooted_vec

<!-- 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/20062)
<!-- Reviewable:end -->
2018-02-16 13:09:28 -05:00
bors-servo
4454e81878
Auto merge of #20041 - paavininanda:mutflags, r=jdm
Added extra bool in Window object to know about its Mutation Observers

<!-- Please describe your changes on the following line: -->
- Added Cell<bool> type variable in Window object to know whether its mutation observers are present/absent
- Added get and set functions for this variable
- Added supporting test files to check for performance

---
<!-- 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 #16936.

<!-- Either: -->
- [x] There are tests for these changes, but these are manual tests for checking correctness of added code

<!-- 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/20041)
<!-- Reviewable:end -->
2018-02-16 12:16:55 -05:00
Nupur Baghel
a1fd6c39a2 Added extra bool in Window object to know about its Mutation Observers 2018-02-16 21:52:29 +05:30
Anthony Ramine
b6b6b46568 Remove a single use of rooted_vec 2018-02-16 14:02:05 +01:00
Jon Leighton
32f781234a Disallow mutating the internals of TextInput
The TextInput::assert_ok_selection() method is meant to ensure that we
are not getting into a state where a selection refers to a location in
the control's contents which doesn't exist.

However, before this change we could have a situation where the
internals of the TextInput are changed by another part of the code,
without using its public API. This could lead to us having an invalid
selection.

I did manage to trigger such a situation (see the test added in this
commit) although it is quite contrived. There may be others that I
didn't think of, and it's also possible that future changes could
introduce new cases. (Including ones which trigger panics, if indexing
is used on the assumption that the selection indices are always valid.)

The current HTML specification doesn't explicitly say that
selectionStart/End must remain within the length of the content, but
that does seems to be the consensus reached in a discussion of this:

https://github.com/whatwg/html/issues/2424

The test case I've added here is currently undefined in the spec which
is why I've added it in tests/wpt/mozilla.
2018-02-16 11:24:12 +01:00
Fernando Jiménez Moreno
d64bf623f6 Implement element.innerText setter 2018-02-16 11:20:53 +01:00
bors-servo
b1d3d6f632
Auto merge of #19975 - paulrouget:killbhtml, r=mbrubeck,emilio
Kill browserhtml

Fixes https://github.com/servo/servo/issues/19971

<!-- 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/19975)
<!-- Reviewable:end -->
2018-02-13 04:54:47 -05:00
bors-servo
9e64008e75
Auto merge of #19754 - ferjm:innertext, r=mbrubeck
Implement element.innerText getter

<!-- 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/19754)
<!-- Reviewable:end -->
2018-02-13 03:41:48 -05:00
Paul Rouget
da349ee8a9 remove mozbrowser code 2018-02-13 09:40:06 +01:00
Fernando Jiménez Moreno
2a4535f43e Implement element.innerText getter 2018-02-13 09:12:00 +01:00
bors-servo
62e1fc7899
Auto merge of #19963 - paavininanda:Issue#19958, r=<try>
Correct default SelectionStart and SelectionEnd

<!-- 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] Added unit tests and wpt for these changes
- [x] These changes fix #19958

<!-- 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/19963)
<!-- Reviewable:end -->
2018-02-12 11:56:27 -05:00
Paul Rouget
e7c754fb64 remove forcetouch support 2018-02-11 08:02:39 +01:00
paavininanda
b2c1f89b93 Correct default Selectionstart and SelectionEnd 2018-02-10 17:46:29 +05:30
Emilio Cobos Álvarez
f1516d228f
style: Rename StylesheetSet to DocumentStylesheetSet.
MozReview-Commit-ID: 5Xl1eRLu1VF
2018-02-09 13:27:30 +01:00
bors-servo
7e501f50f7
Auto merge of #19972 - paavininanda:Issue16483, r=jdm
replaced content_type from DOCString to Mime

Replaced content_type from DomString to Mime

---
<!-- 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 #16483 (https://github.com/servo/servo/issues/16483).

<!-- Either: -->
- [x] These changes do not require tests because they make changes to already existing files

<!-- 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/19972)
<!-- Reviewable:end -->
2018-02-09 05:02:19 -05:00
Nupur Baghel
d02422408e Updated content_type of Document and XMLDocument from DOCString to Mime 2018-02-09 09:32:56 +05:30
janczer
661d234c3c Change debug assertions to specific ones 2018-02-07 09:21:24 +01:00