Closed Bug 48616 Opened 24 years ago Closed 24 years ago

Typo in nsHTMLInputElement::HandleDOMEvent

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: hjtoi-bugzilla, Assigned: sfraser_bugs)

Details

(Whiteboard: [nsbeta3+])

Look at this line:

  if (formControlFrame && 
NS_SUCCEEDED(formControlFrame->QueryInterface(kIFrameIID, (void **)&formFrame) 
&& formFrame))

Visual C++ compiler says this line is nonsense, and I agree. It looks like a 
closing parenthesis is in a wrong place, i.e. move the last closing parenthesis 
to before the last '&&'. And actually, according to COM, QI MUST ALWAYS set the 
outgoing pointer to null if the interface is not supported so the last null 
check is redundant.

I didn't just go and fix this 'cos I do not know how to actually test if it 
works or breaks something... The code is wrong in any case, and must be fixed.
Nominating for nsbeta3. Trivial fix.
Keywords: correctness, nsbeta3
beppe: please + this. It's a trivial fix.
Status: NEW → ASSIGNED
it's nsbeta3+
Whiteboard: [nsbeta3+]
Target Milestone: --- → M18
Fix checked into 

nsHTMLInputElement.cpp
nsHTMLOptGroupElement.cpp
nsHTMLSelectElement.cpp
nsHTMLTextAreaElement.cpp
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
marking verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.