Last Comment Bug 379183 - port new Firefox page info to SeaMonkey
: port new Firefox page info to SeaMonkey
Status: RESOLVED FIXED
:
Product: SeaMonkey
Classification: Client Software
Component: Page Info (show other bugs)
: Trunk
: All All
: -- normal with 2 votes (vote)
: seamonkey2.0a1
Assigned To: Daniel Brooks [:db48x]
:
Mentors:
Depends on: 339102 392050 405104 405105 428803
Blocks: 397236 394170 523573
  Show dependency treegraph
 
Reported: 2007-04-29 06:06 PDT by Robert Kaiser (not working on stability any more)
Modified: 2010-08-01 04:53 PDT (History)
14 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
379183-1.diff (164.50 KB, patch)
2007-08-06 00:49 PDT, Daniel Brooks [:db48x]
no flags Details | Diff | Review
379183-2.diff (162.10 KB, patch)
2007-08-06 06:32 PDT, Daniel Brooks [:db48x]
neil: superreview-
Details | Diff | Review
379183-3.diff (161.27 KB, patch)
2007-08-06 09:05 PDT, Daniel Brooks [:db48x]
neil: superreview-
Details | Diff | Review
379183-4.diff (168.93 KB, patch)
2007-08-08 04:53 PDT, Daniel Brooks [:db48x]
no flags Details | Diff | Review
379183-5.diff (170.43 KB, patch)
2007-08-08 10:39 PDT, Daniel Brooks [:db48x]
no flags Details | Diff | Review
379183-6.diff (21.30 KB, patch)
2007-08-28 20:16 PDT, Daniel Brooks [:db48x]
no flags Details | Diff | Review
379183-6b.diff (169.51 KB, patch)
2007-08-28 20:18 PDT, Daniel Brooks [:db48x]
neil: review-
Details | Diff | Review
379183-7.diff (169.55 KB, patch)
2007-09-12 08:49 PDT, Daniel Brooks [:db48x]
neil: review+
Details | Diff | Review
379183-8.diff (169.25 KB, patch)
2007-09-21 06:19 PDT, Daniel Brooks [:db48x]
db48x: review+
Details | Diff | Review

Description Robert Kaiser (not working on stability any more) 2007-04-29 06:06:43 PDT
In bug 339102, as part of a GSoC project, Firefox got a reworked page info dialog. We should probably port that to SeaMonkey (trunk, suiterunner).

I'd personally prefer to still have tabs instead of the icon strip that Firefox uses, but I guess the rest looks fine for us as well.
Comment 1 Florian Quèze [:florian] [:flo] 2007-04-29 06:25:53 PDT
(In reply to comment #0)
> In bug 339102, as part of a GSoC project, Firefox got a reworked page info
> dialog. We should probably port that to SeaMonkey (trunk, suiterunner).
> 
There are a few things that still need to be fixed in the new Firefox page info. I think you will probably want to wait for bug 377364 and bug 378770 to be fixed.

> I'd personally prefer to still have tabs instead of the icon strip that Firefox
> uses, but I guess the rest looks fine for us as well.
> 
You may also want to keep the forms and/or links tab.
Comment 2 Daniel Brooks [:db48x] 2007-08-06 00:49:57 PDT
Created attachment 275401 [details] [diff] [review]
379183-1.diff
Comment 3 Philip Chee 2007-08-06 01:29:10 PDT
I don't think that SeaMonkey has any feed handling code yet.
Comment 4 Daniel Brooks [:db48x] 2007-08-06 06:32:54 PDT
Created attachment 275423 [details] [diff] [review]
379183-2.diff

addresses several comments by Kairo
Comment 5 neil@parkwaycc.co.uk 2007-08-06 08:34:36 PDT
Comment on attachment 275423 [details] [diff] [review]
379183-2.diff

>- * The Initial Developer of the Original Code is Daniel Brooks.
Isn't it?

>+textbox {
>   background: transparent !important;
>   border: none;
>   padding: 0px;
>+  margin-top: 1px;
>   -moz-appearance: none;
> }
Why the margin change? [Why not use textbox class="plain"?]

> textbox.header {
>-  margin-left: 0;
>+  -moz-margin-start: 0;
> }
You don't have to change this yet if you don't want to ;-)

>+/* General Tab */
>+groupbox.collapsable caption .caption-icon { 
>+  width: 9px;
>+  height: 9px;
>+  background-repeat: no-repeat;
>+  background-position: center;
>+  -moz-margin-start: 1px;
>+  -moz-margin-end: 3px;
>+  background-image: url("chrome://global/skin/tree/twisty-open.png");
>+}
>+
>+groupbox.collapsable[closed="true"] {
>+  border: none;
>+}
>+
>+groupbox.collapsable[closed="true"] caption .caption-icon { 
>+  background-image: url("chrome://global/skin/tree/twisty-clsd.png");
>+}
>+
>+groupbox tree { 
>+  margin: 0;
>+  border: none;
>+}
>+
>+groupbox.treebox .groupbox-body { 
>+  padding-top: 0;
>+}
Eww. Ditch collapsAble groupboxes completely?

>+#securityBox description { 
>+  -moz-margin-start: 10px;
>+}
Child selectors? Or maybe <description class="indent">?

>+#general-security-identity {
>+  white-space: -moz-pre-wrap;
>+  line-height: 2em;
>+}
We can't do this using two <description> elements?

>+#feedtree {
>+  margin-bottom: 0px;
>+}
Which tree is this?

>+#feedListbox richlistitem {
>+  padding-top: 6px;
>+  padding-bottom: 6px;
>+  -moz-padding-start: 7px;
>+  -moz-padding-end: 7px;
padding: 6px 7px;

>+  border-bottom: 1px dotted #C0C0C0;
Classic does not hardcode colours.

>+#feedListbox richlistitem[selected="true"] {
>+  background-color: -moz-Dialog;
>+  color: -moz-DialogText;
>+}
Isn't this in richlistbox.css?

>+#permList > vbox:hover {
>+  background-color: -moz-dialog;
>+}
Hover looks weird. But I wouldn't mind if you switched to a richlistbox.

>+/* Security Tab */
>+#securityPanel .caption-icon {
>+  display: none;
>+}
>+
>+#securityPanel .header {
>+  font-size: 120%;
>+}
>+ 
>+#securityPanel .fieldLabel {
>+  margin: 2px 10px 3px 10px;
>+}
>+
>+#securityPanel .fieldValue {
>+  font-weight: bold;
>+  margin: 2px 10px 0px 10px;
>+}
More descendent selectors...

>+textbox {
>   background: transparent !important;
>   border: none;
>   padding: 0px;
>+  margin-top: 1px;
>+  -moz-appearance: none;
textbox is already -moz-appearance: none; in Modern.

> textbox.header {
>-  margin-left: 0;
>+  -moz-margin-start: 0;
> }
Modern has almost no rtl support...

>+textbox[disabled] {
>+  font-style: italic;
>+}
Still using these? I thought you went in for hiding them now.
(Not that I actually like the effect, especially on the media tab.)

>+treechildren::-moz-tree-cell-text(broken) {
>+  font-style: italic;
>+  color: graytext;
> }
#999999 (I assume this is on a white background)

>+#feedListbox richlistitem {
>+  padding-top: 6px;
>+  padding-bottom: 6px;
>+  -moz-padding-start: 7px;
>+  -moz-padding-end: 7px;
>+  min-height: 25px;
>+  border-bottom: 1px dotted #C0C0C0;
>+}
#C0C0C0 is not a typical Modern colour. Try #C7D0D9.

>+#feedListbox richlistitem[selected="true"] {
>+  background-color: -moz-Dialog;
>+  color: -moz-DialogText;
>+}
And these are definitely not Modern colours.

>+  -moz-padding-start: 7px;
>+  -moz-padding-end: 7px;
See above.

>+  background-color: -moz-dialog;
Etc.

>+/* Security Tab */
Etc.

>+*  content/navigator/pageinfo/feeds.js                              (pageinfo/feeds.js)
>+*  content/navigator/pageinfo/feeds.xml                             (pageinfo/feeds.xml)
>+   content/navigator/pageinfo/pageInfo.css                          (pageinfo/pageInfo.css)
>+*  content/navigator/pageinfo/pageInfo.js                           (pageinfo/pageInfo.js)
>+*  content/navigator/pageinfo/pageInfo.xul                          (pageinfo/pageInfo.xul)
>+*  content/navigator/pageinfo/permissions.js                        (pageinfo/permissions.js)
>+*  content/navigator/pageinfo/security.js                           (pageinfo/security.js)
Try to avoid the *s. Use real comments for a start.

>+richlistitem[feed]:not([selected="true"]) .feed-subscribe {
>+  display: none;
>+}
Etc.

>+groupbox[closed="true"] > .groupbox-body { 
>+  visibility: collapse;
>+}
See above.

>+#ifdef XP_MACOSX
>+<?xul-overlay href="chrome://navigator/content/macBrowserOverlay.xul"?>
>+#endif
We don't have this.

>+#ifdef XP_MACOSX
>+    <key key="."                 modifiers="meta"  command="cmd_close"/>
>+#endif
Just leave the key in for all platforms.

>+      <tab id="feedTab"     label="&feedTab;"     accesskey="&feedTab.accesskey;"
>+           oncommand="showTab('feed');" hidden="true"/>
Unfortunately tabs don't take to being hidden and shown.
Can you try disabling them instead?

>+#ifdef XP_MACOSX
>+#include ../browserMountPoints.inc
>+#endif
Etc.

>+function realmHasPasswords(location) {
>+  if (!location) 
>+    return false;
>+  
>+  try {
>+    var passwordManager = Components.classes["@mozilla.org/login-manager;1"]
>+                                    .getService(Components.interfaces.nsILoginManager);
I hope we get to switch to login manager soon :-)

>+<!ENTITY  securityView.privacy.history                  "Have I visited this website before today?">
Where does this get used (or couldn't you port it?)
Comment 6 Daniel Brooks [:db48x] 2007-08-06 08:54:23 PDT
(In reply to comment #5)
> (From update of attachment 275423 [details] [diff] [review])
> >- * The Initial Developer of the Original Code is Daniel Brooks.
> Isn't it?

Isn't it what? I am the original developer for some of these files.

> 
> >+textbox {
> >   background: transparent !important;
> >   border: none;
> >   padding: 0px;
> >+  margin-top: 1px;
> >   -moz-appearance: none;
> > }
> Why the margin change? [Why not use textbox class="plain"?]

It was necessary at the time, but I don't know if it's still needed. At the time this particular rule was created, there was no class="plain" for textboxes.

> 
> > textbox.header {
> >-  margin-left: 0;
> >+  -moz-margin-start: 0;
> > }
> You don't have to change this yet if you don't want to ;-)
> 
> >+/* General Tab */
> >+groupbox.collapsable caption .caption-icon { 
> >+  width: 9px;
> >+  height: 9px;
> >+  background-repeat: no-repeat;
> >+  background-position: center;
> >+  -moz-margin-start: 1px;
> >+  -moz-margin-end: 3px;
> >+  background-image: url("chrome://global/skin/tree/twisty-open.png");
> >+}
> >+
> >+groupbox.collapsable[closed="true"] {
> >+  border: none;
> >+}
> >+
> >+groupbox.collapsable[closed="true"] caption .caption-icon { 
> >+  background-image: url("chrome://global/skin/tree/twisty-clsd.png");
> >+}
> >+
> >+groupbox tree { 
> >+  margin: 0;
> >+  border: none;
> >+}
> >+
> >+groupbox.treebox .groupbox-body { 
> >+  padding-top: 0;
> >+}
> Eww. Ditch collapsAble groupboxes completely?

sure.

> 
> >+#securityBox description { 
> >+  -moz-margin-start: 10px;
> >+}
> Child selectors? Or maybe <description class="indent">?

I like class="indent", personally.

> 
> >+#general-security-identity {
> >+  white-space: -moz-pre-wrap;
> >+  line-height: 2em;
> >+}
> We can't do this using two <description> elements?

dunno, I'll look in to it.

> 
> >+#feedtree {
> >+  margin-bottom: 0px;
> >+}
> Which tree is this?

the one that used to be in the feeds tab, presumably

> 
> >+#feedListbox richlistitem {
> >+  padding-top: 6px;
> >+  padding-bottom: 6px;
> >+  -moz-padding-start: 7px;
> >+  -moz-padding-end: 7px;
> padding: 6px 7px;
> 
> >+  border-bottom: 1px dotted #C0C0C0;
> Classic does not hardcode colours.

yea, what should I replace it with?

> 
> >+#feedListbox richlistitem[selected="true"] {
> >+  background-color: -moz-Dialog;
> >+  color: -moz-DialogText;
> >+}
> Isn't this in richlistbox.css?

yup

> 
> >+#permList > vbox:hover {
> >+  background-color: -moz-dialog;
> >+}
> Hover looks weird. But I wouldn't mind if you switched to a richlistbox.

eh. that's a lot of work.

> 
> >+/* Security Tab */
> >+#securityPanel .caption-icon {
> >+  display: none;
> >+}
> >+
> >+#securityPanel .header {
> >+  font-size: 120%;
> >+}
> >+ 
> >+#securityPanel .fieldLabel {
> >+  margin: 2px 10px 3px 10px;
> >+}
> >+
> >+#securityPanel .fieldValue {
> >+  font-weight: bold;
> >+  margin: 2px 10px 0px 10px;
> >+}
> More descendent selectors...

done.

> 
> >+textbox {
> >   background: transparent !important;
> >   border: none;
> >   padding: 0px;
> >+  margin-top: 1px;
> >+  -moz-appearance: none;
> textbox is already -moz-appearance: none; in Modern.

removed

> 
> > textbox.header {
> >-  margin-left: 0;
> >+  -moz-margin-start: 0;
> > }
> Modern has almost no rtl support...
> 
> >+textbox[disabled] {
> >+  font-style: italic;
> >+}
> Still using these? I thought you went in for hiding them now.
> (Not that I actually like the effect, especially on the media tab.)

I'm going to make it go back to disabled instead of hidden.

> 
> >+treechildren::-moz-tree-cell-text(broken) {
> >+  font-style: italic;
> >+  color: graytext;
> > }
> #999999 (I assume this is on a white background)

yea

> 
> >+#feedListbox richlistitem {
> >+  padding-top: 6px;
> >+  padding-bottom: 6px;
> >+  -moz-padding-start: 7px;
> >+  -moz-padding-end: 7px;
> >+  min-height: 25px;
> >+  border-bottom: 1px dotted #C0C0C0;
> >+}
> #C0C0C0 is not a typical Modern colour. Try #C7D0D9.

done

> 
> >+#feedListbox richlistitem[selected="true"] {
> >+  background-color: -moz-Dialog;
> >+  color: -moz-DialogText;
> >+}
> And these are definitely not Modern colours.

removed as above

> 
> >+  -moz-padding-start: 7px;
> >+  -moz-padding-end: 7px;
> See above.
> 
> >+  background-color: -moz-dialog;
> Etc.
> 
> >+/* Security Tab */
> Etc.
> 

done, done and done.

> >+*  content/navigator/pageinfo/feeds.js                              (pageinfo/feeds.js)
> >+*  content/navigator/pageinfo/feeds.xml                             (pageinfo/feeds.xml)
> >+   content/navigator/pageinfo/pageInfo.css                          (pageinfo/pageInfo.css)
> >+*  content/navigator/pageinfo/pageInfo.js                           (pageinfo/pageInfo.js)
> >+*  content/navigator/pageinfo/pageInfo.xul                          (pageinfo/pageInfo.xul)
> >+*  content/navigator/pageinfo/permissions.js                        (pageinfo/permissions.js)
> >+*  content/navigator/pageinfo/security.js                           (pageinfo/security.js)
> Try to avoid the *s. Use real comments for a start.

I'll see what I can do.

> 
> >+richlistitem[feed]:not([selected="true"]) .feed-subscribe {
> >+  display: none;
> >+}
> Etc.
> 
> >+groupbox[closed="true"] > .groupbox-body { 
> >+  visibility: collapse;
> >+}
> See above.

done

> 
> >+#ifdef XP_MACOSX
> >+<?xul-overlay href="chrome://navigator/content/macBrowserOverlay.xul"?>
> >+#endif
> We don't have this.
> 

removed

> >+#ifdef XP_MACOSX
> >+    <key key="."                 modifiers="meta"  command="cmd_close"/>
> >+#endif
> Just leave the key in for all platforms.

left in

> 
> >+      <tab id="feedTab"     label="&feedTab;"     accesskey="&feedTab.accesskey;"
> >+           oncommand="showTab('feed');" hidden="true"/>
> Unfortunately tabs don't take to being hidden and shown.
> Can you try disabling them instead?

hmm, I'll see what that looks like.

> 
> >+#ifdef XP_MACOSX
> >+#include ../browserMountPoints.inc
> >+#endif
> Etc.
> 

removed

> >+function realmHasPasswords(location) {
> >+  if (!location) 
> >+    return false;
> >+  
> >+  try {
> >+    var passwordManager = Components.classes["@mozilla.org/login-manager;1"]
> >+                                    .getService(Components.interfaces.nsILoginManager);
> I hope we get to switch to login manager soon :-)
> 
> >+<!ENTITY  securityView.privacy.history                  "Have I visited this website before today?">
> Where does this get used (or couldn't you port it?)

I had removed it, but on discussing it with KaiRo, I've added it back but ifdef'd it out. It relies on the places history backend for it's information, but he hopes to have that checked in for Seamonkey soon.

Comment 7 Daniel Brooks [:db48x] 2007-08-06 09:05:15 PDT
Created attachment 275441 [details] [diff] [review]
379183-3.diff
Comment 8 neil@parkwaycc.co.uk 2007-08-06 14:07:24 PDT
(In reply to comment #6)
>(In reply to comment #5)
>>(From update of attachment 275423 [details] [diff] [review])
>>>- * The Initial Developer of the Original Code is Daniel Brooks.
>>Isn't it?
>Isn't it what? I am the original developer for some of these files.
Then why the -?

>>>+textbox {
>>>   background: transparent !important;
>>>   border: none;
>>>   padding: 0px;
>>>+  margin-top: 1px;
>>>   -moz-appearance: none;
>>> }
>>Why the margin change? [Why not use textbox class="plain"?]
>It was necessary at the time, but I don't know if it's still needed.
Well please consider removing it.

>>>+  border-bottom: 1px dotted #C0C0C0;
>>Classic does not hardcode colours.
>yea, what should I replace it with?
ThreeDFace (sorry I looked it up for Modern but forgot to check Classic)

>>>+#permList > vbox:hover {
>>>+  background-color: -moz-dialog;
>>>+}
>>Hover looks weird. But I wouldn't mind if you switched to a richlistbox.
>eh. that's a lot of work.
Then just get rid of the hover please.

>>>+<!ENTITY  securityView.privacy.history                  "Have I visited this website before today?">
>>Where does this get used (or couldn't you port it?)
>I had removed it, but on discussing it with KaiRo, I've added it back but
>ifdef'd it out.
What's wrong with commenting it out?
Comment 9 neil@parkwaycc.co.uk 2007-08-07 02:27:35 PDT
Comment on attachment 275441 [details] [diff] [review]
379183-3.diff

I notice that you keep requesting review from the wind - if you want a different reviewer you could do worse than IanN.

In addition to comment #8:

You removed the -moz-appearance: none; from the Classic pageInfo.css and not Modern when in fact you should have removed it from Modern, not Classic.

The caption-icon class is not used and its styles can be removed.

The feedListbox richlistitem is still a descendant selector, and the padding isn't specified using shorthand.

You could retrive the general visit count from xpfe history if you feel like poking around in RDF ;-) but you omitted the definition of previousVisitCount.

I understand why you #ifdef MOZ_PLACES and not commented it.

Although you're showing all of the media textboxes you're not indicating those that have been left blank so you're still not making use of the disabled rule.

You're still showing hidden tabs. As an alternative to my previous suggestion of disabling unused tabs you should be fine if you start off with all tabs showing and hide the ones you don't want.
Comment 10 Robert Kaiser (not working on stability any more) 2007-08-07 06:15:51 PDT
H,, does this remove the link tab completely? I recently read a comments of someone who uses it a lot, and it's probably useful to web developers, etc. - see http://home.kairo.at/blog/2007-08/weekly_status_report_w31_2007#comments
I understand why Firefox doesn't want it, I think we might still want to keep it.
Comment 11 Daniel Brooks [:db48x] 2007-08-07 07:00:21 PDT
(In reply to comment #9)
> (From update of attachment 275441 [details] [diff] [review])
> I notice that you keep requesting review from the wind - if you want a
> different reviewer you could do worse than IanN.

Yea, dunno why that happened. Also, I don't know why I requested any reviews at all on that last patch, I had intended it only as a work-in-progress. Sorry to bother you with an extra review request, though you did catch some stuff I hadn't noticed.

> 
> In addition to comment #8:
> 
> You removed the -moz-appearance: none; from the Classic pageInfo.css and not
> Modern when in fact you should have removed it from Modern, not Classic.

oops :)

> 
> The caption-icon class is not used and its styles can be removed.

cool

> 
> The feedListbox richlistitem is still a descendant selector, and the padding
> isn't specified using shorthand.
> 
> You could retrive the general visit count from xpfe history if you feel like
> poking around in RDF ;-) but you omitted the definition of previousVisitCount.

eww, no thanks.

> 
> I understand why you #ifdef MOZ_PLACES and not commented it.
> 
> Although you're showing all of the media textboxes you're not indicating those
> that have been left blank so you're still not making use of the disabled rule.

Yea, I left off for the day just on the point of looking up what the previous sm pageinfo used as it's text in that case.

> 
> You're still showing hidden tabs. As an alternative to my previous suggestion
> of disabling unused tabs you should be fine if you start off with all tabs
> showing and hide the ones you don't want.
> 

Yea, I'd prefer to have all of the tabs available all the time. I tried disabling them to see what it's like, but decided against it.
Comment 12 Daniel Brooks [:db48x] 2007-08-07 07:01:55 PDT
(In reply to comment #10)
> H,, does this remove the link tab completely? I recently read a comments of
> someone who uses it a lot, and it's probably useful to web developers, etc. -
> see http://home.kairo.at/blog/2007-08/weekly_status_report_w31_2007#comments
> I understand why Firefox doesn't want it, I think we might still want to keep
> it.
> 

Yes, I'm planning on adding them back in.
Comment 13 Caio Tiago Oliveira (asrail) 2007-08-07 18:48:19 PDT
Oh... adding "Open links in new tab" and "Save as.." or "Save all..." on the links tab would be sooo nice.

Comment 14 Daniel Brooks [:db48x] 2007-08-08 04:53:20 PDT
Created attachment 275762 [details] [diff] [review]
379183-4.diff

now I think it's ready for prime time.
Comment 15 Robert Kaiser (not working on stability any more) 2007-08-08 09:35:42 PDT
Comment on attachment 275762 [details] [diff] [review]
379183-4.diff

>Index: suite/browser/pageinfo/feeds.js
>===================================================================
>+function onSubscribeFeed()
>+{
>+  var listbox = document.getElementById("feedListbox");
>+  openUILink(listbox.selectedItem.getAttribute("feedURL"),
>+             null, false, true, false, null);
>+}

We probably want to use the general openURL function there that bug 384139 should make available...
Comment 16 Philip Chee 2007-08-08 10:24:33 PDT
>>+  openUILink(listbox.selectedItem.getAttribute("feedURL"),
>>+             null, false, true, false, null);
>>+}
>
>We probably want to use the general openURL function there that bug 384139
>should make available...

Did Asrail's patch get checked in? I don't see openUILink in the latest SuiteRunner builds.
Comment 17 Daniel Brooks [:db48x] 2007-08-08 10:39:54 PDT
Created attachment 275807 [details] [diff] [review]
379183-5.diff
Comment 18 Robert Kaiser (not working on stability any more) 2007-08-08 11:56:39 PDT
Comment on attachment 275807 [details] [diff] [review]
379183-5.diff

>Index: suite/browser/pageinfo/pageInfo.xul
>===================================================================
>+    <tabs>
>+      <tab id="generalTab"  label="&generalTab;"  accesskey="&generalTab.accesskey;"
>+           oncommand="showTab('general');"/>
>+      <tab id="mediaTab"    label="&mediaTab;"    accesskey="&mediaTab.accesskey;"
>+           oncommand="showTab('media'); ensureSelection(gImageView)"/>
>+      <tab id="feedTab"     label="&feedTab;"     accesskey="&feedTab.accesskey;"
>+           oncommand="showTab('feed');"/>
>+      <tab id="permTab"     label="&permTab;"     accesskey="&permTab.accesskey;"
>+           oncommand="showTab('perm');"/>
>+      <tab id="formsTab"    label="&formsTab;"    accesskey="&formsTab.accesskey;"
>+           oncommand="ensureSelection(gFormView)"/>
>+      <tab id="linksTab"    label="&linksTab;"    accesskey="&linksTab.accesskey;"
>+           oncommand="ensureSelection(gLinkView)"/>
>+      <tab id="securityTab" label="&securityTab;" accesskey="&securityTab.accesskey;"
>+           oncommand="showTab('security');"/>
>+      <!-- Others added by overlay -->
>+    </tabs>

I can't find the definition of showTab()...
Comment 19 Robert Kaiser (not working on stability any more) 2007-08-10 05:15:39 PDT
Oh, and regarding comment #15, the openURL() function is now available from the global contentAreaUtils.js, which you already include anyways, so that might be a good idea to use.
Comment 20 Robert Kaiser (not working on stability any more) 2007-08-10 05:21:21 PDT
Comment on attachment 275807 [details] [diff] [review]
379183-5.diff

>Index: suite/locales/en-US/chrome/browser/pageInfo.dtd
>===================================================================
>-<!ENTITY  pageInfoWindow.width  "425">
>-<!ENTITY  pageInfoWindow.height "470">
>+<!ENTITY  pageInfoWindow.dimensions  "width: 100ch; height: 30em;">

This looks good, but I think adding a L10n note that tells the localizers to only adapt the values and not translate the words "width" and "height" here would make sense (yes, we repeatedly have such cases).
Comment 21 neil@parkwaycc.co.uk 2007-08-10 07:14:21 PDT
(In reply to comment #18)
>I can't find the definition of showTab()...
In fact it shouldn't be necessary, as the tabs are in a tabbox.
Comment 22 neil@parkwaycc.co.uk 2007-08-12 13:43:52 PDT
Some issues noted while trying out the latest patch:

1. Except for the Media tree, the other trees should only be single selection, in particular the Forms tree, where it makes no sense to be multiple.

2. When switching forms, the form elements tree row count changes unexpectedly.

3. The text "This web site provides a certificate to verify its identity." has a spurious accesskey.
Comment 23 neil@parkwaycc.co.uk 2007-08-12 14:17:47 PDT
Comment on attachment 275807 [details] [diff] [review]
379183-5.diff

>+  var feedListbox = document.getElementById("feedListbox");
>+}
Very useful...

>+function onSubscribeFeed()
>+{
>+  var listbox = document.getElementById("feedListbox");
>+  openUILink(listbox.selectedItem.getAttribute("feedURL"),
>+             null, false, true, false, null);
>+}
This is unlikely to work, whatever the definition of openUILink...

>+  set rowCount(c) { throw "rowCount is a readonly property"; },
Simply omitting the setter has a similar effect...

>+    return this.data[row][column.index] || "";
I see the original code had the || "", but you can remove it unless you have some JS callers that expect empty strings (PaintTreeCell doesn't care).

>+    this.rows = this.data.push(row);
>+    this.rowCountChanged(this.rows - 1, 1);
push returns the new length? Neat.

>+    if (this.tree)
>+      this.tree.rowCountChanged(0, -this.rows);
>+    this.rows = 0;
>+    this.data = [ ];
You need to clear rows before calling rowCountChanged (you could pass -this.data.length instead). Nit: No space inside [];

>+    return (row < 0 || this.copycol < 0) ? "" : (this.data[row][this.copycol] || "");
|| "" again?

>+  getParentIndex: function(index) { return 0; },
Nit: -1 (0 is certainly not its own parent!)

>+    props.AppendElement(aserv.getAtom("broken"));
Why not cache the atom at startup?

>+function doHelpButton()
I see no help button...

>+  var deck  = document.getElementById("mainDeck");
>+  var helpdoc = helpTopics[deck.selectedPanel.id] || "pageinfo_general";
This is wrong for a tabbox...

>+  openHelp(helpdoc, 'chrome://browser/locale/help/help.rdf');
Wrong help file... and file a bug on updating suite help!

>+function toggleGroupbox(id)
Obsolete.

>+function ensureSelection(view)
I don't see this having any effect.

>+  if (!gFormView.rowCount) return;
>+
>+  if (gFormView.selection.count == 1)
This implies !gFormView.rowCount so you're wasting a test.

>+  window.open(url, "_blank", "chrome");
Should use openNewWindowWith (or some similar method).

After reaching the copy code I now see why you allow multiple selections, but you need to come up with something that works with the forms tree.
Comment 24 Daniel Brooks [:db48x] 2007-08-28 20:16:03 PDT
Created attachment 278707 [details] [diff] [review]
379183-6.diff

(In reply to comment #21)
> (In reply to comment #18)
> >I can't find the definition of showTab()...
> In fact it shouldn't be necessary, as the tabs are in a tabbox.
> 

Yea, I removed the function, but not the callers that were in the xul file. oops.


(In reply to comment #22)
> 2. When switching forms, the form elements tree row count changes unexpectedly.

Hmm, it had this problem before, but it was supposed to be fixed.

> 
> 3. The text "This web site provides a certificate to verify its identity." has
> a spurious accesskey.

I can't decide whether that's a feature or a bug…

            <label id="security-view-text" class="fieldLabel"
                   control="security-view-cert" flex="1"/>
            <button id="security-view-cert" label="&securityView.certView;"
                    accesskey="&securityView.accesskey;"
                    oncommand="security.viewCert();"/>

The label has a control property, and the button it refers to has the access key; the access key is used on both.


(In reply to comment #23)
> (From update of attachment 275807 [details] [diff] [review])
> >+  var feedListbox = document.getElementById("feedListbox");
> >+}
> Very useful...
> 

heh

> >+function onSubscribeFeed()
> >+{
> >+  var listbox = document.getElementById("feedListbox");
> >+  openUILink(listbox.selectedItem.getAttribute("feedURL"),
> >+             null, false, true, false, null);
> >+}
> This is unlikely to work, whatever the definition of openUILink...

I know, but the subscribe button is hidden, so the code can't be called. I'll comment it out like the button.

> >+    this.rows = this.data.push(row);
> >+    this.rowCountChanged(this.rows - 1, 1);
> push returns the new length? Neat.

yea, that is neat.

> >+    if (this.tree)
> >+      this.tree.rowCountChanged(0, -this.rows);
> >+    this.rows = 0;
> >+    this.data = [ ];
> You need to clear rows before calling rowCountChanged (you could pass
> -this.data.length instead). Nit: No space inside [];

Hmm, that might be what's causing the unexpected row count change.

> >+  getParentIndex: function(index) { return 0; },
> Nit: -1 (0 is certainly not its own parent!)

heh.

> >+    props.AppendElement(aserv.getAtom("broken"));
> Why not cache the atom at startup?

cached

> >+function doHelpButton()
> I see no help button...

removed

> >+function toggleGroupbox(id)
> Obsolete.

removed

> >+function ensureSelection(view)
> I don't see this having any effect.

It selects the first item in the list, unless something is already selected or there's nothing in the list. This is called when you switch tabs, so the first time you see each tab, something is selected. (The image tab looks best that way, for example).

> 
> >+  if (!gFormView.rowCount) return;
> >+
> >+  if (gFormView.selection.count == 1)
> This implies !gFormView.rowCount so you're wasting a test.

true, removed the first test.

> 
> >+  window.open(url, "_blank", "chrome");
> Should use openNewWindowWith (or some similar method).

done

> After reaching the copy code I now see why you allow multiple selections, but
> you need to come up with something that works with the forms tree.

Hmm, it seems to work just fine for me. How would you prefer it work for the forms tree?
Comment 25 Daniel Brooks [:db48x] 2007-08-28 20:18:47 PDT
Created attachment 278708 [details] [diff] [review]
379183-6b.diff

Oops. This is the same patch, but this time I didn't forget the -N flag.
Comment 26 neil@parkwaycc.co.uk 2007-08-29 02:56:54 PDT
(In reply to comment #24)
>The label has a control property, and the button it refers to has the access
>key; the access key is used on both.
I strongly suspect that buttons don't need controlling labels, as they already have their own text. Please remove it unless aaronlev says otherwise.

>>After reaching the copy code I now see why you allow multiple selections, but
>>you need to come up with something that works with the forms tree.
>Hmm, it seems to work just fine for me. How would you prefer it work for the
>forms tree?
Well, I'd like it do something useful when you press Ctrl+A, and not just leave stale data in the bottom view - the Media tab gets this right ;-)
Comment 27 Florian Quèze [:florian] [:flo] 2007-08-29 03:35:18 PDT
For the next versions of the patch, you may want to take the change suggested by bug 393986.
Comment 28 neil@parkwaycc.co.uk 2007-08-29 07:21:57 PDT
Comment on attachment 278708 [details] [diff] [review]
379183-6b.diff

>+MOZ_PLACES=1
Oops ;-)

>+*  content/navigator/pageinfo/feeds.js                              (pageinfo/feeds.js)
>+*  content/navigator/pageinfo/feeds.xml                             (pageinfo/feeds.xml)
>+   content/navigator/pageinfo/pageInfo.css                          (pageinfo/pageInfo.css)
>+*  content/navigator/pageinfo/pageInfo.js                           (pageinfo/pageInfo.js)
>+*  content/navigator/pageinfo/pageInfo.xul                          (pageinfo/pageInfo.xul)
>+*  content/navigator/pageinfo/permissions.js                        (pageinfo/permissions.js)
>+*  content/navigator/pageinfo/security.js                           (pageinfo/security.js)
Only pageInfo.xul and security.js use #ifdef, right?

>+# -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
Sigh. Just stick to JS comments throughout, please?

>+<?xml version="1.0"?>
>+# ***** BEGIN LICENSE BLOCK *****
And xml comments please :-P

>+      <tab id="mediaTab"    label="&mediaTab;"    accesskey="&mediaTab.accesskey;"
>+           oncommand="ensureSelection(gImageView)"/>
oncommand doesn't work with Ctrl+Tab...

>+                <label id="security-identity-verifier-label"
>+                       class="fieldLabel"
>+                       value="&securityView.identity.verifier;"
>+                       control="security-identity-verifier-value"/>
So, after all that, aaronlev said to use description.
Comment 29 Robert Kaiser (not working on stability any more) 2007-09-12 07:57:43 PDT
Comment on attachment 278708 [details] [diff] [review]
379183-6b.diff

>Index: suite/locales/en-US/chrome/browser/pageInfo.properties
>===================================================================
>@@ -69,18 +83,13 @@
> linkStylesheet=Stylesheet
> linkRev=Reverse Link
> linkX=Simple XLink
>+yes=Yes

Please don't add this one. You are already adding a "yes" property to the same file above, doubled properties are useless ;-)
Comment 30 Daniel Brooks [:db48x] 2007-09-12 08:49:32 PDT
Created attachment 280608 [details] [diff] [review]
379183-7.diff

Ok, this should be perfect, though I suppose it's possible that I forgot something along the way. Doesn't look like it though. I've fixed everything in comment 28, and removed the duplicate entry mentioned in comment 29.
Comment 31 neil@parkwaycc.co.uk 2007-09-12 13:45:22 PDT
Comment on attachment 280608 [details] [diff] [review]
379183-7.diff

I still don't like the multiselection on the forms tree...

>+            <description id="security-view-text" class="fieldLabel"
>+                         control="security-view-cert" flex="1"/>
This description is correct but the other label changes were wrong.

>Index: themes/classic/navigator/pageInfo.css
>Index: themes/modern/navigator/pageInfo.css
Note: these moved to suite/themes/*/navigator/pageInfo.css

The other thought I had was that perhaps you should ensure the selection once processing is complete, rather than each time you switch tabs.
Comment 32 Daniel Brooks [:db48x] 2007-09-21 06:19:35 PDT
Created attachment 281812 [details] [diff] [review]
379183-8.diff

patch to be checked in
Comment 33 Daniel Brooks [:db48x] 2007-09-21 06:33:10 PDT
checked in
Comment 34 neil@parkwaycc.co.uk 2010-08-01 04:35:22 PDT
(In reply to comment #8)
>(In reply to comment #6)
>>(In reply to comment #5)
>>>(From update of attachment 275423 [details] [diff] [review])
>>>>+  border-bottom: 1px dotted #C0C0C0;
>>>Classic does not hardcode colours.
>>yea, what should I replace it with?
>ThreeDFace (sorry I looked it up for Modern but forgot to check Classic)
This never got done :-(

Note You need to log in before you can comment on or make changes to this bug.