Closed Bug 16821 Opened 25 years ago Closed 25 years ago

[DOGFOOD][REGRESSION] pre-choose identity based on folder pane selection not working

Categories

(SeaMonkey :: MailNews: Message Display, defect, P3)

PowerPC
All
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: sspitzer, Assigned: waterson)

References

()

Details

(Whiteboard: [PDT+] working on XUL fix (waterson 11/13/1999))

Attachments

(2 files)

this feature broke.  it's causing other bugs, see #16780

the current (broken) behaviour is the first identity always gets chosen.

I'm looking into it, as I implemented the feature.
Blocks: 16780
Status: NEW → ASSIGNED
No longer blocks: 16780
accepting

adding dependency
the bug for the original feature was #10235

lisa, should this be marked a dup of 10235, and should 10235 be reopened?
To make less confusion, let's just leave 10235 alone and use this one to track
the new failure.  Thanks.
QA Contact: lchiang → nbaca
Setting QA Contact to nbaca, adding lchiang to Cc: list.
fix in hand.  the problem was caused by me.  I depricated the
FindServerUsingURI() method, and removed all C++ calls to it, but forgot a JS
call to it.

I'm finding the server (using the uri) in commandglue.js a different way, and now
it works.

fix in hand, awaiting review and then I'll check it in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Suresh, pls mark verified once you finish checking the respin builds. Thanks.
Status: RESOLVED → VERIFIED
Build 1999110808M11: Win32/NT4, Linux/Redhat 6.0, Mac 8.5.1
Verified Fixed. Since bug# 10235 has been Verified Fixed and its description is
the same as this one, I am verifying this bug.
Status: VERIFIED → REOPENED
Not working for me on NT. Compose window always seems to default to <phil>rather
than my mail identity or news identity.
Resolution: FIXED → ---
Build 1999111017M11: Win32/NT4, Linux/Redhat 5.0, Mac 8.5.1

- This was working with the 11/08 builds.
- I just checked the 11/09 builds and this is where the regression appears.
- It is also a problem in todays build, 11/10. Compose appears to be choosing
the identity from my first mail account.
Status: REOPENED → ASSIGNED
this is the bug that will not die.

I kill it every couple of weeks and it comes back like a zombie.

die bug! die!

accepting.
according to alecf, the html select widget is "having problems" today.

I'm still going to look into this bug, I'm hoping it becomes a duplicate of html
select widget bug.
Whiteboard: [PDT+]
Putting on the PDT+ radar.
Build 1999111017M11: NT4, Linux, Mac

Using multiple accounts I select a folder in the qatest20 account, select "New
Msg" and noticed that the From: field shows qatest22 (which is wrong, qatest22
is the first mail account listed). I sent the message and after receiving
the message noticed that the header states that it is from qatest20, which is
correct.
adding rods and kmcclusk to the cc list.

one of them is the HTML select guru.

rod / kevin:  we have a problem where the html select isn't showing the option
that is actually selected.  is this a dup?
Assignee: sspitzer → rods
Status: ASSIGNED → NEW
Re-assigning to rod. This is probably a dup of a known problem.
adding phil to the cc list.
Status: NEW → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
look in CloseContainer of nsHTMLContentSink
Status: RESOLVED → REOPENED
Assignee: rods → waterson
Status: REOPENED → NEW
Resolution: FIXED → ---
Status: NEW → ASSIGNED
Whiteboard: [PDT+] → [PDT+] working on XUL fix (waterson 11/13/1999)
rods: does this need to happen after the initial reflow? I notice that
nsHTMLSelectElement::DoneAddingContent() goes off and looks for frames n'
stuff. XUL builds the entire content model before it does an initial reflow.

Seems like the <select> needs to be smart enough to handle that case, no?
For example, you'll need to handle this case so that somebody can do a
'document.write()' of a <select> element. Or uses the L1 DOM APIs to add an
entire <select> tree, complete with <option> children?
Let me try to say that a bit more clearly.

1. In HTML, the initial reflow is done very early on. So your trick of using
the content sink to notify you when the <select> is closed is fine.

2. In XUL, the -entire- content model is constructed before initial reflow. So,
calling DoneAddingContent() during content model construction will be -almost-
be a no-op. There will be no frames there to initialize.

3. This case is isomorphic to the case where, through JS and DOM Level 1 APIs,
a user constructs and initializes a <select> element, complete with <option>
elements, and then adds the subtree en masse into the content model. I would
think you need to handle that case.

--

Note that in (2), I said "almost a no-op". I notice that you do store some
state in the nsHTMLSelectElement; namely, you set mIsDoneAddingContent to true.
So, if that's enough to fix the bug, I can certainly hack the XUL content
construction to ensure this gets called; however, I think this bug will come
back to bite you when somebody does what I describe in (3). Which seems to
indicate that we need to rethink how this part of the <select> is architected.

I'll go see if all nsHTMLSelectElement really cares about is the
mIsDoneAddingContent flag, in which case we can hack it for M11.
Ok, as I'd feared, calling DoneAddingContent() before the frames are
constructed ends up being a Very Bad Thing. The <select> doesn't even show up.
Attached file HTML test case
Assignee: waterson → rods
Status: ASSIGNED → NEW
rods: i've just attached an HTML test case that illustrates how badly broken
selects are via Level 1 DOM APIs.

1. Constructing the <option> and setting the 'selected' attribute via
setAttribute() doesn't work.

2. Constructing the <option> and setting "option.seleted = true" doesn't work.

3. Setting "option.selected = true" even -after- the option is added into the
content model doesn't work.

Reassigning back to you. This is not a problem with XUL. It is a problem with
<select>.
Assignee: rods → waterson
reassigning to waterson to fix the XULDocument
rods: we need to talk. I don't understand why I need to do this. If a <select>
is created via DOM L1 document.createElement() API, then -when on earth- is
DoneAddingContent() ever called? Won't that case break also?

Furthermore, I -did- try adding a call to DoneAddingContent(), but it didn't
work. It seems that you expect the frame to already exist by that point, which
it doesn't.
Send me a diff of your fix so I can play with it.
Here is the diff that fixes the XUL's select:

Index: nsXULDocument.cpp
===================================================================
RCS file: /cvsroot/mozilla/rdf/content/src/nsXULDocument.cpp,v
retrieving revision 1.188
diff -r1.188 nsXULDocument.cpp
117a118
> #include "nsISelectElement.h"
4739a4741,4745
>             nsresult srv;
>             nsCOMPtr<nsISelectElement> select = do_QueryInterface(element,
&srv);
>             if (NS_SUCCEEDED(srv)) {
>               srv = select->DoneAddingContent();
>             }
ok, if that works, check it in.
rods fixed this.
Status: NEW → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Build 1999111521M11: Win32/NT4
Build 1999111520M11: Linux/Redhat 6.0
Build 1999111520M11: Mac 8.5.1
Verified Fixed on all platforms. Select an account, select "New Msg" and the
Compose window is displaying the correct identity whether it's a POP, IMAP or
News account.
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: