Closed Bug 381404 Opened 18 years ago Closed 18 years ago

nsFocusController::MoveFocus() should indicate failure

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.9alpha6

People

(Reporter: daniel.bainton, Assigned: daniel.bainton)

References

()

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070310 Iceweasel/2.0.0.3 (Debian-2.0.0.3-1) Build Identifier: trunk I'm using the Focus Controller and I want some way of telling if MoveFocus fails. Reproducible: Didn't try Steps to Reproduce: 1. Call nsFocusController::MoveFocus() with a DOM node that isn't currently in the document There are other ways for this to happen... Actual Results: Method returns NS_OK and nothing happens. Expected Results: Some indication that it failed.
Attachment #265495 - Flags: review?(mats.palmgren)
Comment on attachment 265495 [details] [diff] [review] nsFocusController::MoveFocus() return failure for error case The change looks ok to me, but if we're doing this I think we should also remove the GetNumberOfShells block that follows - it's redundant, GetPrimaryShell() will return nsnull in that case, and if that happens I think we should fail there too and at the end return the result of the ShiftFocus() call instead of NS_OK. Please post an updated patch with those changes.
Attachment #265495 - Flags: review?(mats.palmgren) → review-
Attachment #265505 - Flags: review?(mats.palmgren)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: unspecified → Trunk
Comment on attachment 265505 [details] [diff] [review] nsFocusController::MoveFocus() return failure for error case (updated) r=mats
Attachment #265505 - Flags: superreview?(jst)
Attachment #265505 - Flags: review?(mats.palmgren)
Attachment #265505 - Flags: review+
Attachment #265505 - Flags: superreview?(jst) → superreview+
Assignee: events → daniel.bainton
Whiteboard: [checkin needed]
Checked in to trunk at 2007-06-18 17:49 PDT. -> FIXED
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Target Milestone: --- → mozilla1.9alpha6
Flags: in-testsuite?
Depends on: 705174
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: