Fix iOS 10.3 base64 image tainting canvas (Fix #1151)

This commit is contained in:
Niklas von Hertzen
2017-08-13 23:27:03 +08:00
parent fd1447a6e7
commit 8999c76181
4 changed files with 73 additions and 16 deletions

View File

@ -20,6 +20,9 @@
style="fill:#40aa54;fill-opacity:1;stroke:#20552a;stroke-width:7.99999952;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="88" height="60" viewBox="0 0 88 60"><text xmlns="http://www.w3.org/2000/svg" font-family="Verdana" font-weight="700" text-anchor="middle" x="46" y="18">ABCDE</text><text xmlns="http://www.w3.org/2000/svg" font-family="Verdana" font-weight="700" text-anchor="middle" x="44" y="16" fill="white">ABCDE</text></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="88" height="60" viewBox="0 0 88 60"><text xmlns="http://www.w3.org/2000/svg" font-family="Verdana" font-size="12px" font-weight="700" text-anchor="middle"><tspan fill="black" x="46" y="18">ABC</tspan><tspan fill="white" x="44" y="16">ABC</tspan><tspan fill="black" x="46" y="35">123</tspan><tspan fill="white" x="44" y="33">123</tspan></text></svg>
</div>
</body>
</html>

View File

@ -95,14 +95,18 @@ const assertPath = (result, expected, desc) => {
testContainer.src = url + '?selenium&run=false&reftest&' + Math.random();
if (hasHistoryApi) {
// Chrome does not resolve relative background urls correctly inside of a nested iframe
history.replaceState(null, '', url);
try {
history.replaceState(null, '', url);
} catch (e) {}
}
document.body.appendChild(testContainer);
});
after(() => {
if (hasHistoryApi) {
history.replaceState(null, '', testRunnerUrl);
try {
history.replaceState(null, '', testRunnerUrl);
} catch (e) {}
}
document.body.removeChild(testContainer);
});