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

VERIFIED FIXED in M11

Status

SeaMonkey
MailNews: Message Display
P3
normal
VERIFIED FIXED
19 years ago
14 years ago

People

(Reporter: (not reading, please use seth@sspitzer.org instead), Assigned: Chris Waterson)

Tracking

Trunk
PowerPC
All

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(2 attachments)

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?

Comment 3

19 years ago
To make less confusion, let's just leave 10235 alone and use this one to track
the new failure.  Thanks.

Updated

19 years ago
QA Contact: lchiang → nbaca

Comment 4

19 years ago
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
Last Resolved: 19 years ago
Resolution: --- → FIXED

Comment 7

19 years ago
Suresh, pls mark verified once you finish checking the respin builds. Thanks.

Updated

19 years ago
Status: RESOLVED → VERIFIED

Comment 8

19 years ago
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.

Updated

19 years ago
Status: VERIFIED → REOPENED

Comment 9

19 years ago
Not working for me on NT. Compose window always seems to default to <phil>rather
than my mail identity or news identity.

Updated

19 years ago
Resolution: FIXED → ---

Comment 10

19 years ago
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.

Updated

19 years ago
Whiteboard: [PDT+]

Comment 13

19 years ago
Putting on the PDT+ radar.

Comment 14

19 years ago
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?

Updated

19 years ago
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.
Created attachment 2825 [details]
here's the simple xul to reproduce.

Updated

19 years ago
Status: NEW → RESOLVED
Last Resolved: 19 years ago19 years ago
Resolution: --- → FIXED

Comment 19

19 years ago
look in CloseContainer of nsHTMLContentSink

Updated

19 years ago
Status: RESOLVED → REOPENED

Updated

19 years ago
Assignee: rods → waterson
Status: REOPENED → NEW
(Assignee)

Updated

19 years ago
Resolution: FIXED → ---
(Assignee)

Updated

19 years ago
Status: NEW → ASSIGNED
Whiteboard: [PDT+] → [PDT+] working on XUL fix (waterson 11/13/1999)
(Assignee)

Comment 20

19 years ago
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?
(Assignee)

Comment 21

19 years ago
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.
(Assignee)

Comment 22

19 years ago
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.
(Assignee)

Comment 23

19 years ago
Created attachment 2848 [details]
HTML test case
(Assignee)

Updated

19 years ago
Assignee: waterson → rods
Status: ASSIGNED → NEW
(Assignee)

Comment 24

19 years ago
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>.

Updated

19 years ago
Assignee: rods → waterson

Comment 25

19 years ago
reassigning to waterson to fix the XULDocument
(Assignee)

Comment 26

19 years ago
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.

Comment 27

19 years ago
Send me a diff of your fix so I can play with it.

Comment 28

19 years ago
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();
>             }
(Assignee)

Comment 29

19 years ago
ok, if that works, check it in.
(Assignee)

Comment 30

19 years ago
rods fixed this.
Status: NEW → RESOLVED
Last Resolved: 19 years ago19 years ago
Resolution: --- → FIXED

Updated

19 years ago
Status: RESOLVED → VERIFIED

Comment 31

19 years ago
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.