Re: [whatwg] Input color state: type mismatch
By the way, it looks like WebKit has implemented type mismatch for color state [1] [2]. Yes. That's because the type=color implementation of WebKit is just a text field for now. Users can specify invalid strings. When we complete the implementation of dedicated UI and value sanitization, typeMismatch won't be true. -- TAMURA Kent Software Engineer, Google
Re: [whatwg] Video Tag Proposal
On 29/03/2010, at 7:11 AM, Kelly Clowers wrote: On Sun, Mar 28, 2010 at 10:49, Ashley Sheridan a...@ashleysheridan.co.uk wrote: I was under the impression that Apple were one of the main opposers to using free codecs in-place of their proprietary QuickTime. For Theora. They haven't really said much about Vorbis AFAIK. And I think an audio codec is less likely to have patent issues than a video codec (especially since Vorbis has a lot of high profile use that should have drawn out any patent trolls) , and that is what Apple supposedly is worried about. Apple is at heart a hardware company. My understanding of their objections to OGG have been also largely due to a lack of hardware decoder support in their iPods/iPhones. Also, when was the last time you ever knew Microsoft to go with standarised formats when they can just as easily push one of their own? shug MS isn't quite who they used to be. They open-source things, and put things under the open specification promise, and they seem to be very serious about CSS3 and (X)HTML5 standards now. I think there is at least a chance of them supporting Vorbis. IE 9 (though not the platform preview) will support H.264 video in the video element: http://blogs.msdn.com/ie/archive/2010/03/16/html5-hardware-accelerated-first-ie9-platform-preview-available-for-developers.aspx I would be inclined to suggest that MS will implement video playback via DirectShow (theoretically enabling any codec the user has installed), but that's pure speculation on my part. —Kit Grose
Re: [whatwg] Input color state: type mismatch
On 03/29/2010 10:38 AM, TAMURA, Kent wrote: By the way, it looks like WebKit has implemented type mismatch for color state [1] [2]. Yes. That's because the type=color implementation of WebKit is just a text field for now. Users can specify invalid strings. When we complete the implementation of dedicated UI and value sanitization, typeMismatch won't be true. I understand this is because there is only a simple text field for now but in a general matter, having typeMismatch for the color state would be fine because the UI is optional and we can easily imagine UA not adding an UI. I was not saying WebKit did wrong but the opposite ;) -- Mounir -- TAMURA Kent Software Engineer, Google
Re: [whatwg] Video Tag Proposal
On 29 March 2010 09:41, Kit Grose k...@iqmultimedia.com.au wrote: Apple is at heart a hardware company. My understanding of their objections to OGG have been also largely due to a lack of hardware decoder support in their iPods/iPhones. No, they claimed submarine patents as their actual objection to Theora. (I'm not aware of them making an express claim of this sort regarding Vorbis.) - d.
Re: [whatwg] Why is the legend element not categorized as flow content?
On Sun, Mar 28, 2010 at 8:40 PM, Ian Hickson i...@hixie.ch wrote: In what sense is it listed under phrasing content? The content model for the legend is stated as phrasing content in the spec [1] It's just supposed to be a child of fieldset, so it doesn't have any category at all. Thanks, the general rule [2] that is given in the spec seems to include almost every known HTML4 element as flow content, but then, legend somehow is not a flow content (even though it fulfills the General Rule). I am trying to figure out if there is an easy way to know which elements are flow or not other than referring to the spec for each element before using. Regards, Divya [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#the-legend-element [2] should have either at least one descendant text node that is not inter-element whitespace, or at least one descendant element node that is embedded content http://www.whatwg.org/specs/web-apps/current-work/multipage/content-models.html#flow-content
[whatwg] What will not work when we do not have server ?
Dear all, I am making a (uff from long time) some e-learning modules using HTML5. The idea is just to make a full interactive lectures (audio, video, svg animations , JavaScript, canvas , all sort of new good web technologies etc ), But there is a little problem. Student will be able to download as a zip file. When they want to watch those html5 based interactive tutorials, all they need to click on index.html which will open the tutorial. I want to ask that what will not work in this mode. for example, I have cheked that some basic jQuery ajax demos are working well in both url http://localhost/narendra/demo.html OR file:///var/www/narenda/demo.html I want to know the list for all the such drafts which will not work without server. So that I will avoid them Or try to get some workaround. -- ┌─┐ │Narendra Sisodiya ( नरेन्द्र सिसोदिया ) │Society for Knowledge Commons │Web : http://narendra.techfandu.org └─┘
Re: [whatwg] Why is the legend element not categorized as flow content?
On Mon, Mar 29, 2010 at 7:02 AM, divya manian divya.man...@gmail.com wrote: On Sun, Mar 28, 2010 at 8:40 PM, Ian Hickson i...@hixie.ch wrote: In what sense is it listed under phrasing content? The content model for the legend is stated as phrasing content in the spec [1] Content model describes what the element is allowed to *contain*. Categories describe what the element *is*. (And then Context... describes where it can be used.) So legend can contain any phrasing content, but it isn't phrasing content itself. It's just supposed to be a child of fieldset, so it doesn't have any category at all. Thanks, the general rule [2] that is given in the spec seems to include almost every known HTML4 element as flow content, but then, legend somehow is not a flow content (even though it fulfills the General Rule). I am trying to figure out if there is an easy way to know which elements are flow or not other than referring to the spec for each element before using. If an element has special rules about where it can be placed, it's probably not flow content. That captures the legend issue, at least, since it can only occur as the first child of fieldset. ~TJ
Re: [whatwg] What will not work when we do not have server ?
On Mon, Mar 29, 2010 at 7:05 AM, narendra sisodiya narendra.sisod...@gmail.com wrote: Dear all, I am making a (uff from long time) some e-learning modules using HTML5. The idea is just to make a full interactive lectures (audio, video, svg animations , JavaScript, canvas , all sort of new good web technologies etc ), But there is a little problem. Student will be able to download as a zip file. When they want to watch those html5 based interactive tutorials, all they need to click on index.html which will open the tutorial. I want to ask that what will not work in this mode. for example, I have cheked that some basic jQuery ajax demos are working well in both url http://localhost/narendra/demo.html OR file:///var/www/narenda/demo.html I want to know the list for all the such drafts which will not work without server. So that I will avoid them Or try to get some workaround. Anything that requires a server-side language (PHP, ASP, Python, Ruby, etc.) won't work. Anything that requires only client-side languages (HTML, CSS, Javascript) will. ~TJ
Re: [whatwg] What will not work when we do not have server ?
On Mon, Mar 29, 2010 at 4:27 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, Mar 29, 2010 at 7:05 AM, narendra sisodiya narendra.sisod...@gmail.com wrote: Dear all, I am making a (uff from long time) some e-learning modules using HTML5. The idea is just to make a full interactive lectures (audio, video, svg animations , JavaScript, canvas , all sort of new good web technologies etc ), But there is a little problem. Student will be able to download as a zip file. When they want to watch those html5 based interactive tutorials, all they need to click on index.html which will open the tutorial. I want to ask that what will not work in this mode. for example, I have cheked that some basic jQuery ajax demos are working well in both url http://localhost/narendra/demo.html OR file:///var/www/narenda/demo.html I want to know the list for all the such drafts which will not work without server. So that I will avoid them Or try to get some workaround. Anything that requires a server-side language (PHP, ASP, Python, Ruby, etc.) won't work. Anything that requires only client-side languages (HTML, CSS, Javascript) will. But you also need to be careful about security rules for file:// differing from http://, e.g. Firefox 3 apparently considers files in parent directories to be non-same-origin, so you can't use XMLHttpRequest to get ../foo/bar.txt, and if you have an img src=../images/example.png and draw it on a canvas then you won't be able to call toDataURL or getImageData, whereas it would be fine if the files were on an http:// site. -- Philip Taylor exc...@gmail.com
Re: [whatwg] What will not work when we do not have server ?
On Mon, Mar 29, 2010 at 9:08 PM, Philip Taylor excors+wha...@gmail.comexcors%2bwha...@gmail.com wrote: On Mon, Mar 29, 2010 at 4:27 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, Mar 29, 2010 at 7:05 AM, narendra sisodiya narendra.sisod...@gmail.com wrote: Dear all, I am making a (uff from long time) some e-learning modules using HTML5. The idea is just to make a full interactive lectures (audio, video, svg animations , JavaScript, canvas , all sort of new good web technologies etc ), But there is a little problem. Student will be able to download as a zip file. When they want to watch those html5 based interactive tutorials, all they need to click on index.html which will open the tutorial. I want to ask that what will not work in this mode. for example, I have cheked that some basic jQuery ajax demos are working well in both url http://localhost/narendra/demo.html OR file:///var/www/narenda/demo.html I want to know the list for all the such drafts which will not work without server. So that I will avoid them Or try to get some workaround. Anything that requires a server-side language (PHP, ASP, Python, Ruby, etc.) won't work. Anything that requires only client-side languages (HTML, CSS, Javascript) will. But you also need to be careful about security rules for file:// differing from http://, e.g. Firefox 3 apparently considers files in parent directories to be non-same-origin, so you can't use XMLHttpRequest to get ../foo/bar.txt, and if you have an img src=../images/example.png and draw it on a canvas then you won't be able to call toDataURL or getImageData, whereas it would be fine if the files were on an http:// site. -- Philip Taylor exc...@gmail.com Thanks a lot, what about server-sent, websocket ? At the same time I am thinking for using webshare command too. alias *webshare*='*python* -c import SimpleHTTPServer;SimpleHTTPServer.test()' this command will start simple server at current directory. If i am unable to do something using file:/// , I will try to use this simple server. -- ┌─┐ │Narendra Sisodiya ( नरेन्द्र सिसोदिया ) │Society for Knowledge Commons │Web : http://narendra.techfandu.org └─┘
Re: [whatwg] Input color state: type mismatch
On Sat, Mar 27, 2010 at 9:48 AM, Mounir Lamouri mounir.lamo...@gmail.com wrote: It looks like the input color state can't suffer from type mismatch according to the specs but it seems to be the only way to be sure the value is correct. Email and URL states can suffer from type mismatch for the exact same reason. It isn't possible for color inputs to suffer from a type mismatch, because the spec says User agents must not allow the user to set the value to a string that is not a valid lowercase simple color. If the user somehow selects an invalid color, the UA is required to simply refuse it, or auto-correct it somehow. This doesn't work well with a text input, where the user has to type the color incrementally -- I guess the UA could decide to not update the script-visible/submitted value until the user no longer focuses the form field, and if the value isn't valid at that time, it could revert to the previous value.
Re: [whatwg] Input color state: type mismatch
On 03/29/2010 09:49 PM, Aryeh Gregor wrote: On Sat, Mar 27, 2010 at 9:48 AM, Mounir Lamouri mounir.lamo...@gmail.com wrote: It looks like the input color state can't suffer from type mismatch according to the specs but it seems to be the only way to be sure the value is correct. Email and URL states can suffer from type mismatch for the exact same reason. It isn't possible for color inputs to suffer from a type mismatch, because the spec says User agents must not allow the user to set the value to a string that is not a valid lowercase simple color. If the user somehow selects an invalid color, the UA is required to simply refuse it, or auto-correct it somehow. This doesn't work well with a text input, where the user has to type the color incrementally -- I guess the UA could decide to not update the script-visible/submitted value until the user no longer focuses the form field, and if the value isn't valid at that time, it could revert to the previous value. Indeed, this sentence must be the reason why the input element in the color state can't suffer from a type mismatch. However, as you said it may be really difficult to respect this where not using a specific UI. I do not even see how we can do that reasonably. It's the same issue for date/time/week/whatever. At least, we can consider number/range to be doable by blocking letters. Type mismatch seems to be a clean way to prevent that. If the specific UI is optional, the specifications should let a descent implementation without this specific UI. -- Mounir
Re: [whatwg] Why is the legend element not categorized as flow content?
On Mon, 29 Mar 2010, divya manian wrote: On Sun, Mar 28, 2010 at 8:40 PM, Ian Hickson i...@hixie.ch wrote: In what sense is it listed under phrasing content? The content model for the legend is stated as phrasing content in the spec [1] Oh it can contain phrasing content, yes. I thought you meant it was phrasing content itself. Sorry. It's just supposed to be a child of fieldset, so it doesn't have any category at all. Thanks, the general rule [2] that is given in the spec seems to include almost every known HTML4 element as flow content, but then, legend somehow is not a flow content (even though it fulfills the General Rule). [2] should have either at least one descendant text node that is not inter-element whitespace, or at least one descendant element node that is embedded content I think you are misreading this. It's not saying that anything that contains text is a flow content element, it's saying that anything that is a flow content element is supposed to contain text. I am trying to figure out if there is an easy way to know which elements are flow or not other than referring to the spec for each element before using. You can refer to the index: http://www.whatwg.org/specs/web-apps/current-work/multipage/section-index.html#element-content-categories It lists all the elements in each category. -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Re: [whatwg] More questions about the DnD API
On Sun, Mar 28, 2010 at 1:29 PM, Stef Epardaud s...@epardaud.fr wrote: Hello, I didn't get any reaction to my previous email unfortunately since I think I brought up some valid points, but in any case I have some more feedback, so I keep sending :) I'm still trying to use the DnD for a real-world use, and keep hitting problems. This is the HTML 5 draft at 7.9.4 Drag-and-drop processing model: From this point until the end of the drag-and-drop operation, device input events (e.g. mouse and keyboard events) must be suppressed. This looks crazy to me. First Mozilla doesn't limit this since I was able to get a keypress event while dragging a node. I use this to change the behaviour of the drag operation with control/meta/alt keys while dragging, the same way file managers do it (at least Gnome Nautilus) and lots of other applications (Open Office for example). We need to be able to access key events while dragging. There might be a good rationale for this limitation stated in the spec, but based on evidence of how DnD is used in other applications perhaps it should be reviewed? DragEvent (via MouseEvent) should expose ctrlKey, altKey, metaKey, and shiftKey properties. Personally I also use the key events while dragging to allow the user to open folders in order to continue the drag operations inside, instead of requiring them to drop the file in the folder, then open the folder and drag it again to a subfolder. I also have a question regarding DnD started in an external application: since we get no dragstarted or drag events, how can we detect that something wants to be dragged in the window? I want to highlight every responsive drop points so the user can know which elements are valid drop targets, but failed to get any meaningful interaction with dragentered or dragover on the document, or body elements. Surely that's a mistake from my part, but since I expect that it's going to be asked a lot (when we don't get drag or dragstart events), perhaps it should be mentioned in the spec? dragstart and drag events are fired at the source node, but since you're dragging from a non-DOM application, you won't get any. You should still be getting dragenter / dragover / dragleave / drop if the item is dragged/dropped over a DOM page though. It works for me in WebKit. Thanks for your help. -- Stéphane Epardaud Of course, I have a question of my own. In http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#effectAllowed-initialization, is it intentional that any drag event can change the value of effectAllowed for the next event? Does it make sense to making this property settable only during dragstart / drag? Daniel
Re: [whatwg] Drag-and-drop feedback
I like the DataTransferItems proposal. I had a few questions, but no one answered, so I'm going to propose some modifications: DataTransferItems is a mapping of types to data like DataTransfer. DataTransfer mirrors DataTransferItems, but DataTransfer.getData() will throw an error if the data is a blob. Maybe a second getData method that can provide conversion given a text encoding would be useful? DataTransfer changes: DataTransfer.addFile(fileData); dataTransfer.items = DataTransferItems DataTransferItems.length .getItem(type) = DataTransferItem .add(stringData, type) .add(blobData) .add(dataTransferItem) .clear() DataTransferItem.kind = 'string', 'blob' .type = MIME type .getTextData(function callback (data)) - throws if binary is true .getBlob() - returns Blob The binary property has been folded into the kind property. When interacting with non-DOM apps or pages, some platforms can't easily convert arbitrary MIME types to native data transfer types for copy/paste or DnD. For this reason, I think the spec should explicitly list MIME types for which UAs should handle the conversion to native data transfer types. A couple that come to mind: text/plain, text/uri-list, text/rtf, application/rtf, text/html, text/xml, image/png, and image/svg+xml. UAs can make a best-effort attempt to convert the other types, but it won't be guaranteed that they will be there for interaction with non-DOM applications. Daniel On Tue, Mar 9, 2010 at 3:03 PM, Daniel Cheng dch...@google.com wrote: On Fri, Feb 26, 2010 at 10:56 AM, Dmitry Titov dim...@google.com wrote: On Mon, Feb 22, 2010 at 6:06 PM, Daniel Cheng dch...@google.com wrote: Several questions about the proposal: How does DataTransferItems interact with the original DataTransfer object? I'm assuming changes in one should be reflected in the other. If that's the case, what should happen if I do this: dataTransfer.items.add(fileData); dataTransfer.getData(mimeTypeForFile); Unless there is a specific reason to think different, there is only one set of items backing DataTransfer object - today the files and 'other items' are represented separtely, the proposed items list is simply a merged version of the same. In your example you should be able to getData. Does that mean getData() can return types besides DOMString? How come there's no DataTransferItems.get(type) method? There can be multiple items of that type (dragging several image files). Would it return another items list? What is the use case for this? Also, some items may have empty type (a file with unknown extension). I think files have always been a special case and should continue to be handled that way. I don't think there's any platform pasteboard that supports multiple items of one non-file type, so it'd make the most sense to make it a 1:1 mapping from types to data. DataTransferItem provides richer metadata than is available through the native drag-and-drop interface on most platforms. When dragging data from a non-DOM application, how do you extrapolate the metadata to fill in the type/binary fields? 'type' can be inferred in many cases from file extension, native clipboard format or other means. It can be done w/o content sniffing and disk IO. Should there be some sort of standard list of mappings that all UAs should support wherever possible? What happens if the UA doesn't have a mapping for a type? I understand 'binary' as indicator of whether or not the item can be read as a text string. I'm not sure why item.kind == string is not the same. If the intent is to also cover some files that can be read as string and as Blob, then it might be buggy because the only way to establish if the file can be converted into JS string is to actually read the bytes and try to convert to Unicode. There can be invalid character sequences or the encoding info may be missing. Perhaps we should remove 'binary' and assume that items that item.kind == string can use getTextData(callback) to pull the string. On a separate note, I think items.add(dataTransferItem) is not useful w/o a way to create a new DataTransferItem separately from the DataTransferItems list. Daniel On Mon, Feb 22, 2010 at 3:51 PM, Ian Hickson i...@hixie.ch wrote: On Thu, 4 Feb 2010, Ian Hickson wrote: On Sat, 23 Jan 2010, Eduard Pascual wrote: Would it be possible to provide a list of drag items (to call them somehow) instead of, or in addition to, the current info provided by the DataTransfer object? That's a pretty good idea. I think we should probably do this when we add more types to the DataTransfer object. Some engineers at Google discussed this a bit and came up with the following proposal: dataTransfer.items = DataTransferItems DataTransferItems.length .getItem(n) = DataTransferItem .add(stringData, type) .add(blobData)
[whatwg] 53-75923 Apple Store Confirm
Title: Welcome to the Apple Store Apple Store Call 1-800-MY-APPLE Dear Customer, Your order ID:07-62571535 accepted. Order Status You can also contact Apple Store Customer Service or visit online for more information. Visit the Apple Online Store to purchase Apple hardware, software, and third-party accessories. To purchase by phone, please call 1-800-MY-APPLE. Copyright 2010 Apple Inc. All rights reserved.