Closed
Bug 361334
Opened 18 years ago
Closed 18 years ago
Onbeforeunload dialog has too many line breaks
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: martijn.martijn, Assigned: martijn.martijn)
References
Details
(Keywords: regression, testcase)
Attachments
(4 files, 1 obsolete file)
(deleted),
text/html
|
Details | |
(deleted),
text/html
|
Details | |
(deleted),
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
This changed with my patch for bug 317334, so this is a problem on 1.8.1 branch too. There used to be 2 line breaks shown in the onbeforunload dialog, but with the check in of my patch for bug 317334, the dialog shows 4 line breaks. I think this is easy to fix in: http://lxr.mozilla.org/seamonkey/source/layout/base/nsDocumentViewer.cpp#1197
Assignee | ||
Comment 1•18 years ago
|
||
Assignee | ||
Comment 2•18 years ago
|
||
This fixes it. I'm kinda curious of what StringHead(event.text, len) should give. It doesn't seem to give any text at all. Is there a situation when it has any text?
Attachment #246097 -
Flags: superreview?(jst)
Attachment #246097 -
Flags: review?(jst)
Comment 3•18 years ago
|
||
Comment on attachment 246097 [details] [diff] [review] patch event.text gets set if the beforeunload event handler sets event.returnValue (or returns a string value, if regsitered with window.onbeforeunload). r+sr=jst
Attachment #246097 -
Flags: superreview?(jst)
Attachment #246097 -
Flags: superreview+
Attachment #246097 -
Flags: review?(jst)
Attachment #246097 -
Flags: review+
Assignee | ||
Comment 4•18 years ago
|
||
Comment on attachment 246097 [details] [diff] [review] patch Ah, thanks, in that case this patch is no good, because the message would get at the same line as the top message.
Attachment #246097 -
Attachment is obsolete: true
Assignee | ||
Comment 5•18 years ago
|
||
Updated•18 years ago
|
Attachment #246093 -
Attachment is patch: false
Attachment #246093 -
Attachment mime type: text/plain → text/html
Assignee | ||
Comment 6•18 years ago
|
||
So something like this?
Attachment #246130 -
Flags: superreview?(jst)
Attachment #246130 -
Flags: review?(jst)
Updated•18 years ago
|
Component: General → Layout
QA Contact: general → layout
Comment 7•18 years ago
|
||
Comment on attachment 246130 [details] [diff] [review] patchv2 Sure, r+sr=jst
Attachment #246130 -
Flags: superreview?(jst)
Attachment #246130 -
Flags: superreview+
Attachment #246130 -
Flags: review?(jst)
Attachment #246130 -
Flags: review+
Assignee | ||
Comment 8•18 years ago
|
||
Checking in nsDocumentViewer.cpp; /cvsroot/mozilla/layout/base/nsDocumentViewer.cpp,v <-- nsDocumentViewer.cpp new revision: 1.499; previous revision: 1.498 done Checked in on trunk.
Assignee: nobody → martijn.martijn
Assignee | ||
Updated•18 years ago
|
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 9•18 years ago
|
||
Comment on attachment 246130 [details] [diff] [review] patchv2 >Index: layout/base/nsDocumentViewer.cpp >+ nsAutoString msg; >+ if (len == 0) { >+ msg = preMsg + StringHead(event.text, len) + >+ NS_LITERAL_STRING("\n\n") + postMsg; What's the point of including event.text if you know its length is 0?
Assignee | ||
Comment 10•18 years ago
|
||
> What's the point of including event.text if you know its length is 0?
You're right, there is no point in that, that was an oversight of me.
Attachment #246226 -
Flags: superreview?(jst)
Attachment #246226 -
Flags: review?(jst)
Updated•18 years ago
|
Attachment #246226 -
Flags: superreview?(jst)
Attachment #246226 -
Flags: superreview+
Attachment #246226 -
Flags: review?(jst)
Attachment #246226 -
Flags: review+
Assignee | ||
Comment 11•18 years ago
|
||
Checking in nsDocumentViewer.cpp; /cvsroot/mozilla/layout/base/nsDocumentViewer.cpp,v <-- nsDocumentViewer.cpp new revision: 1.500; previous revision: 1.499 done Checked the patch in from comment 10, thanks Gavin.
You need to log in
before you can comment on or make changes to this bug.
Description
•