Commit Graph

37 Commits

Author SHA1 Message Date
Scott Trinh
7ea57f8532 servo: Merge #13747 - Partial fix for #12415: expose Canvas interfaces (from scotttrinh:canvas-webidl); r=Ms2ger
<!-- Please describe your changes on the following line: -->
Fix interface exposure per [the specs](https://html.spec.whatwg.org/multipage/scripting.html#2dcontext).

One lingering question I have is if [`CanvasPath`](https://html.spec.whatwg.org/multipage/scripting.html#canvaspath) needs to be added to `interfaces.worker.js` since it *is* exposed to the `Worker` environment. I tried adding it to the `interfaces.worker.js` list but it failed tests at https://github.com/servo/servo/blob/master/tests/wpt/mozilla/tests/mozilla/interfaces.js#L82

---
<!-- 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 contain a partial fix for #12415 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 97bcd97ebd7705df8d4d141d18e79073f71b2ba2
2016-10-16 00:18:09 -05:00
Ms2ger
0e47523e7e servo: Merge #12353 - Implement [Exposed] (from Ms2ger:expose); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 6d59be17bedbf9a96915b854df8ae8a0cd371831
2016-07-12 04:35:53 -07:00
edunham
b5071d5903 servo: Merge #10723 - Remove some Emacs & Vim modelines (from edunham:modelines); r=Wafflespeanut
This might be a bad idea, especially on the webidl side. However, we started talking about the idea that modelines are a lint error (https://github.com/servo/servo/issues/10719), and these changes would be required before enabling a modeline lint.

If it bitrots, it's easy to recreate with
```
find * -type f -exec sed '/- Mode:/d' -i {} +
find * -type f -exec sed '/ vim:/d' -i {} +
git checkout -- python/tidy/servo_tidy/tidy.py
git checkout -- python/tidy/servo_tidy_tests/spec.webidl
git commit -a
```

Source-Repo: https://github.com/servo/servo
Source-Revision: dff217c2e3ff0b77eeebf62d36c2bf57c044cf14
2016-04-21 20:05:04 -07:00
Gregory Malecha
956b08bf0c servo: Merge #9823 - updating the CanvasRenderingContext2D to match the spec (from gmalecha:canvas-rendering-context-2d-update-idl); r=jdm
- fixes #9443

Source-Repo: https://github.com/servo/servo
Source-Revision: f895f871971bcdcdb4631a0566660340399b7bed
2016-03-02 04:02:26 +05:00
Saurav Sachidanand
0268ca97b1 servo: Merge #9689 - Update some canvas properties as enums instead of DOMString (from saurvs:master); r=jdm
Fixes https://github.com/servo/servo/issues/9617

I'm going to incrementally rollout commits and squash them finally.

Source-Repo: https://github.com/servo/servo
Source-Revision: c68fbee03ecc0054205b7f58ce232cd844eee578
2016-02-20 00:10:28 +05:00
David Zbarsky
114af9bcc3 servo: Merge #8740 - Implement IsPointInPath for Canvas (from dzbarsky:ispointinpath); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: 98972d04342602610a7465de7b0639e2b9c1dcf3
2015-12-06 06:49:23 +05:00
David Zbarsky
150bf1ff8a servo: Merge #8729 - Update Canvas webIDL to spec (from dzbarsky:canvas_webidl); r=dzbarsky
Source-Repo: https://github.com/servo/servo
Source-Revision: 2d164f2bebb63aa35269a4c3355beea3bbdcff01
2015-11-29 09:02:28 +05:00
Corey Farwell
921a6d9aa9 servo: Merge #7960 - Replace usage of old-style WHATWG spec links (from frewsxcv:update-spec-links); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 4052a22a1c6826cb18f03de9d2f6aed82d809e71
2015-10-10 10:17:52 -06:00
David Zbarsky
cf83db09d2 servo: Merge #6971 - Make createRadialGradient throw for negative radii (from dzbarsky:negative-radius); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 95269bba39313e7a221947a6b20fecc92e87a201
2015-08-05 10:42:57 -06:00
David Zbarsky
268435409a servo: Merge #6943 - Clean up some methods in CanvasRendeingContext2D (from dzbarsky:context); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 447c991ebb8cca1601d7c5ecde5dffb14199ddca
2015-08-04 00:46:09 -06:00
Corey Farwell
2eb4f27674 servo: Merge #6777 - Cleanup lint special cases, refactor flake8 linting (from frewsxcv:refactor-tidy); r=jdm
Currently, there are a few linting functions that only run on certain
filetypes (determined by the file extension). Prior to this commit, the
special cases were handled in a parent function with a conditional. This
commit changes the system so each linting function gets passed a
filename so the function can determine whether it should run or not
based on the file extension.

I also refactored flake8 linting slightly. From what I've read so far of
the code, flake8 itself will only print the results directly to stdout
(though the linter would report the quantity of errors detected).
Prior to this commit, we would let flake8 print directly to stdout and
just determine if there were >0 errors reported. This commit (sort of
hackily) temporarily captures stdout when we call flake8 so we can do
what we want with the output, allowing us to `yield` the line number
and message like we do with the other linting functions.

In my opinion, both of these changes isolate specific behaviors/checks
into their respective linting functions instead of having them handled
at a more global level.

In addition to the changes above:

* The whitespace linter now runs on WebIDL and TOML files
* The license header linter now runs on WebIDL files

Source-Repo: https://github.com/servo/servo
Source-Revision: 7c8922c0c39616559b580b4a363ebe2a8c6b3ba8
2015-07-27 04:39:04 -06:00
Hyowon Kim
8d57bfce14 servo: Merge #6157 - Implement pattern fill style for canvas (from hyowon:canvas_pattern_fill); r=nox
Issue #6056
Depends on servo/rust-azure#160

Source-Repo: https://github.com/servo/servo
Source-Revision: 9474e62d38f61f2b3a385ca32d64cab975b014ce
2015-06-13 01:49:50 -06:00
Hyowon Kim
e973844b89 servo: Merge #6337 - Add attributes for canvas shadows (from hyowon:shadow_attrs); r=nox
The first step of the implementation for shadows in canvas.
r? @nox @jdm
cc @yichoi

Source-Repo: https://github.com/servo/servo
Source-Revision: f163f2bf0d32861ea20470d405bb517ed5b09e84
2015-06-12 03:27:07 -06:00
Mátyás Mustoha
94ebf895cc servo: Merge #5946 - Canvas: implement transformation matrix reset (from mmatyas:canvas_mxreset); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: d9cc36ac225a989c07301e85e40b488723bd1980
2015-05-06 16:51:02 -05:00
Mátyás Mustoha
806d415a72 servo: Merge #5945 - Canvas: implement transformation matrix rotation (from mmatyas:canvas_mxrotate); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 3327fe301393f3ec5213a5b2b14d022bbac5976e
2015-05-06 08:53:56 -05:00
Mátyás Mustoha
3ceb9c7bf4 servo: Merge #5757 - Canvas: implement global composition and blending (from mmatyas:canvas_globalcomposite); r=jdm
Implements https://html.spec.whatwg.org/multipage/scripting.html#dom-context-2d-globalcompositeoperation.

Source-Repo: https://github.com/servo/servo
Source-Revision: e278e5b9a27738bdca7a151b4295628e1f179e29
2015-04-22 14:15:28 -05:00
Mátyás Mustoha
8953c2461c servo: Merge #5773 - Canvas: add clipping path support (from mmatyas:canvas_clip); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: c4b7979450a3b884ed727e0c1d306897d255aef9
2015-04-22 10:40:10 -05:00
Mátyás Mustoha
5201431aa6 servo: Merge #5770 - Canvas: implement rectangle drawing (from mmatyas:canvas_rect); r=jdm
A simple little patch.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1d66b090a2b25203f751455d9f0f4985a77ccd64
2015-04-21 08:43:47 -05:00
Mátyás Mustoha
958c5b446c servo: Merge #5731 - Canvas: implement context state save/restore (from mmatyas:canvas_saverestore); r=jdm
This patch enables the use of `save()` and `restore()` for the canvas context, which is used by *a lot* of sites and scripts.

Depends on servo/rust-azure#153.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9c7c289acae3ea012338a5b25bc50a10e7f7074d
2015-04-19 17:40:33 -05:00
Mátyás Mustoha
bccbfe6a0d servo: Merge #5635 - Canvas: added lineCap and lineJoin support (from mmatyas:canvas_linecapjoin); r=jdm
This patch adds support for setting the line cap and join. However, it seems there's a problem on the azure-side, as the line cap setting doesn't work. Changing either the default values or using the new function has no effect. Line join works fine though.

Source-Repo: https://github.com/servo/servo
Source-Revision: fe81ce942a36b08ece8ef6d58de72624a961eeaa
2015-04-14 12:57:48 -05:00
Corey Farwell
a0f726ff70 servo: Merge #5677 - Update WHATWG links to use HTTPS (from frewsxcv:https); r=Ms2ger
Extracted this out of #5649

This commit was created with the following commands:

```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```

```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```

Source-Repo: https://github.com/servo/servo
Source-Revision: 4997d3a112354a407365fede1ab1944834a2e13c
2015-04-14 02:57:41 -05:00
Mátyás Mustoha
f08601be8b servo: Merge #5613 - Canvas: added miterLimit support (from mmatyas:canvas_miterlimit); r=jdm
This exposes some other canvas tests which were marked as PASS before. Two strokeRect related tests are fixed by #5612, and lineCap/lineJoin will have an implementation soon.

Source-Repo: https://github.com/servo/servo
Source-Revision: 325899bfad2f87e2c46b96bc542110d8f0cada48
2015-04-09 09:37:44 -05:00
Mátyás Mustoha
52704f349c servo: Merge #5563 - Canvas: added support for the globalAlpha attribute (from mmatyas:canvas_globalalpha); r=jdm
A patch somewhat similar to #5562

Source-Repo: https://github.com/servo/servo
Source-Revision: ee7d76221345362c069a6946e01b9ec7d4b42ce3
2015-04-08 11:58:04 -05:00
Mátyás Mustoha
29bba355f3 servo: Merge #5562 - Canvas: added lineWidth support (from mmatyas:canvas_linewidth); r=jdm
Rebase of #5488

Source-Repo: https://github.com/servo/servo
Source-Revision: f57b487e4d53c60d8afe704ab0fd92f6158d63da
2015-04-08 00:56:37 -05:00
Diego Marcos
a288345776 servo: Merge #5433 - Implements drawImage for html image as ImageSource (from dmarcos:issue5290); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 58637a1174f94cb1ebbb394d3ba3c8c8f2d70639
2015-04-07 18:38:34 -05:00
Mátyás Mustoha
b81c3ff0b9 servo: Merge #5414 - Canvas: added arcTo() support (from mmatyas:canvas_arcto); r=jdm
Based on the implementation in Firefox.

After comparing how `arcTo` works in different browsers, I've found the code in Firefox the cleanest implentation. It also performed better on some test, for example the one on [this site](http://flashcanvas.net/examples/dl.dropbox.com/u/1865210/mindcat/arcto.html). In (Linux) Firefox 36, it looks like [this](http://i59.tinypic.com/2ch5b2d.png), while in Chromium 41, [some features are missing](http://i58.tinypic.com/30u5w8z.png).

Source-Repo: https://github.com/servo/servo
Source-Revision: ae31d9d9e86eb90a1fe2858f10ca5e6e2e722c67
2015-04-01 15:00:43 -06:00
Mátyás Mustoha
315e4311b8 servo: Merge #5455 - Canvas: arc throws IndexSizeError on negative radius (from mmatyas:canvas_arc_negativeradius); r=Ms2ger
"Negative values for radius must cause the implementation to throw an IndexSizeError exception."

Source-Repo: https://github.com/servo/servo
Source-Revision: 1bd8e18d92c291418ce6a5712f7b4503d9b5104c
2015-03-30 04:16:04 -06:00
Mátyás Mustoha
73453b6e86 servo: Merge #5302 - Canvas: Added stroke support (from mmatyas:canvas_stroke); r=jdm
This is the servo side patch of servo/rust-azure#149.

Source-Repo: https://github.com/servo/servo
Source-Revision: f29ea4e4ef633c023a43f47f7fc8c6b46e51b8df
2015-03-25 07:54:50 -06:00
Tetsuharu OHZEKI
4aeeaa02d7 servo: Merge #5346 - Add bindings support for unrestricted float values (from saneyuki:binding); r=jdm
- Fix #707
- Take over from #5106

Source-Repo: https://github.com/servo/servo
Source-Revision: e77c4e2d76104855c42d1eee09caf36b61acccad
2015-03-25 01:09:47 -06:00
Diego Marcos
70420c0960 servo: Merge #5231 - Implementing canvas drawImage API for HTML Canvas elements as image sour (from dmarcos:issue4784); r=jdm
...ce

Source-Repo: https://github.com/servo/servo
Source-Revision: 2ab1ece765a50e26c2908bcbe5463ff1fda0b085
2015-03-24 14:01:06 -06:00
Mátyás Mustoha
2acb95ac2e servo: Merge #5251 - Canvas: implement quadraticCurveTo() (from mmatyas:canvas_quadratic); r=jdm
Yet another small canvas patch.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2c85c1d312405c586f05244c221b65750cf09981
2015-03-20 04:27:47 -06:00
Mátyás Mustoha
beac897eb1 servo: Merge #4891 - Implement canvas gradient (from mmatyas:canvas_gradient); r=jdm
Based on [ebalint](https://github.com/ebalint)'s original patch, this commit implements the linear and radial gradients for the canvas. The PR also includes test cases.
Depends on #4623 and servo/rust-azure#136.

Source-Repo: https://github.com/servo/servo
Source-Revision: dea36f981650f027902b4f71f0cdabd2da69fe21
2015-03-20 03:12:47 -06:00
Mátyás Mustoha
4f3961c85c servo: Merge #5185 - Canvas: added arc() support (from mmatyas:canvas_arc); r=pcwalton
This patch enables the use of `arc()` on the canvas.
I couldn't add reftest this time, as it involves some antialiasing issues, and so the reference doesn't match.

Source-Repo: https://github.com/servo/servo
Source-Revision: e8f1a046c6c704915419cb75181f6e0bc402ef98
2015-03-10 09:45:49 -06:00
Mátyás Mustoha
0e7b910b7a servo: Merge #5089 - Canvas: added lineTo support (from mmatyas:canvas_lineto); r=jdm
This patch enables the use of `lineTo()` on the canvas.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9eaa48b793de78b713e6c3a3c79c4060084d5fbe
2015-03-02 13:33:55 -07:00
Patrick Walton
caba5137e0 servo: Merge #5016 - script: Implement enough 2D canvas support to render basic SVGs such as (from jdm:canvas-for-svg); r=jdm
the tiger.

Rebased from #4623.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2e1adb3fa670504fb0fedaa517f312ba233bf67b
2015-02-22 20:33:45 -07:00
Edit Balint
652d187f26 servo: Merge #5020 - Implement Canvas pixel manipulation (from jdm:canvas); r=jdm
Rebase of #4639.

Source-Repo: https://github.com/servo/servo
Source-Revision: 287f390c4a56dd8c5960df699d45653227b25d6f
2015-02-22 11:48:46 -07:00
Jack Moffitt
132ee35633 servo: Merge #3230 - Cargoify servo (from servo:cargoify)
Source-Repo: https://github.com/servo/servo
Source-Revision: b1305bb7d051f83850c51bb0da0ccc86a5e07922
2014-09-09 08:18:18 -06:00