From simonp at opera.com Fri May 1 00:06:40 2009 From: simonp at opera.com (Simon Pieters) Date: Fri, 01 May 2009 09:06:40 +0200 Subject: [whatwg] SVG extensions to In-Reply-To: References: Message-ID: On Thu, 30 Apr 2009 21:15:04 +0200, Ian Hickson wrote: > On Thu, 25 Oct 2007, Anne van Kesteren wrote: >> >> For Opera 9.5 beta we implemented some experimental extensions to >> involving SVGSvgElement. SVGSvgElement is supported as "image" >> argument to both drawImage and createPattern. (An HTMLImageElement >> pointing to an SVG element is also supported, but that seems natural if >> you support SVG from .) >> >> For drawImage the pixel size of the SVG is determined as follows: >> >> 1. The image size parameters passed to drawImage >> 2. The intrinsic size of the SVG image >> 3. 300 x 150 >> >> For createPattern it is as follows: >> >> 1. The intrinsic size of the SVG image >> 2. 300 x 150 >> >> (It would be nice if createPattern was extended to allow height/width >> arguments as well.) >> >> The intrinsic size of the SVG image is the specified size with >> percentages resolved against 300 x 150, and sizes depending on the >> font-size resolved against the computed font-size of the SVGSvgElement >> (will be the browser default most of the time). >> >> The SVG image is always rendered at time 0 for animated images. >> >> Drawing an SVG image currently marks the canvas context as unsafe so >> toDataURL() and getImageData() throw. We expect to make this story a bit >> nicer at some point. > > As far as I can tell this doesn't require any changes to HTML5, since the > same applies here as applies to a regular , right? It would at least have to change to make it not throw... "The image argument must be an instance of HTMLImageElement, HTMLCanvasElement, or HTMLVideoElement. If the image is of the wrong type or null, the implementation must raise a TYPE_MISMATCH_ERR exception." -- Simon Pieters Opera Software From chaals at opera.com Fri May 1 04:03:04 2009 From: chaals at opera.com (Charles McCathieNevile) Date: Fri, 01 May 2009 13:03:04 +0200 Subject: [whatwg] converting word (was attributes In-Reply-To: <771D246166F7418BAA2BF6512388FEBA@POCZTOWIEC> References: <46A6570E0F584A659A066B83EE911BA9@disxgdg31szkx7> <771D246166F7418BAA2BF6512388FEBA@POCZTOWIEC> Message-ID: On Thu, 30 Apr 2009 13:25:17 +0200, Kristof Zelechovski wrote: > Automatic conversion from Microsoft Word to HTML is doomed to fail > because the document models and the requirements are different. > The best you can get is a tree of DIVs and SPANs with Word- > specific classes. Anything better needs a serious and thoughtful > remake by the editor. This is an oversimplification to the point of being misleading. There are many ways to use Word, and many people and organisations with haf a clue use it in such a way that automatic conversion can be relatively easily used to generate highly semantically rich and valid markup - much better than the sort of tripe one typically finds on the Web today. Word enabled the clear semantic markup of documents before HTML even existed, and people who use it like that are in a good position to produce HTML that is much better quality than most developers come up with. It also enables presentation-driven markup to be converted automatically to make the underlying semantics explicit (something that virtually no HTML tool outside those which convert from another input format manages to do). This stuff is not rocket science, either. It is the sort of thing that was routine more than a decade ago when people started to use HTML as well as, or instead of, Word and similar formats. cheers Chaals -- Charles McCathieNevile Opera Software, Standards Group je parle fran?ais -- hablo espa?ol -- jeg l?rer norsk http://my.opera.com/chaals Try Opera: http://www.opera.com From adrian.sutton at ephox.com Fri May 1 04:22:32 2009 From: adrian.sutton at ephox.com (Adrian Sutton) Date: Fri, 01 May 2009 12:22:32 +0100 Subject: [whatwg] converting word (was attributes In-Reply-To: Message-ID: On 01/05/2009 12:03, "Charles McCathieNevile" wrote: > This is an oversimplification to the point of being misleading. > > There are many ways to use Word, and many people and organisations with > haf a clue use it in such a way that automatic conversion can be > relatively easily used to generate highly semantically rich and valid > markup - much better than the sort of tripe one typically finds on the Web > today. I can verify this with a lot of real world experience. Ephox has been selling a WYSIWYG editor for around 10 years now and the single most popular feature is it's ability to copy and paste clean HTML from Microsoft Word. The resulting HTML brings over the structure of the document (headings, tables, lists, images etc) but not the inline formatting so the content then matches the CSS. The formatting and styles can optionally be brought over as well but in the last 3-5 years popular demand has been to match the site stylesheet rather than the original formatting. The biggest challenge in this is actually removing the huge amount of inline formatting and proprietary tags/attributes that Microsoft Word adds. In the latest versions it's also a challenge to put lists back together as actual HTML lists since Word has started exporting them as paragraphs with a bullet from the symbol font and lots of nbsps. Pretty much every editor I know of can preserve the semantic information from Word when copying and pasting, they all vary in how well they strip out the inline formatting and proprietary tags with most doing a fairly poor job of this second part. Regards, Adrian Sutton. ______________________ Adrian Sutton, CTO UK: +44 1 753 27 2229 US: +1 (650) 292 9659 x717 Ephox Ephox Blogs , Personal Blog From brucel at opera.com Fri May 1 04:27:24 2009 From: brucel at opera.com (Bruce Lawson) Date: Fri, 01 May 2009 12:27:24 +0100 Subject: [whatwg] converting word (was attributes In-Reply-To: References: Message-ID: On Fri, 01 May 2009 12:22:32 +0100, Adrian Sutton wrote: > The biggest challenge in this is actually removing the huge amount of > inline > formatting and proprietary tags/attributes that Microsoft Word adds. In > the > latest versions it's also a challenge to put lists back together as > actual > HTML lists since Word has started exporting them as paragraphs with a > bullet > from the symbol font and lots of nbsps. Off topic, I know - but couldn't a VBA macro hook into word and actually make an "export as semantic html" option that exported the heading levels as h1..h6, honoured bold, italics, links, bullets and numbers as ul and ol, and just ignored all colours, font changes etc. So there is nothing to clean up? bruce From adrian.sutton at ephox.com Fri May 1 04:42:25 2009 From: adrian.sutton at ephox.com (Adrian Sutton) Date: Fri, 01 May 2009 12:42:25 +0100 Subject: [whatwg] converting word (was attributes In-Reply-To: Message-ID: On 01/05/2009 12:27, "Bruce Lawson" wrote: > On Fri, 01 May 2009 12:22:32 +0100, Adrian Sutton > wrote: > Off topic, I know - but couldn't a VBA macro hook into word and actually > make an "export as semantic html" option that exported the heading levels > as h1..h6, honoured bold, italics, links, bullets and numbers as ul and > ol, and just ignored all colours, font changes etc. So there is nothing to > clean up? Yes, but you'd have to get users to install the macro and get around virus checkers etc. Then you'd have to write a separate applescript version for Mac. I'm not sure how difficult all that would be - it's cheaper for us to just tweak and update the existing filtering code than it would be to go down this route now. It also wouldn't give the option to preserve the styles, but in a HTML compliant way which the filtering process does give (and pretty impressive accuracy in rendering given how little control HTML gives compared to Word's native model). EditLive! for example could include the styles as either an embedded stylesheet (thus preserving any custom styles from word as class names) or inline styles (thus making a very messy but compliant bit of HTML but useful if you're only editing a fragment). For the record, OpenOffice and it's variants tend to create pretty good HTML out of the box and don't need this kind of filtering at all. Excel is even surprisingly good but does add some proprietary attributes. Regards, Adrian Sutton. ______________________ Adrian Sutton, CTO UK: +44 1 753 27 2229 US: +1 (650) 292 9659 x717 Ephox Ephox Blogs , Personal Blog From singer at apple.com Fri May 1 08:14:04 2009 From: singer at apple.com (David Singer) Date: Fri, 1 May 2009 08:14:04 -0700 Subject: [whatwg]