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)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: hsivonen, Assigned: hsivonen)

Details

Attachments

(1 file)

To take bug 101019 off the critical path of getting the HTML5 parser enabled, implement <keygen> as a macro in the tree op executor.
Priority: -- → P1
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: nobody → hsivonen
Status: NEW → ASSIGNED
Attachment #426987 - Flags: review?(bnewman)
Summary: [HTML5] Add a <keygen> macro to the HTML5 parser → [HTML5][Patch] Add a <keygen> macro to the HTML5 parser
Attachment #426987 - Flags: review?(bnewman) → review+
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.
(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.

Attachment

General

Created:
Updated:
Size: