WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
68156
HTML5 <time> initial implementation
https://bugs.webkit.org/show_bug.cgi?id=68156
Summary
HTML5 <time> initial implementation
Vineet Chaudhary (vineetc)
Reported
2011-09-15 05:44:57 PDT
The main objective is to add the files for html elements also providing the initial implementation to support the tag. Latest Opera(11.51) also have support for this. Specification reference:
http://www.w3.org/TR/html5/text-level-semantics.html#the-time-element
Attachments
time element initial patch
(22.45 KB, patch)
2011-09-15 06:03 PDT
,
Vineet Chaudhary (vineetc)
no flags
Details
Formatted Diff
Diff
Test Case
(596 bytes, text/html)
2011-09-15 06:24 PDT
,
Vineet Chaudhary (vineetc)
no flags
Details
time_element_initial_patch_01
(23.71 KB, patch)
2011-09-19 04:12 PDT
,
Vineet Chaudhary (vineetc)
tkent
: review-
Details
Formatted Diff
Diff
updated_patch
(36.76 KB, patch)
2011-11-11 09:49 PST
,
Vineet Chaudhary (vineetc)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Vineet Chaudhary (vineetc)
Comment 1
2011-09-15 05:49:50 PDT
I am considering this bug as Master Bug for time tag implementation.
Vineet Chaudhary (vineetc)
Comment 2
2011-09-15 06:03:46 PDT
Created
attachment 107484
[details]
time element initial patch
Vineet Chaudhary (vineetc)
Comment 3
2011-09-15 06:15:02 PDT
Attached patch consist of initial implementation of HTML5 time tag. Below listed items are work in progress. 1) If datetime attribute is not present, then the element's textContent must be considered if valid. 2) pubdate needs to be supported.
Vineet Chaudhary (vineetc)
Comment 4
2011-09-15 06:24:38 PDT
Created
attachment 107486
[details]
Test Case Attached test case explains the usage of time tag. Also can someone help me to add the new files to xcode project.
Alexey Proskuryakov
Comment 5
2011-09-15 10:27:35 PDT
Please announce this work on webkit-dev mailing list.
Kent Tamura
Comment 6
2011-09-15 17:50:08 PDT
Comment on
attachment 107484
[details]
time element initial patch View in context:
https://bugs.webkit.org/attachment.cgi?id=107484&action=review
> Source/WebCore/html/HTMLTimeElement.cpp:2 > + * Copyright (C) 2010 Apple Inc. All rights reserved.
Why does this have Apple copyright?
> Source/WebCore/html/HTMLTimeElement.cpp:58 > + // <TO_DO> set a bool var and notify the nearest artical element @ this date.
Why do we need to notify?
> Source/WebCore/html/HTMLTimeElement.cpp:86 > + if (m_dateComponents.type())
Should compare with DateComponents::Invalid.
> Source/WebCore/html/HTMLTimeElement.cpp:88 > + return 0;
You must not return 0. The specification says we must return null Date in this case.
Vineet Chaudhary (vineetc)
Comment 7
2011-09-19 04:12:15 PDT
Created
attachment 107832
[details]
time_element_initial_patch_01 Thanks Kent Tamura for the review comments, Please find the updated patch.
> + * Copyright (C) 2010 Apple Inc. All rights reserved. > Why does this have Apple copyright?
Copyrights updated
> Source/WebCore/html/HTMLTimeElement.cpp:86 > + if (m_dateComponents.type()) > Should compare with DateComponents::Invalid.
Done.
> Source/WebCore/html/HTMLTimeElement.cpp:88 > + return 0; > You must not return 0. The specification says we must return null Date in this case.
Corrected. Also checking if datetime attribute is not present, then the element's textContent must be considered if valid.
Kent Tamura
Comment 8
2011-09-19 08:25:22 PDT
Comment on
attachment 107832
[details]
time_element_initial_patch_01 No tests in this patch.
Ian 'Hixie' Hickson
Comment 9
2011-09-19 15:24:21 PDT
Please see
https://lists.webkit.org/pipermail/webkit-dev/2011-September/018009.html
Vineet Chaudhary (vineetc)
Comment 10
2011-09-20 06:54:12 PDT
My motive to implement this tag is fill the gap between specification and webkit and considering potential usage could be in the Calenders(to set the event), blogs & news feeds where <time> may add more semantic. But as there is an active discussion going on
http://www.w3.org/Bugs/Public/show_bug.cgi?id=13240
this thread about replacing <time> with <data>, So I think we should revisit this implementation after the closer of mentioned bug. Please guide me if anyone have second thought on this.
Vineet Chaudhary (vineetc)
Comment 11
2011-11-11 09:49:35 PST
Created
attachment 114719
[details]
updated_patch (In reply to
comment #8
)
> (From update of
attachment 107832
[details]
) > No tests in this patch.
Added tests with patch. As a part of discussion going
http://lists.w3.org/Archives/Public/public-html/2011Nov/0011
<time> is again to added in w3c-spec. May I start working on this again and have this basic implementation as template for Time Element?
Kent Tamura
Comment 12
2011-11-13 18:06:58 PST
(In reply to
comment #11
)
> As a part of discussion going
http://lists.w3.org/Archives/Public/public-html/2011Nov/0011
<time> is again to added in w3c-spec. > May I start working on this again and have this basic implementation as template for Time Element?
The status of <time> is not clear yet. e.g. WHATWG specification still has no <time>. IMO, we should not start the implementation yet.
Adam Barth
Comment 13
2011-11-13 22:55:54 PST
Yeah, <time> seems to be in serious state of flux. Let's let things settle down a bit before jumping in here.
Ian 'Hixie' Hickson
Comment 14
2011-11-18 16:30:19 PST
I just uploaded a proposal for a new <time> to the HTML spec on the WHATWG site. Still in flux, but now's a good time to send feedback.
Vineet Chaudhary (vineetc)
Comment 15
2011-11-19 01:19:53 PST
Thank you Hixie for updates. As I see here are few updates with new implementation. Ref :
http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element
1) Now there are no pubDate(can used with itemprop) and valueAsDate attribute but datetime. 2) The datetime value of a time element is the value of the element's datetime content attribute, if it has one, or the element's textContent, if it does not. Just a query do we really don't want previous "Date valueAsDate" attribute as it could be useful to get date or time in the form of Date object.
Ian 'Hixie' Hickson
Comment 16
2011-11-19 21:20:17 PST
The plan regarding the API is to see what people do with the element before deciding what API to expose. (In practice so far most usage of the element that I have seen would have no use for an API.)
Anne van Kesteren
Comment 19
2023-05-15 00:27:33 PDT
This element has an implementation now.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug