Closed
Bug 129612
Opened 23 years ago
Closed 22 years ago
Remove "Enable Syntax Highlighting" checkbox
Categories
(SeaMonkey :: UI Design, defect)
SeaMonkey
UI Design
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bugzilla, Assigned: rossi)
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
neil
:
review+
bugzilla
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
The checkbox shouldn't have existed from the start (except in Debug ui, maybe)
and is becoming less necessary as speed improvements are checked in.
Comment 1•23 years ago
|
||
How about removing the pref in addition to removing the checkbox?
Comment 2•23 years ago
|
||
Current testing shows that view source _with_ highlighting is about 2-5 times
slower than view source without (depending on page). This is in case we need
some sort of hard data here. :)
I agree that this pref is better off in debug prefs. I also think we still need
this... a typical "big" page takes about 10 seconds on my machine (p3-733).
That's a long time of 100% CPU usage.
Comment 3•23 years ago
|
||
I think it's the "100% CPU", not the slowness, that's the problem. See bug
129640, "Incremental rendering is busted on fast connections". (The cache is a
very fast connection.)
bz: how big was the page you tested, and were you testing a 3/6 or later build?
I view-sourced http://www.w3.org/TR/REC-html32 (122kB) on 400MHz, and it took 5
seconds.
Comment 4•23 years ago
|
||
Try http://www.toronto.com (make sure you have "wrap long lines" _off_ in view
source). I'm testing with a 3/7 build with all the view source perf stuff that
I've checked into the tree in it. Similar issues can be observed on long
documents converted into HTML from MSWord and the like.
As a note, the "100%" cpu problem should also be better now that I've made the
view-source parser interruptible.... Except on bidi pages or pages with no
linebreaks we should no longer freeze up the UI....
Comment 6•23 years ago
|
||
so we agree that it should remain turned on by default, right?
There is no space in the debug preference ui for an additional checkbox, so we
might have to kick it out and perf testers will have to manually change it (or
hack a menuitem in the viewsource xul to change the pref).
Comment 9•23 years ago
|
||
Attachment #84037 -
Flags: review+
Comment 10•23 years ago
|
||
Why not remove the pref, too? To put it differently, who do you expect will turn
it off?
Comment 11•23 years ago
|
||
I suspect this pref will become a lot more attractive this summer when I fix
view-source to actually report the correct source when highlighting is off....
(the highlighted version will continue to show the crap it shows now).
Comment 12•22 years ago
|
||
If the pref is not removed, it should be moved to the View menu of View Source.
It doesn't fit with the other items in Appearance -> Colors prefs, and more
people use prefs than view source.
Comment 13•22 years ago
|
||
Comment on attachment 84037 [details] [diff] [review]
the patch
please readd to view menu in viewsource
Attachment #84037 -
Flags: needs-work+
Comment 14•22 years ago
|
||
This is separate from the patch to remove the option from preferences.
Updated•22 years ago
|
Comment 15•22 years ago
|
||
> + PageLoader.LoadPage(PageLoader.currentDescriptor,
pageLoaderIface.DISPLAY_NORMAL);
I'm pretty unconvinced that this'll do the right thing wrt to cache and such...
Also, what happens if I have multiple "view source" windows open at once and I
toggle the menuitem in one of them. Should they all change, or just the one I
toggled?
Comment 16•22 years ago
|
||
> > + PageLoader.LoadPage(PageLoader.currentDescriptor,
pageLoaderIface.DISPLAY_NORMAL);
> I'm pretty unconvinced that this'll do the right thing wrt to cache and such...
Actually it seems to be the only way to do the right thing, everything else
gives me the POSTDATA prompt. I use DISPLAY_NORMAL because the currentDescriptor
is already for a view-source: URL.
> Also, what happens if I have multiple "view source" windows open at once and I
toggle the menuitem in one of them. Should they all change, or just the one I
toggled?
Well, wrap long lines only changes the current and new windows...
Comment 17•22 years ago
|
||
Comment on attachment 90428 [details] [diff] [review]
Add View/Syntax Highlighting menuitem to source window
>+ document.getElementById("cmd_highlightSyntax").setAttribute("checked", gPrefs.getBoolPref("view_source.syntax_highlight"));
What if getBoolPref throws an exception (eg the pref is just not set)?
>+ var pageLoaderIface = Components.interfaces.nsIWebPageDescriptor;
const, not var.
>+ var PageLoader = getBrowser().webNavigation.QueryInterface(pageLoaderIface);
Do we need a getPageLoader() function in this file yet?
> <menuitem id="menu_wrapLongLines" label="&menu_wrapLongLines.title;" accesskey="&menu_wrapLongLines.accesskey;" type="checkbox" command="cmd_wrapLongLines"/>
>+ <menuitem label="&menu_highlightSyntax.label;" accesskey="&menu_highlightSyntax.accesskey;" type="checkbox" command="cmd_highlightSyntax"/>
80-column lines, please? I know the existing code does not do that; you could
fix that too. ;)
Comment 18•22 years ago
|
||
Updated•22 years ago
|
Attachment #90428 -
Attachment is obsolete: true
Comment 19•22 years ago
|
||
Comment on attachment 91093 [details] [diff] [review]
Addressed bz's comments
r/sr=bzbarsky
Attachment #91093 -
Flags: review+
Comment 20•22 years ago
|
||
Comment on attachment 91093 [details] [diff] [review]
Addressed bz's comments
r=doron, sr=bz
Attachment #91093 -
Flags: superreview+
Comment 21•22 years ago
|
||
Comment on attachment 84037 [details] [diff] [review]
the patch
doron, I assume this bit can be resurrected now? If so, can you or rossi find
sr/a= for it as I'm going on holiday soon.
Attachment #84037 -
Flags: needs-work+
Comment 22•22 years ago
|
||
blake can sr, he loves this bug
Comment 23•22 years ago
|
||
Comment on attachment 91093 [details] [diff] [review]
Addressed bz's comments
a=asa (on behalf of drivers) for checkin to 1.1
Attachment #91093 -
Flags: approval+
Comment 24•22 years ago
|
||
Comment on attachment 91093 [details] [diff] [review]
Addressed bz's comments
checked in, leaving open for checkbox removal
Attachment #91093 -
Attachment is obsolete: true
Reporter | ||
Updated•22 years ago
|
Attachment #84037 -
Flags: superreview+
Reporter | ||
Comment 25•22 years ago
|
||
Comment on attachment 84037 [details] [diff] [review]
the patch
sr=blake
All that's left is to check this in, right?
Comment 26•22 years ago
|
||
yup
Comment 27•22 years ago
|
||
Comment on attachment 84037 [details] [diff] [review]
the patch
a=asa (on behalf of drivers) for checkin to 1.1
Attachment #84037 -
Flags: approval+
Comment 28•22 years ago
|
||
I noted that the initial state of the checkbox isn't reflected properly. i.e.,
when you launch view-source for the first time (on a profile for which the pref
has never been created), the syntax_highlight checkbox doesn't appear as
checked.
Unlike wrap_long_lines which defaults to false when the pref doesn't exist,
syntax_highlight defaults to true. This distinction isn't enforced in the patch.
Comment 29•22 years ago
|
||
Not true, syntax_highlight defaults to false if the default pref doesn't exist.
But in current releases, it does exist, and it is set to true.
Comment 30•22 years ago
|
||
This is fixed, right?
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 31•22 years ago
|
||
re: comment 29
It might have been in the window of "View Selection Source" that I saw what I
reported in comment 28. It is still there, but seems now covered in bug 160924.
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•