Closed
Bug 306160
Opened 20 years ago
Closed 20 years ago
nsIDOMXULMenuListElement::GetInputField does not work for editable <menulist>
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: MatsPalmgren_bugz, Assigned: neil)
Details
(Keywords: testcase)
Attachments
(3 files)
|
386 bytes,
application/vnd.mozilla.xul+xml
|
Details | |
|
1.44 KB,
text/plain
|
Details | |
|
583 bytes,
patch
|
MatsPalmgren_bugz
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
Spawned off from bug 305840 comment 28.
STEPS TO REPRODUCE
1. Add the flollowing block of code at a suitable place, for exmple in
the XUL part of IsFocusable() in nsEventStateManager.cpp:
printf("XUL focusFrame=%p aContent=%p\n", focusFrame, aContent);
if (1) {
printf(" ++++++++++++++++++++++++++++++++++++++++\n");
nsIFrame* f = focusFrame->GetParent();
nsIFrameDebug* fdbg;
f->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**) &fdbg);
if (fdbg)
fdbg->List(f->GetPresContext(), stdout, 0);
printf(" ----------------------------------------\n");
}
if (1) {
nsCOMPtr<nsIDOMXULMenuListElement> menulist = do_QueryInterface(aContent);
if (menulist) {
printf("aContent implements nsIDOMXULMenuListElement\n");
nsCOMPtr<nsIDOMXULTextBoxElement> textbox;
menulist->GetInputField(getter_AddRefs(textbox));
nsCOMPtr<nsIContent> input = do_QueryInterface(textbox);
printf("menulist->GetInputField() => textbox=%p textbox.content=%p\n",
textbox.get(), input.get());
}
}
You need to include these too:
#include <nsIDOMXULMenuListElement.h>
#include <nsIFrameDebug.h>
2. Compile and then run the attached testcase and type ALT+M.
ACTUAL RESULTS
See attached trace file.
EXPECTED RESULTS
A non-null textbox.
| Reporter | ||
Comment 1•20 years ago
|
||
| Reporter | ||
Comment 2•20 years ago
|
||
| Assignee | ||
Comment 3•20 years ago
|
||
Oddly enough, there are no consumers of this method to fix ;-)
Assignee: nobody → neil.parkwaycc.co.uk
Status: NEW → ASSIGNED
Attachment #194068 -
Flags: superreview?(bzbarsky)
Attachment #194068 -
Flags: review?(mats.palmgren)
| Reporter | ||
Comment 4•20 years ago
|
||
Comment on attachment 194068 [details] [diff] [review]
Proposed patch
r=mats
Does nsIDOMXULTreeElement need the same fix?
Attachment #194068 -
Flags: review?(mats.palmgren) → review+
Updated•20 years ago
|
Attachment #194068 -
Flags: superreview?(bzbarsky) → superreview+
| Assignee | ||
Comment 5•20 years ago
|
||
Fix checked in.
(In reply to comment #4)
>Does nsIDOMXULTreeElement need the same fix?
We'll find out if anyone ever implements it ...
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•