Commit graph

6228 commits

Author SHA1 Message Date
Ms2ger
51df04d93e Implement the incumbent global.
Fixes #10963.
2017-01-17 12:57:02 +01:00
Anthony Ramine
5756f2ff4d Kill HTMLScriptElement::ready_to_be_parser_executed 2017-01-17 12:16:43 +01:00
Ms2ger
933b74781b Use usize for AutoEntryScript::global. 2017-01-17 11:38:32 +01:00
bors-servo
ecd1d2dbc9 Auto merge of #15020 - jdm:external_script_line, r=Ms2ger
Do not use the script element's line number for external scripts.

This was yielding incorrect line numbers when looking at JS backtraces in gdb.

- [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/15020)
<!-- Reviewable:end -->
2017-01-16 11:11:46 -08:00
bors-servo
e891277dd5 Auto merge of #14994 - jdm:callback_rooting, r=Manishearth,Ms2ger
Make WebIDL callbacks permanently rooted

This replicates the same model that Promise uses right now, because it requires less thinking than coming up with something else.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14447
- [ ] 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/14994)
<!-- Reviewable:end -->
2017-01-16 10:16:44 -08:00
Ms2ger
a1d478fbb7 Update regex. 2017-01-16 13:11:16 +01:00
Anthony Ramine
9c87cb7e26 Kill beforescriptexecute and afterscriptexecute (fixes #12446) 2017-01-14 16:16:53 +01:00
bors-servo
c2d2c38b0f Auto merge of #15011 - nox:load-fixes, r=jdm
Various script loading fixes

<!-- 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/15011)
<!-- Reviewable:end -->
2017-01-14 06:18:31 -08:00
Anthony Ramine
91717ab17c Implement HTMLScriptElement async attribute 2017-01-14 14:53:04 +01:00
Josh Matthews
6f19b0cd82 Do not use the script element's line number for external scripts. 2017-01-13 17:50:54 -05:00
bors-servo
2fb9a345d6 Auto merge of #15016 - prampey:doc-deactivate, r=cbrewster
Documents now fully deactivate when a freeze message is sent

<!-- Please describe your changes on the following line: -->
Documents now fully deactivate when a freeze message is sent

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because minimal changes.

<!-- 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/15016)
<!-- Reviewable:end -->
2017-01-13 14:15:44 -08:00
Prudhvi Rampey
584f72d63b Documents now fully deactivate when a freeze message is sent 2017-01-14 01:12:21 +05:30
mrnayak
3d9e44a8c4 Handle crossorigin in link and refactor crossorigin handling
Implemented Step three and handled step four of obtain the resource part
of 4.2.4 The link element.
Link to spec : https://html.spec.whatwg.org/multipage/semantics.html#concept-link-obtain

Refactored crossOrigin handling in HTMLScriptElement, HTMLImageElement
2017-01-13 23:35:00 +05:30
Josh Matthews
3f35c3eee2 Add a permanent root to WebIDL callbacks, ensuring they are always safe to store. 2017-01-13 09:59:57 -05:00
Anthony Ramine
3e19b37c83 Don't fire a load event on inline scripts
https://github.com/whatwg/html/issues/1757
2017-01-13 13:50:31 +01:00
bors-servo
38fccce3ba Auto merge of #14992 - servo:rustup, r=jdm
Upgrade to rustc 1.16.0-nightly (2782e8f8f 2017-01-12)

<!-- 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: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/14992)
<!-- Reviewable:end -->
2017-01-12 16:07:54 -08:00
Simon Sapin
5cf10622bb Upgrade to rustc 1.16.0-nightly (2782e8f8f 2017-01-12) 2017-01-12 23:43:02 +01:00
Alan Jeffrey
611f3b38a1 Remove reflow status from browsing context. 2017-01-12 15:06:31 -06:00
Ms2ger
e57b478710 Remove unused needsRooting field from JSToNativeConversionInfo. 2017-01-12 16:57:44 +01:00
bors-servo
eb72c0ec7b Auto merge of #14963 - jdm:script_current_line, r=asajeffrey
Report meaningful line numbers for inline script errors

Rebased from #14661.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12744 and partially #9604
- [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/14963)
<!-- Reviewable:end -->
2017-01-11 18:11:52 -08:00
karenher
db2082bc6e Store parser's current line when script elements are created.
Use the newly stored line as the starting line number when
evaluating JS. This ensures that inline scripts will report
errors with meaningful line numbers.
2017-01-11 21:11:00 -05:00
bors-servo
68a8e1bf2b Auto merge of #14291 - fiji-flo:text-input-select, r=pcwalton
Position insertion point in input field with mouse

<!-- Please describe your changes on the following line: -->
Implements cursor positioning in input elements (text/password) via mouse. The related issue is #10083 but is only covered partly.
This PR does **not** cover:
* positioning in textarea elements via mouse
* text selection in input/textarea elements via mouse

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because I can't think of a way to test mouse interaction in the current test pipeline.

<!-- 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/14291)
<!-- Reviewable:end -->
2017-01-11 14:19:10 -08:00
bors-servo
783829eccc Auto merge of #14924 - ioctaptceb:webgl-blendFunc-tests, r=jdm
Webgl blend func tests

<!-- Please describe your changes on the following line: -->
Add a function that validates the conditions for [Constant Color Blend](https://www.khronos.org/registry/webgl/specs/latest/1.0/#CONSTANT_COLOR_BLEND) in the WebGL specs. ./mach run -r tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/webgl-specific.html

---
<!-- 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 OR
- [ ] These changes do not require tests because _____

<!-- 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/14924)
<!-- Reviewable:end -->
2017-01-11 13:23:08 -08:00
bors-servo
f6940f686c Auto merge of #13972 - shravan-achar:master, r=Manishearth,emilio,jdm
ImageMaps: Implemented support for parsing coord attribute to a shape…

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

Image Maps: (Part 1) Implemented support for parsing coord attribute to a shape object.
                       Implemented a hit_test method to see if a point is within the area. Tests for constructors                      and hit_test included

---

<!-- 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 _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

… object in HTMLAreaElement

<!-- 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/13972)

<!-- Reviewable:end -->
2017-01-11 12:25:46 -08:00
Manish Goregaokar
d3be70b4de Make area structs accessible from area tests 2017-01-11 12:22:11 -08:00
ioctaptceb
f3d65505e9 Add a check to BlendFunc for invalid constant
combinations
2017-01-11 20:59:03 +01:00
bors-servo
cfc74e2060 Auto merge of #14911 - charlesvdv:alternate-stylesheet, r=cbrewster
Handle properly alternate stylesheet

<!-- Please describe your changes on the following line: -->
Alternate stylesheet are now fetched and then desactivated instead of ignoring them.

I don't know if tests are required to check if the stylesheet is correctly loaded and disabled ?
<!-- 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 #14881 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/14911)
<!-- Reviewable:end -->
2017-01-11 10:34:04 -08:00
bors-servo
d1bc1a4f1b Auto merge of #14959 - nox:pending-script, r=Ms2ger
Introduce PendingScript

<!-- 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/14959)
<!-- Reviewable:end -->
2017-01-11 09:37:23 -08:00
Anthony Ramine
30f0553ac7 Introduce PendingScript
This moves scripts' loading results in Document, instead of maintaining them
behind a DOMRefCell in each HTMLScriptElement.
2017-01-11 17:37:19 +01:00
Anthony Ramine
965370c0bf Rename ScriptOrigin to ClassicScript 2017-01-11 14:52:43 +01:00
Anthony Ramine
438182a7de Introduce Document::has_pending_parsing_blocking_script 2017-01-11 14:52:40 +01:00
bors-servo
12c71c57d1 Auto merge of #14929 - servo:update-image, r=mbrubeck
Update image.

<!-- 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/14929)
<!-- Reviewable:end -->
2017-01-11 05:37:45 -08:00
Ms2ger
1c0b09f85a Update image. 2017-01-11 14:37:17 +01:00
bachar
980dde7e15 HTML image map support 2017-01-11 01:29:45 -08:00
Florian Merz
b40db5b55d Position insertion point in input field with mouse 2017-01-11 09:04:03 +01:00
Anthony Ramine
749ac42854 Do not pass an Option to Document::set_pending_parsing_blocking_script 2017-01-10 21:57:02 +01:00
bors-servo
c784bc6944 Auto merge of #14943 - nox:external-script-kind, r=jdm
Introduce ExternalScriptKind to simplify HTMLScriptElement::prepare

<!-- 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/14943)
<!-- Reviewable:end -->
2017-01-10 09:38:07 -08:00
Anthony Ramine
f2bdd159c7 Introduce ExternalScriptKind to simplify HTMLScriptElement::prepare 2017-01-10 18:16:07 +01:00
Ms2ger
36c14c9819 Fix some warnings. 2017-01-10 16:46:25 +01:00
Anthony Ramine
a64ed5dfbd Fix steps numbering of HTMLScriptExecute::prepare 2017-01-10 16:41:39 +01:00
charlesvdv
19e31d5c50 Handle properly alternate stylesheet 2017-01-10 15:38:38 +01:00
bors-servo
f54dd0112b Auto merge of #14928 - nox:insert, r=SimonSapin
Unify text insertion when parsing HTML and XML

<!-- 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/14928)
<!-- Reviewable:end -->
2017-01-10 03:51:47 -08:00
Anthony Ramine
d853e7fee9 Unify text insertion when parsing HTML and XML 2017-01-10 11:16:42 +01:00
bors-servo
b0a6808956 Auto merge of #14925 - servo:callback, r=jdm
Some cleanup around JS callbacks.

<!-- 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/14925)
<!-- Reviewable:end -->
2017-01-09 21:09:57 -08:00
bors-servo
f1c82be0e6 Auto merge of #14868 - bd339:iss14068, r=jdm
Fix loss of response type information in Fetch API

<!-- Please describe your changes on the following line: -->
Avoids mapping response types that are distinct according to [the spec](https://fetch.spec.whatwg.org/#concept-response-type) to fewer response types. Also updates test expectations to match that we now pass tests that check the response type.

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

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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/14868)
<!-- Reviewable:end -->
2017-01-09 18:36:38 -08:00
bors-servo
2a2a89b7e4 Auto merge of #14907 - bholley:eliminate_consume, r=emilio
Give up on hoisting ElementData into the frame and eliminate the concept of consuming styles

Servo PR for the work in https://bugzilla.mozilla.org/show_bug.cgi?id=1325734

<!-- 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/14907)
<!-- Reviewable:end -->
2017-01-09 17:26:50 -08:00
Bobby Holley
962a4a79bb Bug 1325734 - Remove Servo Layout's dependency on the initial-ness of the style. r=emilio 2017-01-09 11:51:36 -08:00
bors-servo
50bba770d6 Auto merge of #14789 - Manishearth:supports, r=SimonSapin
Support @supports

fixes #14786

cc @heycam @upsuper
r? @SimonSapin

<!-- 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/14789)
<!-- Reviewable:end -->
2017-01-09 10:54:38 -08:00
bors-servo
9482467add Auto merge of #14927 - servo:ImageData-data, r=jdm
Use the typed array APIs in ImageData.

<!-- 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/14927)
<!-- Reviewable:end -->
2017-01-09 09:29:46 -08:00
bors-servo
93ac10d9b1 Auto merge of #14917 - fkautz:pr_out_renaming_default_features_to_default_features_as_per_cargo_s_manifest_format, r=emilio
Renaming default_features to default-features as per Cargo's Manifest Format

<!-- 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/14917)
<!-- Reviewable:end -->
2017-01-09 07:35:28 -08:00