Auto merge of #8723 - dzbarsky:origin_clean, r=dzbarsky

Add origin-clean flag tracking for canvas

The resulting failures are because we aren't doing origin-comparison correctly (I bet the image ends up with an empty hostname or something). We could probably hack around that if we care, but it should just go away when we get the origin checking right.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8723)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-12-18 04:26:59 +05:30
commit 82e73e7a5f
15 changed files with 135 additions and 86 deletions

View file

@ -0,0 +1,5 @@
[security.dataURI.html]
type: testharness
[data: URIs do not count as different-origin, and do not taint the canvas]
expected: FAIL

View file

@ -1,5 +0,0 @@
[security.drawImage.canvas.sub.html]
type: testharness
[drawImage of unclean canvas makes the canvas origin-unclean]
expected: FAIL

View file

@ -1,5 +0,0 @@
[security.drawImage.image.sub.html]
type: testharness
[drawImage of different-origin image makes the canvas origin-unclean]
expected: FAIL

View file

@ -1,5 +0,0 @@
[security.pattern.canvas.fillStyle.sub.html]
type: testharness
[Setting fillStyle to a pattern of an unclean canvas makes the canvas origin-unclean]
expected: FAIL

View file

@ -1,5 +0,0 @@
[security.pattern.canvas.strokeStyle.sub.html]
type: testharness
[Setting strokeStyle to a pattern of an unclean canvas makes the canvas origin-unclean]
expected: FAIL

View file

@ -1,5 +0,0 @@
[security.pattern.cross.sub.html]
type: testharness
[Using an unclean pattern makes the target canvas origin-unclean, not the pattern canvas]
expected: FAIL

View file

@ -1,5 +0,0 @@
[security.pattern.image.fillStyle.sub.html]
type: testharness
[Setting fillStyle to a pattern of a different-origin image makes the canvas origin-unclean]
expected: FAIL

View file

@ -1,5 +0,0 @@
[security.pattern.image.strokeStyle.sub.html]
type: testharness
[Setting strokeStyle to a pattern of a different-origin image makes the canvas origin-unclean]
expected: FAIL

View file

@ -1,5 +0,0 @@
[security.reset.sub.html]
type: testharness
[Resetting the canvas state does not reset the origin-clean flag]
expected: FAIL

View file

@ -0,0 +1,5 @@
[toDataURL.jpeg.primarycolours.html]
type: testharness
[toDataURL with JPEG handles simple colours correctly]
expected: FAIL

View file

@ -0,0 +1,5 @@
[toDataURL.png.complexcolours.html]
type: testharness
[toDataURL with PNG handles non-primary and non-solid colours correctly]
expected: FAIL

View file

@ -0,0 +1,5 @@
[toDataURL.png.primarycolours.html]
type: testharness
[toDataURL with PNG handles simple colours correctly]
expected: FAIL