Re: [whatwg] deprecating

2015-09-03 Thread Oliver Hunt
> On Sep 3, 2015, at 11:33 AM, Melvin Carvalho wrote: >> > > Im not an expert here, but my understanding from reading some wikipedia > articles was that a preimage attack on md5 was 2^123. For a pre-image attack that’s true (or thereabouts), the real problem is

Re: [whatwg] Bicubic filtering on context.drawImage

2013-12-09 Thread Oliver Hunt
On Dec 9, 2013, at 2:29 PM, Tingan Ho tin...@p1.cn wrote: Tingan, would it be acceptable for you to do the resampling in JavaScript? First, writing it in Javascript is less performant. Since natively you can have access to the GPU. Second, it is abstract a layer for JS developers,

[whatwg] Structured Clone of Map and Set objects

2013-09-04 Thread Oliver Hunt
The current structured clone algorithm does not include support for the Map and Set types, so a developer would need to manually implement the serialisation and deserialisation. While this would not be impossible it does seem like it is an unnecessary inconvenience for a core type in ES6. The

Re: [whatwg] Proposal: Add window.getLastError (or modify invocation arguments of window.onerror)

2013-02-04 Thread Oliver Hunt
On Feb 4, 2013, at 2:40 PM, Garrett Smith dhtmlkitc...@gmail.com wrote: That's fair enough. Though not all exceptions are Errors -- DOMException currently isn't, though I think some people want it to somehow inherit from Error. Why not? That's something lost in the mists of time, however

Re: [whatwg] Hardware accelerated canvas

2012-09-04 Thread Oliver Hunt
The context is owned by the canvas element. If the canvas element is still alive then by definition so is the context. --Oliver On Sep 4, 2012, at 12:31 PM, Jussi Kalliokoski jussi.kallioko...@gmail.com wrote: Hmm... Is it visible to the page outside getContext() ? On Tue, Sep 4, 2012 at

Re: [whatwg] [canvas] request for {create, get, put}ImageDataHD and ctx.backingStorePixelRatio

2012-04-17 Thread Oliver Hunt
On Apr 17, 2012, at 3:32 PM, Darin Fisher da...@chromium.org wrote: On Mon, Apr 16, 2012 at 4:05 PM, Darin Fisher da...@chromium.org wrote: On Mon, Apr 16, 2012 at 2:57 PM, Oliver Hunt oli...@apple.com wrote: On Apr 16, 2012, at 2:34 PM, Darin Fisher da...@chromium.org wrote

Re: [whatwg] [canvas] request for {create, get, put}ImageDataHD and ctx.backingStorePixelRatio

2012-04-16 Thread Oliver Hunt
On Apr 16, 2012, at 11:07 AM, Darin Fisher da...@chromium.org wrote: Carrots and Sticks. Aren't we missing an opportunity here? By giving web developers this easy migration path, you're also giving up the opportunity to encourage them to use a better API. Asynchronous APIs are harder

Re: [whatwg] [canvas] request for {create, get, put}ImageDataHD and ctx.backingStorePixelRatio

2012-04-16 Thread Oliver Hunt
On Apr 16, 2012, at 11:38 AM, Darin Fisher da...@chromium.org wrote: On Mon, Apr 16, 2012 at 11:17 AM, Oliver Hunt oli...@apple.com wrote: On Apr 16, 2012, at 11:07 AM, Darin Fisher da...@chromium.org wrote: Carrots and Sticks. Aren't we missing an opportunity here? By giving web

Re: [whatwg] [canvas] request for {create, get, put}ImageDataHD and ctx.backingStorePixelRatio

2012-04-16 Thread Oliver Hunt
deferred rendering rather than GPU copyback, can we drop GPU related arguments from this thread? --Oliver On Apr 16, 2012, at 12:10 PM, Glenn Maynard gl...@zewt.org wrote: On Mon, Apr 16, 2012 at 1:59 PM, Oliver Hunt oli...@apple.com wrote: I don't understand why adding a runloop cycle to any

Re: [whatwg] [canvas] request for {create, get, put}ImageDataHD and ctx.backingStorePixelRatio

2012-04-16 Thread Oliver Hunt
On Apr 16, 2012, at 1:12 PM, Darin Fisher da...@chromium.org wrote: Glenn summarizes my concerns exactly. Deferred rendering is indeed the more precise issue. On Mon, Apr 16, 2012 at 12:18 PM, Oliver Hunt oli...@apple.com wrote: Could someone construct a demonstration of where the read

Re: [whatwg] [canvas] request for {create, get, put}ImageDataHD and ctx.backingStorePixelRatio

2012-04-16 Thread Oliver Hunt
On Apr 16, 2012, at 11:07 AM, Darin Fisher da...@chromium.org wrote: See synchronous XMLHttpRequest. I'm sure every browser vendor wishes that didn't exist. Note how we recently withdrew support for synchronous ArrayBuffer access on XHR? We did this precisely to discourage use of

Re: [whatwg] [canvas] request for {create, get, put}ImageDataHD and ctx.backingStorePixelRatio

2012-04-16 Thread Oliver Hunt
On Apr 16, 2012, at 2:00 PM, Darin Fisher da...@chromium.org wrote: I have learned that it is not commonly accepted that reading ImageData can be slow. I had assumed otherwise. Yes, it's possible to make reading image data slow, but i can make _anything_ slow. I could make postMessage slow

Re: [whatwg] [canvas] request for {create, get, put}ImageDataHD and ctx.backingStorePixelRatio

2012-04-16 Thread Oliver Hunt
On Apr 16, 2012, at 2:34 PM, Darin Fisher da...@chromium.org wrote: On Mon, Apr 16, 2012 at 1:39 PM, Oliver Hunt oli...@apple.com wrote: On Apr 16, 2012, at 1:12 PM, Darin Fisher da...@chromium.org wrote: Glenn summarizes my concerns exactly. Deferred rendering is indeed the more

Re: [whatwg] Why do we need Mozilla in userAgent string?

2011-03-26 Thread Oliver Hunt
Because there are a huge number of sites out there that check for the existence of a feature by doing 'navigator.userAgent.indexOf(mozilla) != -1' or similar (or they decide that the absence of the mozilla term means that you're IE6), so not including the word mozilla in the user agent would

Re: [whatwg] Cryptographically strong random numbers

2011-02-17 Thread Oliver Hunt
I don't think generating 16bit values is beneficial -- either 8bit values for byte at a time processing or full [u]int32 makes more sense. I think the only reason for 16bit to come up is ecmascript's notionally 16bit characters. I would prefer polymorphism of some form, for example any

Re: [whatwg] Cryptographically strong random numbers

2011-02-16 Thread Oliver Hunt
I agree with this sentiment, the specification should simply state the returned values are guaranteed to be cryptographically secure, that's all that needs to be said. There is no need to describe how this is implemented, if an implementation provides predictable values then that

Re: [whatwg] ArrayBuffer and the structured clone algorithm

2011-02-01 Thread Oliver Hunt
On Feb 1, 2011, at 10:04 AM, Anne van Kesteren wrote: On Tue, 01 Feb 2011 18:36:19 +0100, Boris Zbarsky bzbar...@mit.edu wrote: On 2/1/11 5:19 AM, Simon Pieters wrote: While you're discussing efficient handoff of ArrayBuffer, do you also keep in mind efficient handoff of other objects (e.g.

Re: [whatwg] Exposing spelling/grammar suggestions in contentEditable

2010-11-28 Thread Oliver Hunt
It _may_ be worth discussing (as I am not all knowing) but I cannot see a way that these APIs could be added without opening up a user to privacy violations. It is somewhat irksome to me that I have raised these exact issues in the past in the context of implementing editors in canvas and you

Re: [whatwg] Canvas API: What should happen if non-finite floats are used

2010-09-08 Thread Oliver Hunt
The problem with throwing an exception is that it's fairly common for code to end up accidentally producing a NaN or Infinite value, and throwing an exception would prevent all subsequent drawing from occurring. I suggested this behaviour a long time ago after running into yet another piece of

Re: [whatwg] Canvas API: What should happen if non-finite floats are used

2010-09-08 Thread Oliver Hunt
On Sep 8, 2010, at 10:20 AM, Eric Uhrhane wrote: On Wed, Sep 8, 2010 at 9:45 AM, Oliver Hunt oli...@apple.com wrote: The problem with throwing an exception is that it's fairly common for code to end up accidentally producing a NaN or Infinite value, and throwing an exception would prevent

Re: [whatwg] ArrayBuffer and ByteArray questions

2010-09-08 Thread Oliver Hunt
On Sep 8, 2010, at 11:13 AM, Chris Marrin wrote: Web Sockets is certainly another candidate, but I meant Web Workers. There have been informal discussions on using ArrayBuffers as a way to safely share binary data between threads. I don't believe anything has been formalized here. You

Re: [whatwg] Canvas API: What should happen if non-finite floats are used

2010-09-08 Thread Oliver Hunt
On Sep 8, 2010, at 11:00 AM, Boris Zbarsky wrote: On 9/8/10 12:45 PM, Oliver Hunt wrote: I suggested this behaviour a long time ago after running into yet another piece of code that hit this case in webkit (back when the spec said to throw an exception) yet firefox and opera did not throw

Re: [whatwg] Adding ECMAScript 5 array extras to HTMLCollection

2010-08-05 Thread Oliver Hunt
On Aug 4, 2010, at 6:26 PM, Garrett Smith wrote: On 8/4/10, Oliver Hunt oli...@apple.com wrote: On Aug 4, 2010, at 3:32 PM, Garrett Smith wrote: On 8/4/10, Garrett Smith dhtmlkitc...@gmail.com wrote: [...] submitButton in form.elements Existing implementations vary on when they use

Re: [whatwg] Adding ECMAScript 5 array extras to HTMLCollection

2010-08-04 Thread Oliver Hunt
On Aug 4, 2010, at 3:32 PM, Garrett Smith wrote: On 8/4/10, Garrett Smith dhtmlkitc...@gmail.com wrote: [...] submitButton in form.elements Existing implementations vary on when they use catchalls. I'd like to see standardization for this behavior and codification so that

Re: [whatwg] Adding ECMAScript 5 array extras to HTMLCollection

2010-08-02 Thread Oliver Hunt
On Aug 2, 2010, at 7:36 AM, And Clover wrote: On 07/30/2010 06:43 AM, Oliver Hunt wrote: all array functions defined in ES5 are generic in that they work over any array-like object. They're guaranteed to work over any array-like native JavaScript object. They're *not* guaranteed to work

Re: [whatwg] Adding ECMAScript 5 array extras to HTMLCollection

2010-08-02 Thread Oliver Hunt
On Aug 2, 2010, at 12:57 PM, Garrett Smith wrote: I also linked to the old catchalls proposal earlier in the thread. That is because the host objects mentioned here have a specialized catchall behavior that isn't yet defined by any specification, so when the code has property access with an

Re: [whatwg] Adding ECMAScript 5 array extras to HTMLCollection

2010-07-30 Thread Oliver Hunt
On Jul 30, 2010, at 2:46 PM, Alex Russell wrote: On Fri, Jul 30, 2010 at 4:18 AM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Jul 29, 2010 at 5:45 PM, Ian Hickson i...@hixie.ch wrote: The e-mails quoted below consist of the salient points of this thread: On Fri, 23 Apr 2010, David

Re: [whatwg] Adding ECMAScript 5 array extras to HTMLCollection

2010-07-29 Thread Oliver Hunt
On Jul 29, 2010, at 9:03 PM, Alex Russell wrote: On Mon, Apr 26, 2010 at 10:04 AM, David Flanagan da...@davidflanagan.com wrote: Erik Arvidsson wrote: for (var i = 0, length = collection.length; i length; i++) // instead of: for (var i = 0; i collection.length; i++) Actually, the

Re: [whatwg] Canvas: clarification of compositing operations needed

2010-07-28 Thread Oliver Hunt
On Jul 28, 2010, at 2:46 PM, Tab Atkins Jr. wrote: On Wed, Jul 28, 2010 at 2:43 PM, David Flanagan da...@davidflanagan.com wrote: Firefox and Chrome disagree about the implementation of the destination-atop, source-in, destination-in, and source-out compositing operators. Test code is

Re: [whatwg] Canvas isPointInPath() coordinate space

2010-07-15 Thread Oliver Hunt
On Jul 14, 2010, at 10:58 PM, David Flanagan wrote: Here's another coordinate-space related question. I assume that the intended purpose of isPointInPath() is hit testing. You get a click event on a canvas element, extract the mouse coordinates from the event object, subtract the canvas

Re: [whatwg] Canvas coordinate space units

2010-07-14 Thread Oliver Hunt
On Jul 14, 2010, at 5:29 PM, David Flanagan wrote: Aryeh Gregor wrote: On Wed, Jul 14, 2010 at 3:03 PM, David Flanagan da...@davidflanagan.com wrote: I'm confused by the term coordinate space units as applied to the canvas spec. It does not seem to be defined. It seems clear to me.

Re: [whatwg] Web Workers API

2010-07-02 Thread Oliver Hunt
All meesaging through postMessage uses the internal structured cloning algorithm detailed at http://www.w3.org/TR/2010/WD-html5-20100304/Overview.html#internal-structured-cloning-algorithm It's basically a deep copy, but has a few restrictions on the types cloned, and doesn't copy functions or

Re: [whatwg] Canvas putImageData - Can we scale?

2010-06-04 Thread Oliver Hunt
On Jun 4, 2010, at 10:05 AM, Rob Evans wrote: Hi, I wonder if this is the correct place to post this but I cannot find any resources online as canvas is so new. Canvas isn't new -- it's at least 4 or 5 years old, and has been in the html5 spec for at least 2 or 3 of those

Re: [whatwg] Offscreen canvas (or canvas for web workers).

2010-03-15 Thread Oliver Hunt
On Mar 15, 2010, at 2:24 PM, Vladimir Vukicevic wrote: If we wanted to support this across workers (and I think it would be helpful to figure out how to do so), something like saying that if a canvas object was passed (somehow) between workers, it would be a copy -- and internally it could

Re: [whatwg] Offscreen canvas (or canvas for web workers).

2010-03-13 Thread Oliver Hunt
On Mar 13, 2010, at 9:10 AM, Jonas Sicking wrote: There is a use case, which I suspect is quite common, for using canvas to manipulate files on the users file system. For example when creating a photo uploader which does client side scaling before uploading the images, or for creating a web

Re: [whatwg] Offscreen canvas (or canvas for web workers).

2010-03-12 Thread Oliver Hunt
On Mar 12, 2010, at 12:16 PM, Jonas Sicking wrote: I'm not saying that the proposed API is bad. It just doesn't seem to solve the (seemingly most commonly requested) use case of rotating/scaling images. So if we want to solve those use cases we need to either come up with a separate API for

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Oliver Hunt
On Feb 3, 2010, at 10:01 AM, Tim Hutt wrote: On 3 February 2010 17:45, Boris Zbarsky bzbar...@mit.edu wrote: On 2/3/10 12:22 PM, Tim Hutt wrote: Yes it should be cleared and there should be a oncanvasresize() callback. What uses cases does this cover that are not covered by a general

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Oliver Hunt
On Feb 3, 2010, at 11:54 AM, Tim Hutt wrote: On 3 February 2010 19:23, Oliver Hunt oli...@apple.com wrote: 1. Support more length specifiers for the width and height of a canvas(%, em, etc.). This doesn't really make sense for the backing buffer as it is logically defined in terms

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Oliver Hunt
On Feb 3, 2010, at 11:54 AM, Tim Hutt wrote: On 3 February 2010 19:23, Oliver Hunt oli...@apple.com wrote: 1. Support more length specifiers for the width and height of a canvas(%, em, etc.). This doesn't really make sense for the backing buffer as it is logically defined in terms

Re: [whatwg] Passing more than JSON data to workers

2009-12-17 Thread Oliver Hunt
On Dec 17, 2009, at 10:03 PM, Boris Zbarsky wrote: On 12/17/09 12:48 AM, Boris Zbarsky wrote: It seems very difficult to me to come up with a function cloning solution that won't break in subtle ways when such functions are passed to it... I should clarify this. It seems to me eminently

Re: [whatwg] offscreen canvas /Access to canvas functionality from a worker

2009-12-10 Thread Oliver Hunt
Ideally if we were to have a graphics context in a worker we'd want it to be the standard CanvasRenderingContext2D, the only real problem is that CanvasRenderingContext2D references the parent canvas element which clearly won't fly in a worker. I've been thinking of creating something like a

Re: [whatwg] offscreen canvas /Access to canvas functionality from a worker

2009-12-06 Thread Oliver Hunt
On Dec 6, 2009, at 10:18 PM, Sigbjorn Finne wrote: On 12/5/2009 13:24, Franz Buchinger wrote: Gears introduced the concept of an offscreen canvas that doesn't draw anything in the browser window, but can be used to manipulate images in a web worker. I used this functionality to implement

Re: [whatwg] Web API for speech recognition and synthesis

2009-12-03 Thread Oliver Hunt
On Dec 3, 2009, at 4:06 AM, Bjorn Bringert wrote: On Wed, Dec 2, 2009 at 10:20 PM, Jonas Sicking jo...@sicking.cc wrote: On Wed, Dec 2, 2009 at 11:17 AM, Bjorn Bringert bring...@google.com wrote: I agree that being able to capture and upload audio to a server would be useful for a lot of

Re: [whatwg] Canvas pixel manipulation and performance

2009-11-29 Thread Oliver Hunt
On Nov 29, 2009, at 10:59 AM, Kenneth Russell wrote: On Sat, Nov 28, 2009 at 9:47 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 11/29/09 12:15 AM, Kenneth Russell wrote: I assume you meant JS bitwise operators? Do we have any indication that this would be faster than four array property

Re: [whatwg] Canvas pixel manipulation and performance

2009-11-26 Thread Oliver Hunt
On Nov 26, 2009, at 11:45 AM, Jason Oster wrote: Hello Group, I've been using canvas to draw pixel art (NES/SNES game screens and sprites) similar to what an emulator would do. Doing this kind of drawing requires direct access to the pixel buffer. My problem with the canvas spec (as

Re: [whatwg] Canvas Proposal: aliasClipping property

2009-10-16 Thread Oliver Hunt
On Oct 16, 2009, at 8:10 PM, Robert O'Callahan wrote: On Sat, Oct 17, 2009 at 4:01 AM, Philip Taylor excors+wha...@gmail.com wrote: Yes, mostly. http://philip.html5.org/tests/canvas/suite/tests/index.2d.composite.uncovered.html has relevant tests, matching what I believed the spec said - on

Re: [whatwg] Application defined locks

2009-09-10 Thread Oliver Hunt
On Sep 10, 2009, at 12:55 PM, Darin Fisher wrote: On Thu, Sep 10, 2009 at 12:32 PM, Maciej Stachowiak m...@apple.com wrote: On Sep 10, 2009, at 11:22 AM, Michael Nordman wrote: On Wed, Sep 9, 2009 at 7:55 PM, Robert O'Callahan rob...@ocallahan.org wrote: On Thu, Sep 10, 2009 at 2:38

Re: [whatwg] createImageData should take unsigned long

2009-09-03 Thread Oliver Hunt
On Sep 3, 2009, at 4:54 AM, Ian Hickson wrote: Yeah, that seems likely, since none of you implemented the higher-DPI ImageData in your first versions. :-( WebKit's implementation has always worked with high dpi backing stores and follows the spec accordingly. --Oliver

Re: [whatwg] createImageData should take unsigned long

2009-09-03 Thread Oliver Hunt
On Sep 3, 2009, at 4:50 PM, Robert O'Callahan wrote: On Fri, Sep 4, 2009 at 4:48 AM, Oliver Hunt oli...@apple.com wrote: On Sep 3, 2009, at 4:54 AM, Ian Hickson wrote: Yeah, that seems likely, since none of you implemented the higher-DPI ImageData in your first versions. :-( WebKit's

Re: [whatwg] Drag and Drop Security Model and current implementations

2009-08-24 Thread Oliver Hunt
I've made the types list visible during all the events, but I'm skeptical about making everything available. We'll probably revisit this in a few years when we have a test suite for this. (I probably need to rewrite the way this section is written before making any more significant

[whatwg] CanvasRenderingContext2D.lineTo compatibility problem

2009-07-11 Thread Oliver Hunt
While investigating a compatibility issue with http://www.blahbleh.com/clock.php I found that the spec behaviour on CanvasRenderingContext2D.lineTo conflicts with what Gecko implements. The current spec language is The lineTo(x, y) method must do nothing if the context has no subpaths.

[whatwg] bezierCurveTo summary is incorrect

2009-07-11 Thread Oliver Hunt
Just noticed while looking at the path modification functions that the summary of bezierCurveTo (at the beginning of Section 4.8.11.1.8) gives bezierCurveTo the signature bezierCurveTo(cpx, cpy, x, y) which is the signature for quadraticCurveTo. The signature should be bezierCurveTo(cp1x,

Re: [whatwg] CanvasRenderingContext2D.lineTo compatibility problem

2009-07-11 Thread Oliver Hunt
(..);lineTo(..);lineTo(..) will draw nothing as the path never becomes non-empty so none of the calls can ever have an effect, whereas this re-specification would result in subsequent operations drawing something. --Oliver On Jul 11, 2009, at 3:41 PM, Oliver Hunt wrote: While investigating

Re: [whatwg] Non-ecmascript bindings (was Re: Serving up Theora video in the real world)

2009-07-10 Thread Oliver Hunt
On Jul 10, 2009, at 3:27 PM, James Graham wrote: Quoting Kartikaya Gupta lists.wha...@stakface.com: Really, it's not that much work to make sure the API can have bindings in other languages. As long as you can write WebIDL for it (and provide relevant DOM feature strings wherever

Re: [whatwg] Canvas context.drawImage clarification

2009-07-10 Thread Oliver Hunt
On Jul 10, 2009, at 6:38 PM, Gregg Tavares wrote: On Thu, Jul 9, 2009 at 6:25 PM, Oliver Hunt oli...@apple.com wrote: Inconsistency doesn't lead to no one depending on a behaviour, it just means sites only work in one browser. Your suggesting would result in sites being broken in all

Re: [whatwg] Canvas context.drawImage clarification

2009-07-09 Thread Oliver Hunt
I'd like to make a passionate plea that the spec say implementations must support negative widths and negative heights and draw the image backward effectively flipping the result. We'd need to be fairly sure that such a change would not break existing content -- this is a change that

Re: [whatwg] Canvas context.drawImage clarification

2009-07-09 Thread Oliver Hunt
On Jul 9, 2009, at 4:19 PM, Gregg Tavares wrote: On Thu, Jul 9, 2009 at 4:11 PM, Oliver Hunt oli...@apple.com wrote: I'd like to make a passionate plea that the spec say implementations must support negative widths and negative heights and draw the image backward effectively flipping

Re: [whatwg] Canvas context.drawImage clarification

2009-07-09 Thread Oliver Hunt
On Jul 9, 2009, at 9:09 PM, Brian Campbell wrote: On Jul 9, 2009, at 9:25 PM, Oliver Hunt wrote: I disagree. When I scale a rectangular opaque image I expect rectangular opaque results. The Firefox implementation does not do this. If you believe that to be the case then you can always

Re: [whatwg] Codecs for audio and video

2009-07-06 Thread Oliver Hunt
On Jul 6, 2009, at 6:08 PM, Ian Hickson wrote: On Mon, 6 Jul 2009, Charles Pritchard wrote: This is on the list of things to consider in a future version. At this point I don't really want to add new features yet because otherwise we'll never get the browser vendors caught up to

Re: [whatwg] UTF-16 encoding default

2009-06-23 Thread Oliver Hunt
Have you checked for a byte order marker in the source document? (see http://unicode.org/faq/utf_bom.html#BOM ) --Oliver On Jun 23, 2009, at 6:42 PM, Kartikaya Gupta wrote: There's a page (http://www.microsoft.com/windowsmobile/mobile/en-us/totalaccess/software/software/eula-sw-netflix.mspx

Re: [whatwg] Browser Bundled Javascript Repository

2009-06-15 Thread Oliver Hunt
Pros: - Pre-Compiled: By bundling known JS Libraries with the browser, the browser could store a more efficient representation of the file. For instance pre-compiled into Bytecode or something else browser specific. I think something needs to be clarified wrt to compile times and the

Re: [whatwg] Limit on number of parallel Workers.

2009-06-09 Thread Oliver Hunt
I believe that this will be difficult to have such a limit as sites may rely on GC to collect Workers that are no longer running (so number of running threads is non-deterministic), and in the context of mix source content (mash-ups) it will be difficult for any content source to be sure

Re: [whatwg] getImageData/putImageData comments

2009-05-31 Thread Oliver Hunt
Worse yet, the current setup means that a script that tries createImageData, fill in the pixels, and then paint it to the canvas, needs to fill different numbers of pixels depending on the output device. I fully expect script authors to get this very very wrong, since it's such

Re: [whatwg] SVG extensions to canvas

2009-05-06 Thread Oliver Hunt
SVG images often don't have an intrinsic size. What's the intrinsic size of this image? svg xmlns=http://www.w3.org/2000/svg; linearGradient id=g x1=0 y1=0 x2=1 y2=0 stop stop-color=red offset=0/stop stop-color=lime offset=1/ /linearGradient rect x=0% y=0% width=100% height=100%

Re: [whatwg] Opera2d-game Extensions to Canvas: setPixel() and getPixel()

2009-04-07 Thread Oliver Hunt
Why not make getPixel () and setPixel() a standard? The ImageData APIs already provide the ability to do this and are already supported by Firefox, Opera and Safari. --Oliver

Re: [whatwg] Canvas - Exception on arc with negative radius

2009-03-29 Thread Oliver Hunt
I commented to the list on this issue some time ago (and a number of the APIs were updated base don my comments); in general developers do not expect graphics libraries to throw exceptions, especially for values that are frequently computed. We've had numerous cases where webkit has had

Re: [whatwg] localStorage + worker processes

2009-03-20 Thread Oliver Hunt
When discussing this standard we have to recognize that not all browsers actually have a main thread. Time will tell if more or less browsers of the future will have multi-threaded architectures, but the trend has been for more I think. Any aspects of the spec that asserts or assumes a main

[whatwg] postMessage object cloning

2009-03-16 Thread Oliver Hunt
So I've been looking at the object cloning rules for postMessage and have noticed a couple of things that seem less than ideal. The first is that it fails to specify the behaviour of cloning for prototype chains. While this is definitely an issue specific to JS rather than binding

Re: [whatwg] Script loading and execution order for importScripts

2009-03-07 Thread Oliver Hunt
On Mar 7, 2009, at 1:20 AM, ben turner wrote: On Fri, Mar 6, 2009 at 8:40 PM, Oliver Hunt oli...@apple.com wrote: In all honesty i'm not sure which is the better approach as the spec approach requires developers to manually handle the potential for partial library execution, but the Mozilla

Re: [whatwg] Script loading and execution order for importScripts

2009-03-07 Thread Oliver Hunt
Yes, i realise it does more than _just_ a syntax check, but the user observable effect is just the success or failure of syntax check :D --Oliver On Mar 7, 2009, at 12:51 PM, Boris Zbarsky wrote: Oliver Hunt wrote: If by compilation you mean you're (effectively) just doing a syntax check

Re: [whatwg] Script loading and execution order for importScripts

2009-03-07 Thread Oliver Hunt
Why do you think it's important not to have side effects for syntax errors but don't think it's important to not have side effects for run-time errors? Given that we simply can't fix the latter, I don't see any advantage to users to attempt to fix the former. I really don't think optimizing for

Re: [whatwg] Script loading and execution order for importScripts

2009-03-07 Thread Oliver Hunt
On Mar 7, 2009, at 11:22 PM, ben turner wrote: Just to clarify, if two scripts fail to load or compile then Mozilla always throws the error encountered by the first of the failed scripts. So, if I have a worker that does this: importScripts(1.js, 2.js, 3.js); and 1.js fails to load and 3.js

[whatwg] Script loading and execution order for importScripts

2009-03-06 Thread Oliver Hunt
So I've been looking at importScripts (http://www.whatwg.org/specs/web-workers/current-work/#importing-scripts-and-libraries ) and found that the behaviour of Mozilla differs from the behaviour defined in the spec. The spec behaviour is (pseudo code, skipping url validation, etc) function

[whatwg] Yet another issue with the ImageData API

2008-12-17 Thread Oliver Hunt
So while playing around with some image filtering code using the Canvas ImageData APIs I realised that the APIs as currently designed make it difficult to do certain kinds of operation. The specific issue is that there is no direct mechanism to get a working/scratch ImageData object of

Re: [whatwg] setting canvas colors as array

2008-10-05 Thread Oliver Hunt
Whoops, sorry -- Philipp Serafin did -- i misread my mail reply indentation, sorry :D On Oct 5, 2008, at 10:10 AM, Kristof Zelechovski wrote: Correction: I did not write that. Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Oliver Hunt Sent

Re: [whatwg] setting canvas colors as array

2008-10-04 Thread Oliver Hunt
On Oct 4, 2008, at 2:53 PM, Maciej Stachowiak wrote: setFillColor avoid the need for allocation entirely in all cases. We could also consider letting fillStyle take a number to be interpreted as a 32-bit RGBA value, since modern JS engines can do math and masking faster than string

Re: [whatwg] Canvas performance issue: setting colors

2008-09-29 Thread Oliver Hunt
I think the canvas api should get 2 new methods: CanvasColor createRGBAColor(in float r, in float g, in float b, in float a) CanvasColor createHSLAColor(in float h, in float s, in float l, in float a) WebKit already has a non-standard function -- setFillColor(r, g, b, a) -- that

Re: [whatwg] Using video as a source for canvas.drawImage

2008-08-18 Thread Oliver Hunt
Cool -- I wonder though if it would be better if it were placed in a different method, drawFrame or something (very much an up in the air sort of question) One other thing that I would consider would be requiring the frame# to be specified explicitly as that would make things like chapter

Re: [whatwg] Using video as a source for canvas.drawImage

2008-08-18 Thread Oliver Hunt
On Aug 18, 2008, at 5:58 PM, Robert O'Callahan wrote: On Tue, Aug 19, 2008 at 11:24 AM, Oliver Hunt [EMAIL PROTECTED] wrote: Cool -- I wonder though if it would be better if it were placed in a different method, drawFrame or something (very much an up in the air sort of question

Re: [whatwg] canvas shadow compositing oddities

2008-07-29 Thread Oliver Hunt
states should not draw anything -- so that should act as an explicit mechanism for disabling shadows should it not? It's possible i've missed something, but this would appear to accomplish what you desire afaict. -Eric Butler --Oliver Hunt

Re: [whatwg] canvas shadow compositing oddities

2008-07-29 Thread Oliver Hunt
On Jul 29, 2008, at 3:56 AM, Oliver Hunt wrote: On Jul 27, 2008, at 12:06 PM, Eric Butler wrote: It would seem Safari isn't quite following the spec here, since it appears to never draw shadows when the shadow color is fully transparent or something and doesn't encounter these issues

Re: [whatwg] Audio canvas?

2008-07-16 Thread Oliver Hunt
Question: What do people think about making audio more like canvas as sketched above? I don't believe it would be appropriate for the audio tag to take on such an API. My reason is that canvas is very different from other elements -- it doesn't actually support any form of image loading

Re: [whatwg] Audio canvas?

2008-07-16 Thread Oliver Hunt
On Jul 16, 2008, at 4:39 AM, Fabien Meghazi wrote: On Wed, Jul 16, 2008 at 1:10 PM, Oliver Hunt [EMAIL PROTECTED] wrote: Question: What do people think about making audio more like canvas as sketched above? Well I guess it would be cool for writing canvas games, and necessary if support

Re: [whatwg] Audio canvas?

2008-07-16 Thread Oliver Hunt
On Jul 16, 2008, at 5:00 AM, Fabien Meghazi wrote: I should note that i am not necessarily against the idea of an audio equivalent of the canvas element, i just don't believe such an API should be part of the audio element. Do you mean adding audio facilities as described by Markus into

Re: [whatwg] [canvas] imageRenderingQuality property

2008-07-01 Thread Oliver Hunt
be.' This is semantic information the browser has no way of inferring. Cheers, Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Oliver Hunt Sent: Tuesday, July 01, 2008 2:18 AM To: Mark Finkle Cc: Vladimir Vukicevic; Robert O'Callahan; WHATWG; David Hyatt

Re: [whatwg] [canvas] imageRenderingQuality property

2008-06-30 Thread Oliver Hunt
On Jun 30, 2008, at 4:14 PM, Vladimir Vukicevic wrote: On Jun 11, 2008, at 3:34 AM, Ian Hickson wrote: On Mon, 2 Jun 2008, Vladimir Vukicevic wrote: I'd like to propose adding an imageRenderingQuality property on the canvas 2D context to allow authors to choose speed vs. quality when

Re: [whatwg] [canvas] imageRenderingQuality property

2008-06-30 Thread Oliver Hunt
So now we need to define levels of graphic burden? and at what level of burden does the quality suffer? Seems just as hard to define. Having the author explicit say this has to be as high quality as possible or less can be low quality seems better and we have examples of other specs

Re: [whatwg] Canvas ath construction over save/restore boundaries

2008-06-12 Thread Oliver Hunt
On Jun 12, 2008, at 3:47 PM, Ian Hickson wrote: On Fri, 7 Mar 2008, Oliver Hunt wrote: Hi all, while working on a bug in our canvas implementation I've noticed that there's a difference in behaviour between Opera and Firefox when ... Removing a vast rambing initial email from myself

Re: [whatwg] [canvas] imageRenderingQuality property

2008-06-02 Thread Oliver Hunt
Um, could you actually give some kind of reasoning for these? I am not aware of any significant performance issues in Canvas that cannot be almost directly attributed to JavaScript itself rather than the canvas. --Oliver On Jun 2, 2008, at 12:19 PM, Vladimir Vukicevic wrote: I'd like

Re: [whatwg] [canvas] imageRenderingQuality property

2008-06-02 Thread Oliver Hunt
just once, and would prefer to do it at the highest quality filtering available even if it's more expensive than the default. - Vlad On Jun 2, 2008, at 12:25 PM, Oliver Hunt wrote: Um, could you actually give some kind of reasoning for these? I am not aware of any significant performance

Re: [whatwg] [canvas] imageRenderingQuality property

2008-06-02 Thread Oliver Hunt
On Jun 2, 2008, at 3:19 PM, Robert O'Callahan wrote: On Tue, Jun 3, 2008 at 9:39 AM, Oliver Hunt [EMAIL PROTECTED] wrote: That's exactly what i would be afraid of people doing. If I have a fast system why should i have to experience low quality rendering? It should be the job

Re: [whatwg] createImageData

2008-05-13 Thread Oliver Hunt
On May 13, 2008, at 1:53 PM, Vladimir Vukicevic wrote: The first argument to the method must be an ImageData object returned by createImageData(), getImageData(), or an object constructed with the necessary properties by the user. If the object was constructed by the user, its width and

Re: [whatwg] createImageData

2008-05-13 Thread Oliver Hunt
That said I still don't believe custom objects should be allowed, aside from the resolution (which may or may not be relevant) and performance issues, a custom object with a generic JS array, rather than an ImageData object will have different behaviour -- a proper ImageData will clamp on

Re: [whatwg] createImageData

2008-05-13 Thread Oliver Hunt
My experience implementing this in WebKit showed a pure byte array backing store was significantly faster than using boxed values. Faster for which operation, though? The put, or the actual manipulation? It's a tradeoff, really; if you're doing limited pixel manipulation, but lots of

Re: [whatwg] createImageData

2008-05-13 Thread Oliver Hunt
On May 13, 2008, at 4:28 PM, Vladimir Vukicevic wrote: On May 13, 2008, at 4:10 PM, Oliver Hunt wrote: My experience implementing this in WebKit showed a pure byte array backing store was significantly faster than using boxed values. Faster for which operation, though? The put

Re: [whatwg] createImageData

2008-05-10 Thread Oliver Hunt
On May 10, 2008, at 4:53 PM, Vladimir Vukicevic wrote: Another approach would be to not try to solve this in canvas at all, and instead specify that by default, all canvas elements are 96dpi, and provide authors a way to explicitly override this -- then using a combination of CSS Media

[whatwg] Canvas ath construction over save/restore boundaries

2008-03-07 Thread Oliver Hunt
Hi all, while working on a bug in our canvas implementation I've noticed that there's a difference in behaviour between Opera and Firefox when handling path construction over save/restore boundaries. Section 3.12.11.1.1 says that the canvas path is not part of the state that is effected

[whatwg] More ImageData issues

2008-02-21 Thread Oliver Hunt
A couple of relatively minor issues, the first is fairly simple, At the moment the spec merely states that putImageData(getImageData(sx,sy,..),sx,sy) should not result in any visible change to the canvas, however for those implementations that use a premultiplied buffer there is a necessary

[whatwg] Yet more image data questions

2008-02-19 Thread Oliver Hunt
Hi All, I have a few more ImageData related questions (as you may have guessed from the subject) The first is relatively simple, 3.14.11.1.10 states If any of the arguments to createImageData() or getImageData() are infinite or NaN, or if either the sw or sh arguments are zero, the method

Re: [whatwg] More random comments on the putImageData definition

2008-02-11 Thread Oliver Hunt
:37 AM, Robert O'Callahan wrote: On Feb 11, 2008 2:57 PM, Oliver Hunt [EMAIL PROTECTED] wrote: Not really -- a developer would need to do work to handle browsers that did not support the newer hidpi apis. The alternative (a css property or whatever) would allow a developer to use

  1   2   >