Closed Bug 347003 Opened 19 years ago Closed 17 years ago

Message editor on thedailywtf.com forums causes an infinite reload loop when using back button

Categories

(Core :: DOM: Editor, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: g.teunis, Unassigned)

References

()

Details

(Keywords: regression, testcase, Whiteboard: [would take patch])

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060802 Minefield/3.0a1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060802 Minefield/3.0a1 Message editor on thedailywtf.com forums causes an infinite reload loop when using back button. Reproducible: Sometimes Steps to Reproduce: 1. Open the above mentioned URL (http://thedailywtf.com/forums/AddPost.aspx?PostID=69457) 2. Click on the thedailywtf logo on the top-left op the page 3. Click on the back button Actual Results: The page will get caught in an infinite reload loop most of the times. Expected Results: The page should load once.
Status: UNCONFIRMED → NEW
Ever confirmed: true
The oldest build where I've seen this until now was 12-Aug-2005-01.
Regressed between 2006-07-14 and 2006-07-18.
Hmm, didn't notice Ria's comment
No longer blocks: 343282
The regression range Smaug sees in comment 2 is due to bug 343282, that bug fixed bfcache to make that work again, but it isn't really the cause for this bug. This bug can only be seen when bfcache is enabled.
It was functional for some days after the patch of Bug 335251 indeed. I don't see it in 1.9a1_2006071715 but the bug is present in 1.9a1_2006071721. So it must be in here: http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=2006-07-17+14%3A00&maxdate=2006-07-17+22%3A00 I see it also in branch. I have not yet seen it with bfcache to 0.
Component: General → History: Session
Keywords: regression
Product: Firefox → Core
Version: unspecified → Trunk
Ok, backing out the patch for bug 301358 doesn't help, so I guess this is a regression from bug 296639, somehow.
Assignee: nobody → general
Blocks: splitwindows
Component: History: Session → DOM
QA Contact: general → ian
The immediate reason for the looping is that nsEditingSession::EndDocumentLoad calls nsEditingSession::SetupEditorOnWindow which tries to call nsDOMWindowUtils::GetImageAnimationMode which throws because there is no prescontext in the docshell at the moment. The document in the window has no presshell either. So we get an error rv from SetupEditorOnWindow, at which point nsEditingSession::EndDocumentLoad sets up a timer to load about:blank in the docshell. When this load completes, we call nsEditingSession::EndDocumentLoad and so forth. So the _real_ problem, somehow, is that editing session expects to have a prescontext and we just don't have one. Why do we still have an editing session, though? A testcase would be really nice. :(
Flags: blocking1.9?
Flags: blocking1.8.1?
Keywords: qawanted
Keywords: testcase
Attached file Testcase
1. Load testcase 2. Click on any bookmark, or the throbber to load another page 3. Press the back button Note that the iframe needs to be in an element that has display:none
So... we used to not set up editing at all for iframes with no presshell, until bug 262998 got fixed. If editor can't deal with lack of a presshell, we should go back to throwing in that code (and tearing down the editing session if our presshell goes away). If editor _can_ deal, we should just fix the codepath that throws in this case to work instead. I just don't know enough about editor to figure out which way it wants to jump.
Assignee: general → nobody
Component: DOM → Editor
QA Contact: ian
Daniel says that editor can't deal with lack of a presshell. So what we should _probably_ do is that if designMode is enabled while we have no presshell, we should do nothing, and then _really_ enable it once we have a presshell... This means a bit of surgery on SetDesignMode, an extra member to keep track of whether we should enable (?) and a way to detect when we have a presshell (perhaps the AddObserver call? We could post an event there; when the event fires we instantiate the editor. Or something. Not sure what script access stuff is involved). Speaking of which, doing that would break scripting of editor stuff in a display:none iframe. But I guess that's the best we can do for now. :(
Without being clear if this is a regression from 1.5 (since one of the potentially causing bugs seems to have been taken for 1.8) or how commonly this will affect users, we're not able to block on this at this point.
Flags: blocking1.8.1? → blocking1.8.1-
Whiteboard: [would take patch]
Keywords: qawanted
Flags: blocking1.9? → blocking1.9-
Whiteboard: [would take patch] → [would take patch][wanted-1.9]
QA Contact: editor
Flags: wanted1.9+
Whiteboard: [would take patch][wanted-1.9] → [would take patch]
This doesn't happen for me anymore, can we close this?
Yeah, works for me too.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: