Closed Bug 102895 Opened 23 years ago Closed 23 years ago

Link Toolbar misses LINK elements after a LINK with a period in the REL attribute

Categories

(SeaMonkey :: UI Design, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: kelson, Assigned: choess)

References

Details

(Keywords: testcase)

Attachments

(3 files, 1 obsolete file)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4+)
Gecko/20011003
BuildID:    200100303

If you have a LINK element with a period in it (such as the schema.DC link for
Dublin Core metadata, or the schema.geo link for GeoTags data), any subsequent
LINK elements will not display.  In addition, the following error pops up in the
JavaScript console:

Error: showMiscellaneousSeperator is not defined
Source File: chrome://navigator/content/linkToolbarItem.js
Line: 261

Given that "separator" is misspelled in the "undefined" function, I would guess
that it's just a typo.

Reproducible: Always
Steps to Reproduce:
1. Create an HTML page.
2. Place several LINK elements in the HEAD.
3. Place a LINK element whose REL attribute is in the form "a.b" somewhere in
the middle of the list of LINK elements.

Actual Results:  LINK elements prior to the "a.b" link are accessible in the
toolbar.  LINK elements after the "a.b" link are not.  The "a.b" link shows up
unless its REL attribute starts with "schema." (I think this last bit is
intentional)

Expected Results:  All LINK elements should be accessible through the
toolbar/menus (except possibly schema.xyz links)
cc'ing some toolbar people.  If no one else has taken care of it, I'll take a 
look once I get back to my usual machine.
Keywords: testcase
Hmm.  showMiscellaneousSeperator is indeed the function as defined in 
linktoolbarOverlay.js (the misspelling should be corrected when this bug gets 
fixed), so there's something deeper going on here.
cool new feature!

->claudius, since he tests toolbars.
QA Contact: sairuh → claudius
Reassigning to Eric for the nonce, just so this doesn't get lost.
Assignee: blakeross → drbrain-bugzilla
Blocks: LinkUI
Confirmed.  I'll attach a patch shortly.
Assignee: drbrain-bugzilla → choess
No longer blocks: LinkUI
Status: UNCONFIRMED → NEW
Ever confirmed: true
Yay, patch!  FOR GREAT TOOLBAR.
Keywords: patch, review
Blocks: 103053
Comment on attachment 51996 [details] [diff] [review]
Moves MiscellaneousSeparator functions and fixes spelling

>Index: xpfe/browser/resources/content/linkToolbarItem.js
>===================================================================
>RCS file: /cvsroot/mozilla/xpfe/browser/resources/content/linkToolbarItem.js,v
>retrieving revision 1.1
>diff -u -b -r1.1 linkToolbarItem.js
>--- xpfe/browser/resources/content/linkToolbarItem.js	2001/10/03 05:07:58	1.1
>+++ xpfe/browser/resources/content/linkToolbarItem.js	2001/10/04 02:32:35
>@@ -258,8 +258,21 @@
>     if(!this.__proto__.displayLink.apply(this, [linkElement])) return false;
> 
>     this.getXULElement().removeAttribute("collapsed");
>-    showMiscellaneousSeperator();
>+    showMiscellaneousSeparator();
>     return true;
>   }
> }
>+
>+showMiscellaneousSeparator =
>+function()
>+{
>+  document.getElementById("misc-separator").removeAttribute("collapsed");
>+}
>+
>+hideMiscellaneousSeparator =
>+function()
>+{
>+  document.getElementById("misc-separator").setAttribute("collapsed", "true");
>+}
> LinkToolbarTransientMenu.prototype = new LinkToolbarMenu;
>+
>Index: xpfe/browser/resources/content/linkToolbarOverlay.js
>===================================================================
>RCS file: /cvsroot/mozilla/xpfe/browser/resources/content/linkToolbarOverlay.js,v
>retrieving revision 1.3
>diff -u -b -r1.3 linkToolbarOverlay.js
>--- xpfe/browser/resources/content/linkToolbarOverlay.js	2001/10/03 22:35:54	1.3
>+++ xpfe/browser/resources/content/linkToolbarOverlay.js	2001/10/04 02:32:35
>@@ -142,7 +142,7 @@
> LinkToolbarUI.prototype.doClear =
> function()
> {
>-  this.hideMiscellaneousSeperator();
>+  hideMiscellaneousSeparator();
>   linkToolbarHandler.clearAllItems();
> }
> 
>@@ -184,17 +184,6 @@
>     this.doClear();
> }
> 
>-LinkToolbarUI.prototype.showMiscellaneousSeperator =
>-function()
>-{
>-  document.getElementById("misc-seperator").removeAttribute("collapsed");
>-}
>-
>-LinkToolbarUI.prototype.hideMiscellaneousSeperator =
>-function()
>-{
>-  document.getElementById("misc-seperator").setAttribute("collapsed", "true");
>-}
> LinkToolbarUI.prototype.initLinkbarVisibilityMenu = 
> function()
> {
>@@ -217,3 +206,4 @@
> }
> 
> const linkToolbarUI = new LinkToolbarUI;
>+
>Index: xpfe/browser/resources/content/linkToolbarOverlay.xul
>===================================================================
>RCS file: /cvsroot/mozilla/xpfe/browser/resources/content/linkToolbarOverlay.xul,v
>retrieving revision 1.2
>diff -u -b -r1.2 linkToolbarOverlay.xul
>--- xpfe/browser/resources/content/linkToolbarOverlay.xul	2001/10/03 22:35:55	1.2
>+++ xpfe/browser/resources/content/linkToolbarOverlay.xul	2001/10/04 02:32:37
>@@ -185,7 +185,7 @@
>             <menupopup id="link-alternate-popup" />
>           </menu>
> 
>-          <menuseparator collapsed="true" id="misc-seperator" />
>+          <menuseparator collapsed="true" id="misc-separator" />
> 
>         </menupopup>
>       </toolbarbutton>
The patch looks good, so (assuming I'm allowed to do this) r=sballard@netreach.net

Caveat: I haven't actually tested the patch (choess assures me that it works).
If that's required for giving review, then please disregard my r=.
Comment on attachment 52009 [details] [diff] [review]
Fixed cut-n-paste error.

r=gerv.
Attachment #52009 - Flags: review+
sr=hyatt
*** Bug 102886 has been marked as a duplicate of this bug. ***
Attachment #52058 - Attachment is obsolete: true
Comment on attachment 52009 [details] [diff] [review]
Fixed cut-n-paste error.

(adding hyatt's sr to patch status)

a=asa (on behalf of drivers) for checkin to 0.9.5.
Attachment #52009 - Flags: superreview+
Attachment #52009 - Flags: approval+
Attachment 52009 [details] [diff] checked in.

Gerv
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verified Fixed with new CVS build.
Status: RESOLVED → VERIFIED
Product: Core → Mozilla Application Suite
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: