Re: [whatwg] Font metrics

2010-04-02 Thread Ian Hickson
On Fri, 2 Apr 2010, Greg Brown wrote:
> 
> In reviewing the current draft API for the  element 
> (http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html),
>  
> I noticed that there is no support for obtaining font metrics such as 
> ascent, descent, leading, and bounding box. It seems like the most 
> recent discussion regarding font metrics took place a couple of years 
> ago:
> 
> http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2008-May/014706.html
> 
> But even that thread refers to discussions from 2006.
> 
> I would personally like to see support for these values added to the 
> API. Is this something that could be considered for the final spec? What 
> are the major obstacles to providing such support? I would think that 
> this information could be easily obtained using the underlying graphics 
> API, but maybe I am missing something.

It's something we'll probably add in due course, but for now we're waiting 
for the existing canvas API stuff to be implemented properly. We can't add 
too much stuff at once, because if we do the browser vendors get so far 
behind that they end up either rushing to catch up (leading to more bugs), 
or skipping parts in order to get the rest done right (leading to parts of 
the spec being ignored).

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


Re: [whatwg] Input color state: type mismatch

2010-04-02 Thread Ian Hickson
On Sat, 3 Apr 2010, TAMURA, Kent wrote:
>
> I found type=number also had no typeMismatch. If a user wants to type a 
> negative value, he types '-' first.  This state should make typeMismatch 
> true because '-' is not a valid floating point number.

The user agent shouldn't update the value until the input is a valid 
number. ("User agents must not allow the user to set the value to a string 
that is not a valid floating point number.")

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


Re: [whatwg] idea for .zhtml format #html5 #web

2010-04-02 Thread Eduard Pascual
On Fri, Apr 2, 2010 at 9:41 PM, Thomas Broyer  wrote:
> On Fri, Apr 2, 2010 at 8:39 PM, Eduard Pascual  wrote:
>>
>> On Fri, Apr 2, 2010 at 6:25 PM, Doug Schepers  wrote:
>> > I don't think it's defined anywhere, but a browser could choose to save
>> > bundled resources as a self-contained Widget ("File > Save as Widget..."),
>> > which would be a great authoring solution for Widgets.
>>
>> Isn't that the same thing, in essence, as MS did with IE? IIRC, IE had
>> an choice, on its save dialog, to "Save full page", which packed the
>> html page + all the CSS, JS, image, and other dependencies within a
>> ".mht" (called meta-HTML) file (which, of course, only IE would be
>> able to open afterwards).
>
> MHTML stands for MIME-encapsulated HTML and is an IETF RFC:
> http://www.rfc-editor.org/rfc/rfc2557.txt

I can't remember for sure where I saw the "meta HTML" name, but I'm
sure I had seen it somewhere.
Anyway, thanks for the correction.


>> The fact is that this feature has been removed from the more recent
>> versions of IE (not sure if it was from IE6 or 7). It would be
>> interesting to know why MS decided why such a feature should be
>> removed.
>
> Selecting Page -> Save as... on IE8 brings the save file dialog with
> the type defaulting to "Web Archive, single file (*.mht)"

My apologies: vague memory + not testing = stupid post from me ^^;
After a bit of research to refresh my memory, I've found that what MS
removed from IE was the "offline favorites" feature, and MHT was
portrayed as a better alternative. I just got a "404 Brain Not Found"
and mixed things up.

So feel free to simply ignore my previous e-mail, since it was
entirely based on a mistaken assumption.

Regards
Eduard Pascual


Re: [whatwg] idea for .zhtml format #html5 #web

2010-04-02 Thread Thomas Broyer
On Fri, Apr 2, 2010 at 8:39 PM, Eduard Pascual  wrote:
>
> On Fri, Apr 2, 2010 at 6:25 PM, Doug Schepers  wrote:
> > I don't think it's defined anywhere, but a browser could choose to save
> > bundled resources as a self-contained Widget ("File > Save as Widget..."),
> > which would be a great authoring solution for Widgets.
>
> Isn't that the same thing, in essence, as MS did with IE? IIRC, IE had
> an choice, on its save dialog, to "Save full page", which packed the
> html page + all the CSS, JS, image, and other dependencies within a
> ".mht" (called meta-HTML) file (which, of course, only IE would be
> able to open afterwards).

MHTML stands for MIME-encapsulated HTML and is an IETF RFC:
http://www.rfc-editor.org/rfc/rfc2557.txt


> The fact is that this feature has been removed from the more recent
> versions of IE (not sure if it was from IE6 or 7). It would be
> interesting to know why MS decided why such a feature should be
> removed.

Selecting Page -> Save as... on IE8 brings the save file dialog with
the type defaulting to "Web Archive, single file (*.mht)"

> At first glance, the only potential issue I see (both with IE's old
> MHT format and with any possible zhtml) is XSS: when a downloaded file
> is loaded from the local filesystem into the browser, which is its
> domain?

The one from its Content-Location MIME header.

--
Thomas Broyer
/tɔ.ma.bʁwa.je/


Re: [whatwg] idea for .zhtml format #html5 #web

2010-04-02 Thread Eduard Pascual
On Fri, Apr 2, 2010 at 6:25 PM, Doug Schepers  wrote:
> I don't think it's defined anywhere, but a browser could choose to save
> bundled resources as a self-contained Widget ("File > Save as Widget..."),
> which would be a great authoring solution for Widgets.

Isn't that the same thing, in essence, as MS did with IE? IIRC, IE had
an choice, on its save dialog, to "Save full page", which packed the
html page + all the CSS, JS, image, and other dependencies within a
".mht" (called meta-HTML) file (which, of course, only IE would be
able to open afterwards).

The fact is that this feature has been removed from the more recent
versions of IE (not sure if it was from IE6 or 7). It would be
interesting to know why MS decided why such a feature should be
removed.

At first glance, the only potential issue I see (both with IE's old
MHT format and with any possible zhtml) is XSS: when a downloaded file
is loaded from the local filesystem into the browser, which is its
domain? It may need some same-directory files, but it may be possible
that it tries to fetch something from its original location that has
not been downloaded, it might be trying to load content from a domain
that is not the local system.
This issue should be addressed if something like that is to be usable:
if we face the choice of broken pages vs. security flaw, the idea will
be already a failure. However, I have no idea of how to approach this.

Regards,
Eduard Pascual


Re: [whatwg] Why are form fields without a name barred from constraint validation?

2010-04-02 Thread Jonas Sicking
On Fri, Apr 2, 2010 at 12:53 PM, Anne van Kesteren  wrote:
> On Fri, 02 Apr 2010 04:00:04 -0700, Bruce Lawson  wrote:
>>
>> On Fri, 02 Apr 2010 09:28:50 -, Futomi Hatano  wrote:
>>>
>>> Because such controls are ignored when the form is submitted.
>>> http://dev.w3.org/html5/spec/forms.html#form-submission-algorithm
>>> Nameless controls are meaningless in form submission.
>>> So, those controls do not need to be validated, I think.
>>
>> Thanks!
>
> FWIW, there have been some requests on dropping this since nowadays form
> controls are not always associated with a form, but the validity concept can
> still be useful in such scenarios.

Yeah. I think in the interest of 'least surprise', I think such
controls should be validated too. If someone added validation
constraints to such a control, I would think it's more likely than not
that they wanted to control validated.

/ Jonas


Re: [whatwg] WebSocket bufferedAmount includes overhead or not

2010-04-02 Thread Jonas Sicking
On Thu, Apr 1, 2010 at 8:15 PM, Boris Zbarsky  wrote:
> On 3/31/10 6:57 PM, Jonas Sicking wrote:
>>
>> I would expect that send() is allowed to start streaming data over the
>> network as soon as it can, but only update bufferedAmount from the
>> event loop.
>
> Maybe I'm not being clear.  Let's say bufferedAmount were to reflect the
> number of UTF-8-encoded bytes to be sent, for the sake of argument.
>
> I wait until bufferedAmount is 0, then call send("My text").
>
> What are possible values of bufferedAmount if I examine it right after the
> send() call?  Is 0 a valid possible value?  What about 1?  2? 3? 4? 5? 6? 7?
>
> Presumably the value will be somewhere in the integer range [0,7], right?
>  Or will it always be 7 after that call in that situation?

In order to archive maximum interoperability and predictability I
think it should always be 7. So bufferedAmount is always adjusted
synchronously upwards by the length of the sent message by send(), and
always adjusted downwards from events posted to the main event loop.

Though it's possible that this is overengineering given how people are
likely to use bufferedAmount. Interested to hear opinions.

/ Jonas


[whatwg] Font metrics

2010-04-02 Thread Greg Brown
Hi all,

In reviewing the current draft API for the  element 
(http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html),
 I noticed that there is no support for obtaining font metrics such as ascent, 
descent, leading, and bounding box. It seems like the most recent discussion 
regarding font metrics took place a couple of years ago:

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2008-May/014706.html

But even that thread refers to discussions from 2006.

I would personally like to see support for these values added to the API. Is 
this something that could be considered for the final spec? What are the major 
obstacles to providing such support? I would think that this information could 
be easily obtained using the underlying graphics API, but maybe I am missing 
something.

Thanks,
Greg




Re: [whatwg] idea for .zhtml format #html5 #web

2010-04-02 Thread Doug Schepers

Hi, folks-

Philip Jägenstedt wrote (on 4/2/10 4:36 AM):

On Fri, 02 Apr 2010 15:07:25 +0800, narendra sisodiya
 wrote:


 just a thought ___

You can view the first webpage create on earth. We have saved our file
from
.txt .rtf .doc and now .odt. I love ODF format (.odt and other things)
but
there is a scope for .zhtml format for document and other purpose.
Basically the idea of zhtml format is to create document/webpage using
HTML5
technology. HTML5 technology with client side can create dynamic webpage
with image video and we can actually use JavaScript to create a dynamic
document. So basically we can create a zip out of all the
html,js,css,images
files and put a extension of .zhtml.

There are many advantage of using zhtml format.

* You can create some good web based software and share it using just one
file.
* Any document create using zhtml will be viewable after 100 years too.
* Server must support .zhtml format so that website can autounzip and
provide underlying files Ex http://localhost/myfile.zhtml/test.html

Disadvantage

* There is no standard over web to make a slideshow Or presentation .
There
are 100 possible ways. So zhtml writers will make their own
conventions but
I believe that this will reach into a equilibrium
* do not know !! but there there will be someone.


Sounds like widgets: http://www.w3.org/TR/widgets/


Yes, this is exactly the motivation behind W3C Widgets (or HTML5 
Widgets, if you prefer more buzzwords).


You can gzip up a set of related content, and run it locally with 
special permissions.  You can digitally sign it, to ensure the integrity 
and provenance of the content.  You can even run them on the server 
referenced from an  element in an HTML page.  They might be 
suitable as a Firefox-like "extensions" mechanism.


I don't think it's defined anywhere, but a browser could choose to save 
bundled resources as a self-contained Widget ("File > Save as 
Widget..."), which would be a great authoring solution for Widgets.


Regards-
-Doug


Re: [whatwg] Input color state: type mismatch

2010-04-02 Thread TAMURA, Kent

I found type=number also had no typeMismatch.
If a user wants to type a negative value, he types '-' first.  This state
should make typeMismatch true because '-' is not a valid floating point
number.

--
TAMURA Kent
Software Engineer, Google





Re: [whatwg] idea for .zhtml format #html5 #web

2010-04-02 Thread Ashley Sheridan
On Fri, 2010-04-02 at 12:37 +0530, narendra sisodiya wrote:

>  just a thought ___
> 
> You can view the first webpage create on earth. We have saved our file
> from .txt .rtf .doc and now .odt. I love ODF format (.odt and other
> things) but there is a scope for .zhtml format for document and other
> purpose. 
> Basically the idea of zhtml format is to create document/webpage using
> HTML5 technology. HTML5 technology with client side can create dynamic
> webpage with image video and we can actually use JavaScript to create
> a dynamic document. So basically we can create a zip out of all the
> html,js,css,images files and put a extension of .zhtml.
> 
> There are many advantage of using zhtml format.
> 
> * You can create some good web based software and share it using just
> one file.
> * Any document create using zhtml will be viewable after 100 years
> too.
> * Server must support .zhtml format so that website can autounzip and
> provide underlying files  Ex http://localhost/myfile.zhtml/test.html
> 
> Disadvantage
> 
> * There is no standard over web to make a slideshow Or presentation .
> There are 100 possible ways. So zhtml writers will make their own
> conventions but I believe that this will reach into a equilibrium 
> * do not know !! but there there will be someone.
> 
> 
> -- 
> ┌─┐
> │Narendra Sisodiya ( नरेन्द्र सिसोदिया )
> │Society for Knowledge Commons
> │Web : http://narendra.techfandu.org
> └─┘


Didn't Microsoft already try this with its .mhtml format?

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [whatwg] [html5] r4949 - [giow] (0) The CSS rules need to do attribute value matching consistently across [...]

2010-04-02 Thread Anne van Kesteren
On Thu, 01 Apr 2010 23:36:16 -0700, L. David Baron   
wrote:

Making attribute values case-insensitive in XHTML seems incompatible
with longstanding Gecko behavior (though our handling of input's
type attribute is buggy, at least) and with the clear intent of
XHTML1, and doesn't seem implementable on top of a conformant CSS
selectors implementation.

Do we really want to do this?


I think we do want case-insensitive attribute values to be  
case-insensitive in both HTML and XHTML.


I think ideally we remove the special casing of certain attributes with  
Selectors and introduce an ASCII case-insensitive flag for attribute value  
selectors to deal with this issue.



--
Anne van Kesteren
http://annevankesteren.nl/


Re: [whatwg] Why are form fields without a name barred from constraint validation?

2010-04-02 Thread Anne van Kesteren

On Fri, 02 Apr 2010 04:00:04 -0700, Bruce Lawson  wrote:

On Fri, 02 Apr 2010 09:28:50 -, Futomi Hatano  wrote:

Because such controls are ignored when the form is submitted.
http://dev.w3.org/html5/spec/forms.html#form-submission-algorithm
Nameless controls are meaningless in form submission.
So, those controls do not need to be validated, I think.


Thanks!


FWIW, there have been some requests on dropping this since nowadays form  
controls are not always associated with a form, but the validity concept  
can still be useful in such scenarios.



--
Anne van Kesteren
http://annevankesteren.nl/


Re: [whatwg] Why are form fields without a name barred from constraint validation?

2010-04-02 Thread Bruce Lawson

On Fri, 02 Apr 2010 09:28:50 -, Futomi Hatano  wrote:



Because such controls are ignored when the form is submitted.
http://dev.w3.org/html5/spec/forms.html#form-submission-algorithm
Nameless controls are meaningless in form submission.
So, those controls do not need to be validated, I think.


Thanks!

b


Re: [whatwg] Why are form fields without a name barred from constraint validation?

2010-04-02 Thread Futomi Hatano
Hi Bruce,

On Fri, 02 Apr 2010 09:57:04 -
"Bruce Lawson"  wrote:

> "Constraint validation: If an element does not have a name attribute  
> specified, or its name attribute's value is the empty string, then it is  
> barred from constraint validation."
> 
> http://dev.w3.org/html5/spec/forms.html#naming-form-controls
> 
> 
> As a matter of interest, why?

Because such controls are ignored when the form is submitted.
http://dev.w3.org/html5/spec/forms.html#form-submission-algorithm
Nameless controls are meaningless in form submission.
So, those controls do not need to be validated, I think.

--
Futomi Hatano
http://www.html5.jp/
http://www.futomi.com/
http://twitter.com/futomi



[whatwg] Why are form fields without a name barred from constraint validation?

2010-04-02 Thread Bruce Lawson
"Constraint validation: If an element does not have a name attribute  
specified, or its name attribute's value is the empty string, then it is  
barred from constraint validation."


http://dev.w3.org/html5/spec/forms.html#naming-form-controls


As a matter of interest, why?

--
Hang loose and stay groovy,

Bruce Lawson
Web Evangelist
www.opera.com (work)
www.brucelawson.co.uk (personal)
www.twitter.com/brucel


Re: [whatwg] idea for .zhtml format #html5 #web

2010-04-02 Thread Philip Jägenstedt
On Fri, 02 Apr 2010 15:07:25 +0800, narendra sisodiya  
 wrote:



 just a thought ___

You can view the first webpage create on earth. We have saved our file  
from
.txt .rtf .doc and now .odt. I love ODF format (.odt and other things)  
but

there is a scope for .zhtml format for document and other purpose.
Basically the idea of zhtml format is to create document/webpage using  
HTML5

technology. HTML5 technology with client side can create dynamic webpage
with image video and we can actually use JavaScript to create a dynamic
document. So basically we can create a zip out of all the  
html,js,css,images

files and put a extension of .zhtml.

There are many advantage of using zhtml format.

* You can create some good web based software and share it using just one
file.
* Any document create using zhtml will be viewable after 100 years too.
* Server must support .zhtml format so that website can autounzip and
provide underlying files  Ex http://localhost/myfile.zhtml/test.html

Disadvantage

* There is no standard over web to make a slideshow Or presentation .  
There
are 100 possible ways. So zhtml writers will make their own conventions  
but

I believe that this will reach into a equilibrium
* do not know !! but there there will be someone.


Sounds like widgets: http://www.w3.org/TR/widgets/

--
Philip Jägenstedt
Core Developer
Opera Software


Re: [whatwg] idea for .zhtml format #html5 #web

2010-04-02 Thread narendra sisodiya
On Fri, Apr 2, 2010 at 12:47 PM, Shwetank Dixit  wrote:

> Hi Narendra,
>
> I think what you're proposing could be achieved already (at least somewhat)
> by the html5 offline applications part
> http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#offline
>
> Thanks for hinting , infact I was looking for it.
The idea behind this is, my govt is wasting money of making e-learning
content they are mainly .exe and swf file
http://techfandu.blogspot.com/2010/03/e-learning-modules-tutorials-guidelines.htmlSo
Basically I suggested them to use HTML5 also, I told them that content
will be able to able to view on mobile (which support html5). Support for
ODF is browser is still waiting and take time.
http://techfandu.blogspot.com/2010/03/e-learning-modules-tutorials-guidelines.html


Re: [whatwg] idea for .zhtml format #html5 #web

2010-04-02 Thread Shwetank Dixit

Hi Narendra,

I think what you're proposing could be achieved already (at least  
somewhat) by the html5 offline applications part  
http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#offline



On Fri, 02 Apr 2010 12:37:25 +0530, narendra sisodiya  
 wrote:



 just a thought ___

You can view the first webpage create on earth. We have saved our file  
from
.txt .rtf .doc and now .odt. I love ODF format (.odt and other things)  
but

there is a scope for .zhtml format for document and other purpose.
Basically the idea of zhtml format is to create document/webpage using  
HTML5

technology. HTML5 technology with client side can create dynamic webpage
with image video and we can actually use JavaScript to create a dynamic
document. So basically we can create a zip out of all the  
html,js,css,images

files and put a extension of .zhtml.

There are many advantage of using zhtml format.

* You can create some good web based software and share it using just one
file.
* Any document create using zhtml will be viewable after 100 years too.
* Server must support .zhtml format so that website can autounzip and
provide underlying files  Ex http://localhost/myfile.zhtml/test.html

Disadvantage

* There is no standard over web to make a slideshow Or presentation .  
There
are 100 possible ways. So zhtml writers will make their own conventions  
but

I believe that this will reach into a equilibrium
* do not know !! but there there will be someone.





--
Shwetank Dixit
Web Evangelist,
Site Compatibility / Developer Relations / Consumer Products Group
Member - Web Standards Project (WaSP) - International Liaison Group
Opera Software - www.opera.com

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


[whatwg] idea for .zhtml format #html5 #web

2010-04-02 Thread narendra sisodiya
 just a thought ___

You can view the first webpage create on earth. We have saved our file from
.txt .rtf .doc and now .odt. I love ODF format (.odt and other things) but
there is a scope for .zhtml format for document and other purpose.
Basically the idea of zhtml format is to create document/webpage using HTML5
technology. HTML5 technology with client side can create dynamic webpage
with image video and we can actually use JavaScript to create a dynamic
document. So basically we can create a zip out of all the html,js,css,images
files and put a extension of .zhtml.

There are many advantage of using zhtml format.

* You can create some good web based software and share it using just one
file.
* Any document create using zhtml will be viewable after 100 years too.
* Server must support .zhtml format so that website can autounzip and
provide underlying files  Ex http://localhost/myfile.zhtml/test.html

Disadvantage

* There is no standard over web to make a slideshow Or presentation . There
are 100 possible ways. So zhtml writers will make their own conventions but
I believe that this will reach into a equilibrium
* do not know !! but there there will be someone.


-- 
┌─┐
│Narendra Sisodiya ( नरेन्द्र सिसोदिया )
│Society for Knowledge Commons
│Web : http://narendra.techfandu.org
└─┘