[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Public WebGL] Chrome blocking cross-origin textures starting in Chrome 13; CORS support implemented
- To: "[email protected]" <[email protected]>
- Subject: [Public WebGL] Chrome blocking cross-origin textures starting in Chrome 13; CORS support implemented
- From: Kenneth Russell <[email protected]>
- Date: Thu, 16 Jun 2011 11:06:09 -0700
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1308247571; bh=7vvaUCxnRzRczCNTRIDSx3uQTns=; h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=tyAfycsDk/0mdEkqdUY6KiGIqI5QoAC4me6WveONT8eoCBqcS8pzd29eviG2d81MH ri/OOAgk9TxHWnN1BGw9A==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=MYvbnoF29/Uux6YkpgMlyYt1iLuwsARUQo2AyJG8h7w=; b=w9uNYef6sdLG5pRCiX+631/xwAElJXBtwudGsMKnRWBhHsGUb6x4TrpmfAThZK07AL ZuLaFBoIyP43eiI4J1lg==
- Domainkey-signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:date:message-id:subject:from:to:content-type; b=rumuDU5AMwhOl5xh1BnPsNp6Hx+zDIfXM8WSwf1+274/gixzWbmEdg/5+j96KVJ5Yh 3sbeUXxgE13hLAlCV+xQ==
- List-id: Public WebGL Mailing List <public_webgl.khronos.org>
- Sender: [email protected]
As of Chrome 13, cross-origin textures are no longer supported in
WebGL per recent spec updates. Attempts to upload a cross-origin image
or video, or a tainted 2D canvas, to WebGL will throw a
DOM_SECURITY_ERR exception. This new behavior can be tested in the
Chrome Canary builds for Windows and Mac, or in top-of-tree Chromium
builds.
Thanks to Adam Barth and Nate Chapin from the Chrome team, CORS
support for images and videos is now *fully implemented* in WebKit.
This means that sophisticated applications that were using
cross-origin textures can continue to do so, assuming the server
grants permission. It is only a one-line change to make a CORS
request:
var img = new Image();
img.onload = ...; // set onload handler
img.crossOrigin = ""; // make anonymous CORS request; this is new
img.src = ...; // set URL of image
Picasa currently supports CORS requests, and we are working to
evangelize this support to other image and video hosting services. If
you use a particular one frequently, please encourage them to add CORS
support.
-Ken
-----------------------------------------------------------
You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------