Commit graph

16155 commits

Author SHA1 Message Date
Michael Howell
8a90cda09f Do not replace an ellipsis when reflowing a line
The ellipsis should be replaced, if needed, when the text itself is reflowed.
2017-01-12 21:16:27 +00: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
6447a97838 Auto merge of #14964 - canaltinova:ok-try, r=Wafflespeanut
Remove unnecessary try!'s

<!-- Please describe your changes on the following line: -->
These try!'s are unnecessary here. We can remove them.

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

<!-- Either: -->
- [X] These changes do not require tests because it's just refactoring

<!-- 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/14964)
<!-- Reviewable:end -->
2017-01-11 15:47:04 -08:00
Manish Goregaokar
d87b710fdd stylo: Store servo computed values for animation properties
MozReview-Commit-ID: IoQLN5tdIBw
2017-01-11 15:24:53 -08: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
5d3847dddc Auto merge of #14961 - Ms2ger:DevicePixel, r=nox
Move DevicePixel to script_traits.

<!-- 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/14961)
<!-- Reviewable:end -->
2017-01-11 11:31:15 -08:00
Nazım Can Altınova
c2dd14d3bb Remove unnecessary try!'s 2017-01-11 22:29:15 +03: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
bors-servo
e440a01605 Auto merge of #14956 - upsuper:geometry-boxes, r=Manishearth
Extend supported geometry box value for geckolib

<!-- Please describe your changes on the following line: -->
r? @Manishearth

---
<!-- 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/14956)
<!-- Reviewable:end -->
2017-01-11 08:35:24 -08:00
Ms2ger
7879edb451 Move DevicePixel to script_traits. 2017-01-11 15:27:14 +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
Xidorn Quan
0a56ec3477 Extend supported geometry box value for geckolib 2017-01-11 21:14:13 +11: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
Xidorn Quan
8a8ef48fb3 Add other property aliases 2017-01-11 11:18:01 +11:00
Xidorn Quan
2f2044e4b7 Add gecko leagcy logical properties aliases 2017-01-11 11:17:58 +11:00
Xidorn Quan
e494a0f0a7 Add prefixes parameter for properties 2017-01-11 11:17:55 +11:00
Xidorn Quan
8af81682dc Fix alias handling in properties.mako 2017-01-11 10:36:10 +11: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
bors-servo
b5b5533d67 Auto merge of #14942 - servo:warnings, r=nox
Fix some warnings.

<!-- 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/14942)
<!-- Reviewable:end -->
2017-01-10 08:00:43 -08: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
bors-servo
f674a9db8b Auto merge of #14938 - servo:gfx-traits, r=nox
Various cleanup around gfx_traits.

<!-- 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/14938)
<!-- Reviewable:end -->
2017-01-10 07:02:23 -08:00
charlesvdv
19e31d5c50 Handle properly alternate stylesheet 2017-01-10 15:38:38 +01:00
bors-servo
dabb79c787 Auto merge of #14603 - mrobinson:collect-scoll-roots, r=emilio
Rework the way scroll roots are collected

<!-- 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
- [x] These changes do not require tests because they should not change behavior.

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

Collect scroll roots during the collect_stacking_context phase instead
of during display list construction. This will be useful in order to
collect containing block scroll roots as well as to give scroll roots
sequential ids in the future. This change also pulls stacking context
children out of the StackingContext struct itself, which should reduce
very slightly the memory used by the finished display list. This also
simplifies the DisplayListBuilder because it no longer has to maintain
a stack of ScrollRootIds and StackingContextIds and can instead just
rely on the program stack.

<!-- 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/14603)
<!-- Reviewable:end -->
2017-01-10 04:48:31 -08:00
Martin Robinson
29876d2703 Rework the way scroll roots are collected
Collect scroll roots during the collect_stacking_context phase instead
of during display list construction. This will be useful in order to
collect containing block scroll roots as well as to give scroll roots
sequential ids in the future. This change also pulls stacking context
children out of the StackingContext struct itself, which should reduce
very slightly the memory used by the finished display list. This also
simplifies the DisplayListBuilder because it no longer has to maintain
a stack of ScrollRootIds and StackingContextIds and can instead just
rely on the program stack.
2017-01-10 13:33:08 +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
bors-servo
43a537a1ba Auto merge of #14879 - hiikezoe:animation-properties, r=heycam
Stylo:  Store animation properties into gecko's struct

<!-- Please describe your changes on the following line: -->
This is the counter part of https://bugzilla.mozilla.org/show_bug.cgi?id=1328786

All patches get reviewed by r=@heycam.
---
<!-- 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

<!-- Either: -->
- [X] These changes do not require tests because it's for stylo.

<!-- 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/14879)
<!-- Reviewable:end -->
2017-01-10 02:57:23 -08:00
Anthony Ramine
d853e7fee9 Unify text insertion when parsing HTML and XML 2017-01-10 11:16:42 +01:00
Ms2ger
d12b385b41 Remove the rustc-serialize dependency from gfx_traits. 2017-01-10 10:05:46 +01:00
Ms2ger
137b277f1e Remove the rustc-serialize dependency from gfx. 2017-01-10 09:58:53 +01:00
Ms2ger
5d2a68033a Replace gfx_traits::ScrollPolicy by webrender_traits::ScrollPolicy. 2017-01-10 09:45:53 +01:00
Ms2ger
8e12a11da9 Remove unused LayerKind and LayerType enums. 2017-01-10 09:45:51 +01:00
Ms2ger
6a1f7a717d Move LayerPixel to compositing. 2017-01-10 09:45:50 +01:00
Ms2ger
7ef81c3d7d Move FrameTreeId to compositing. 2017-01-10 09:45:47 +01:00
Ms2ger
0b5dc7ed34 Remove some unused StackingContextId methods. 2017-01-10 09:45:46 +01:00