Closed
Bug 545854
Opened 15 years ago
Closed 15 years ago
[HTML5][Patch] Add a <keygen> macro to the HTML5 parser
Categories
(Core :: DOM: HTML Parser, defect, P1)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
FIXED
People
(Reporter: hsivonen, Assigned: hsivonen)
Details
Attachments
(1 file)
3.71 KB,
patch
|
mozilla+ben
:
review+
|
Details | Diff | Splinter Review |
To take bug 101019 off the critical path of getting the HTML5 parser enabled, implement <keygen> as a macro in the tree op executor.
Assignee | ||
Updated•15 years ago
|
Priority: -- → P1
Assignee | ||
Comment 1•15 years ago
|
||
See CNavDTD for the old implementation.
This implementation is deliberately bugwards-compatible with the old impl.: The author can specify _moz-type that overrides the parser-generated attribute.
Demo for smoketesting at http://software.hixie.ch/utilities/js/live-dom-viewer/saved/376
Assignee | ||
Updated•15 years ago
|
Summary: [HTML5] Add a <keygen> macro to the HTML5 parser → [HTML5][Patch] Add a <keygen> macro to the HTML5 parser
Updated•15 years ago
|
Attachment #426987 -
Flags: review?(bnewman) → review+
Comment 2•15 years ago
|
||
Comment on attachment 426987 [details] [diff] [review]
Add a bugwards-compatible keygen parser macro
>+ } else if (NS_UNLIKELY(isKeygen)) {
>+ // Adapted from CNavDTD
>+ nsCOMPtr<nsIFormProcessor> theFormProcessor =
>+ do_GetService(kFormProcessorCID, &rv);
>+ // ignore rv
>+
>+ nsTArray<nsString> theContent;
>+ nsAutoString theAttribute;
>+
>+ (void) theFormProcessor->ProvideContent(NS_LITERAL_STRING("select"),
>+ theContent,
>+ theAttribute);
Why ignore rv? Could you at least NS_ENSURE_TRUE(theFormProcessor, rv), unless you're certain do_GetService is infallible?
Otherwise looking good. The parts based on CNavDTD are a lot simpler than the CNavDTD implementation, too.
Assignee | ||
Comment 3•15 years ago
|
||
(In reply to comment #2)
> (From update of attachment 426987 [details] [diff] [review])
> >+ } else if (NS_UNLIKELY(isKeygen)) {
> >+ // Adapted from CNavDTD
> >+ nsCOMPtr<nsIFormProcessor> theFormProcessor =
> >+ do_GetService(kFormProcessorCID, &rv);
> >+ // ignore rv
> >+
> >+ nsTArray<nsString> theContent;
> >+ nsAutoString theAttribute;
> >+
> >+ (void) theFormProcessor->ProvideContent(NS_LITERAL_STRING("select"),
> >+ theContent,
> >+ theAttribute);
>
> Why ignore rv?
Because I thought malloc failures were supposed to be ignored per the meeting in December.
> Could you at least NS_ENSURE_TRUE(theFormProcessor, rv), unless
> you're certain do_GetService is infallible?
I added NS_ENSURE_SUCCESS.
Pushed:
http://hg.mozilla.org/mozilla-central/rev/b2d1b71e8321
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•