Re: [whatwg] Usemap and ismap for canvas tag
On 05/03/2008, Greg Houston [EMAIL PROTECTED] wrote: I really didn't mean to shift the emphasis to SVG at all. I don't think anyone is going to try running a Gaussian blur of a dynamically generated mouse-driven turbulence displacement of a bitmap [via] JavaScript on a canvas image. *cough* I think history demonstrates that people will try to do anything they possibly can if the results promise to be cool enough eventually. If something can be done at all with promising results on the highest-end available PC, it would be safe enough to assume it will be common a couple of years later. Fortunately, Hixie is highly aware of the history of the benighted X11 Image extension - which to implement properly would have required the equivalent of an embedded copy of ImageMagick :-) - d.
Re: [whatwg] Usemap and ismap for canvas tag
Greg Houston wrote: I would like to request that the canvas element get the same usemap and ismap properties that the img element has. One way this effect could be simulated is by overlaying a transparent img over the top of the canvas, and appling the imagemap to that instead. Given that it's so trivial to work around it now, are there sites that are actually doing that, or anything else that would indicate some level of demand for this feature? I'm not saying it's a bad idea, I'm just trying to find out how much incentive there is for browser vendors to implement a feature like this. -- Lachlan Hunt - Opera Software http://lachy.id.au/ http://www.opera.com/
Re: [whatwg] A comment to character encoding declaration
On 03/03/2008, Jjgod Jiang [EMAIL PROTECTED] wrote: During the development of CJK information processing, many text encodings is just a strict subset of another one, for example, GB2312 is a subset of GBK, GBK is a subset of GB18030. For compatibility purpose, a lot of web pages used character encoding declaration like this: meta http-equiv=Content-Type content=text/html; charset=gb2312 in their header, yet they might use characters in GBK but not in GB2312. So, I think we can suggest clients to simply treat encodings like these as their biggest superset, for instance, treat GB2312 as GB18030. Out of 130K pages from dmoz.org, I see 760 which are declared as gb2312 (by HTTP Content-Type, meta content, etc). Of those 760, 120 cause decoding errors in ICU4J when treated as gb2312. 8 cause errors when treated as gbk, and the same 8 cause errors as gb18030. Those 8 are: http://www.bigm.com.cn/dinosaur/anecdote/ http://www.ccpc.edu.cn http://www.gdoverseaschn.com.cn/ http://www.jgbr.com.cn http://www.liechebuluo.com http://www.netbro.com.cn http://www.tkdts.com http://www.wuxi-accp.com/ and I haven't tried working out why they are causing errors. The 120 are listed at http://philip.html5.org/data/gb2312-errors.txt. I don't know how many are really using gb18030, and how many are not actually gb* but happen to be decoded without errors because they use compatible byte sequences; but it does look like gb2312 is a fairly significant problem if it's not treated as gbk/gb18030, so it would be helpful to suggest/require it to be processed specially. -- Philip Taylor [EMAIL PROTECTED]
Re: [whatwg] Usemap and ismap for canvas tag
Hi Lachlan, I am currently implementing the method you describe here: http://demos.greghoustondesign.com/piechart/ Generally, the use of a blank transparent gif seems to me to be the indication of a hack required due to some inadequacy of HTML and/or CSS, e.g. old school table shims which are still often found in HTML emails. Though you can use image files with canvas, part of the appeal of the canvas tag is not having to, and thus not having to make http server requests for images. After making a graphic with the canvas tag, it's a bit disappointing to have to place a gif on top of it. It's sort of like buying a new economy size car only to find out that in order to go anywhere with it you have to tow it with a truck. As far as demand goes, most developers are still unaware of the existence of the canvas tag, and then a large portion of those that have heard of it do not realize there is a semi-functional way to get it to work with Internet Explorer via ExCanvas or Moocanvas (minus several gradient features). A lot of developers like myself will not implement something if it is not supported by at least Firefox, Opera, Safari, and Internet Explorer. There hasn't been a truly cross-browser supported HTML graphics yet. VML, SVG, and Canvas have partial coverage over the various browsers, but once SVG and Canvas are supported without plugins or javascript bridges I think you will see their use increase greatly. General developers don't want to jump through hoops with javascript bridges and they don't want to make their end users jump through hoops with plugins. As the use of the canvas tag increases people are going to want to interact with it. In our Web 2.0 world, if you cannot interact with your dynamic content there is a feeling that something is missing. We like gadgets, widgets, little things with interactive features. We want to unfold layers of information. Charts, graphs, and data visualizations of all sorts are becoming increasingly common on the web. The YUI javascript framework actually uses Flash to make graphs with tooltips, but some of us would like to avoid the use of Flash as much as possible. Giving the canvas tag usemap and ismap properties gives the canvas some small degree of interaction without requiring developers to jump through quite so many hoops. Also, If a new developer starts reading the documentation on the canvas tag and sees the usemap and ismap properties listed it will help clarify somewhat the nature of the canvas tag, that it is flat object, but that you can interact with its parts using an overlay. Here is one last personal example of the canvas tag with some basic interactivity. I wanted to create a cross-browser method to create rounded corners and drop shadows without images, again in order to not have to load so many images. Usemap would have greatly simplified giving functionality to my simple window controls. http://greghoustondesign.com/demos/mocha/ On a side note, I was just glancing over the newly released, Internet Explorer8 Readiness Toolkit, and it says: Internet Explorer 8 offers Web developers the opportunity to write standards-compliant HTML-based Web pages that support features (such as SVG, XUL, and MathML) in namespaces, provided that the client has installed appropriate handlers for those namespaces via binary behaviors. (A binary behavior is a type of ActiveX control.) I am not entirely sure what that means, but it looks like users will still have to install something in order to view SVG with Internet Explorer. There is no mention of canvas. Cheers, Greg On Wed, Mar 5, 2008 at 7:46 AM, Lachlan Hunt [EMAIL PROTECTED] wrote: Greg Houston wrote: I would like to request that the canvas element get the same usemap and ismap properties that the img element has. One way this effect could be simulated is by overlaying a transparent img over the top of the canvas, and appling the imagemap to that instead. Given that it's so trivial to work around it now, are there sites that are actually doing that, or anything else that would indicate some level of demand for this feature? I'm not saying it's a bad idea, I'm just trying to find out how much incentive there is for browser vendors to implement a feature like this. -- Lachlan Hunt - Opera Software http://lachy.id.au/ http://www.opera.com/
Re: [whatwg] Usemap and ismap for canvas tag
Dnia 05-03-2008, Śr o godzinie 09:39 -0600, Greg Houston pisze: On a side note, I was just glancing over the newly released, Internet Explorer8 Readiness Toolkit, and it says: Internet Explorer 8 offers Web developers the opportunity to write standards-compliant HTML-based Web pages that support features (such as SVG, XUL, and MathML) in namespaces, provided that the client has installed appropriate handlers for those namespaces via binary behaviors. (A binary behavior is a type of ActiveX control.) I am not entirely sure what that means, but it looks like users will still have to install something in order to view SVG with Internet Explorer. There is no mention of canvas. FYI: It means you use a custom tag instead of OBJECT; the control to embed is determined by the tag name and the binary behaviour provides the associations. It is more convenient when you intend to use several embedded elements or have the element data in-line. The main objection is that such a document is nonconforming. There are two ways to embed foreign content in HTML: the SCRIPT element and a data URI. SCRIPT has its limitations (no decrement operator in JavaScript) and data URIs are cumbersome and unsupported by IE. XHTML is somewhat more flexible but IE offers to save it to disk or displays it as a tree unless you cheat about the content type in which case you break everybody else. (You have to explicitly forbid ASP to cheat if you do not want it to because ASP think and instruct the developer that XHTML is just like HTML, only better.) Looks like a dead end to me. Keep smiling Chris
Re: [whatwg] HTMLDocument hasFocus - should it be a function?
Dnia 04-03-2008, Wt o godzinie 14:53 -0800, Adele Peterson pisze: I started implementing the hasFocus attribute in WebKit, but then I realized that IE and Firefox 3 both implement it as a function. Should the spec change to match the existing implementations? This property is so volatile that making it a function would be more intuitive. +1 Chris
[whatwg] Geolocation API Proposal
Hi all, We're adding an API to Google Gears that will allow an application to obtain (with permission) the user's current location. Here's our current design: http://code.google.com/p/google-gears/wiki/LocationAPI We think there's a lot of potential for interesting applications with an API like this. Some examples would be recommendations for nearby restaurants, turn by turn directions, or city walking tours. What do people think of adding something like this to a future version of HTML? Thanks, - a