Closed
Bug 1104875
Opened 10 years ago
Closed 10 years ago
Long unresponsive scripts should be truncated so that they don't extend past screen
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
People
(Reporter: rfeeley, Assigned: bzbarsky)
References
Details
Attachments
(2 files, 1 obsolete file)
101.60 KB,
image/png
|
Details | |
2.91 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
Stop script button was out of view because the script is is not wrapping or not being truncated.
Comment 1•10 years ago
|
||
The code here:
http://hg.mozilla.org/mozilla-central/annotate/acde07cb4e4d/dom/base/nsGlobalWindow.cpp#l11171
should truncate scriptLocation in some way. Backlogging this.
Component: General → DOM
Flags: qe-verify-
Flags: in-testsuite-
Flags: firefox-backlog+
OS: Mac OS X → All
Product: Firefox → Core
Hardware: x86 → All
![]() |
Assignee | |
Comment 2•10 years ago
|
||
Hmm. I guess the UI can't do that because we're using a generic dialog?
The big issue is this: what width to truncate at? I don't see a way for this code to tell....
Comment 3•10 years ago
|
||
(In reply to Please do not ask for reviews for a bit [:bz] from comment #2)
> Hmm. I guess the UI can't do that because we're using a generic dialog?
Yes. That and we concatenate it with the l10n string so there's really very little way to tell anything what/how to truncate otherwise.
> The big issue is this: what width to truncate at? I don't see a way for
> this code to tell....
Fair! I would just lowball it at 60 characters, take the first/last 30 and add an ellipsis in the middle. That will still not be good enough for customized windows themes that have a really high font-size for message-box text, but that's not the 99% case, and this dialog isn't either, so it doesn't seem to me like we should do the (significant amount of) work here to get it right 100% of the time.
![]() |
Assignee | |
Comment 4•10 years ago
|
||
Attachment #8529234 -
Flags: review?(peterv)
![]() |
Assignee | |
Updated•10 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
![]() |
Assignee | |
Comment 5•10 years ago
|
||
Comment on attachment 8529234 [details] [diff] [review]
Ellipsize long unresponsive script locations so they don't make the slow script dialog too big
Er, no, this is bunk. It's better to do on UTF-16, because what I have totally fails on multibyte UTF-8 sequences!
Attachment #8529234 -
Flags: review?(peterv) → review-
![]() |
Assignee | |
Comment 6•10 years ago
|
||
Attachment #8529252 -
Flags: review?(peterv)
![]() |
Assignee | |
Updated•10 years ago
|
Attachment #8529234 -
Attachment is obsolete: true
Comment 7•10 years ago
|
||
Comment on attachment 8529252 [details] [diff] [review]
Ellipsize long unresponsive script locations so they don't make the slow script dialog too big
Review of attachment 8529252 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/base/nsGlobalWindow.cpp
@@ +11187,5 @@
> + MOZ_ASSERT(cutLength > 0);
> + if (NS_IS_LOW_SURROGATE(filenameUTF16[cutStart])) {
> + // Don't truncate before the low surrogate, in case it's preceded by a
> + // high surrogate and forms a single Unicode character. Instead, just
> + // inlude the low surrogate.
include
Attachment #8529252 -
Flags: review?(peterv) → review+
![]() |
Assignee | |
Comment 8•10 years ago
|
||
Target Milestone: --- → mozilla37
Comment 9•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Iteration: --- → 37.1
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•