Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Issue 5825 (Infotip for web fonts defined via data URLs broken)

  • Loading branch information...
commit 8b9379333f7150782ce91fe6f9ae901d40158f66 1 parent 5fc3149
Sebastian Zartner authored August 17, 2012
3  extension/content/firebug/css/computedPanel.js
@@ -670,6 +670,7 @@ CSSComputedPanel.prototype = Obj.extend(Firebug.Panel,
670 670
 
671 671
                         return CSSInfoTip.populateImageInfoTip(infoTip, absURL, repeat);
672 672
                     }
  673
+                    break;
673 674
 
674 675
                 case "fontFamily":
675 676
                     return CSSInfoTip.populateFontFamilyInfoTip(infoTip, cssValue.value);
@@ -678,6 +679,8 @@ CSSComputedPanel.prototype = Obj.extend(Firebug.Panel,
678 679
             delete this.infoTipType;
679 680
             delete this.infoTipValue;
680 681
             delete this.infoTipObject;
  682
+
  683
+            return false;
681 684
         }
682 685
     },
683 686
 
3  extension/content/firebug/css/cssPanel.js
@@ -1303,6 +1303,7 @@ Firebug.CSSStyleSheetPanel.prototype = Obj.extend(Firebug.Panel,
1303 1303
 
1304 1304
                         return CSSInfoTip.populateImageInfoTip(infoTip, absURL, repeat);
1305 1305
                     }
  1306
+                    break;
1306 1307
 
1307 1308
                 case "fontFamily":
1308 1309
                     return CSSInfoTip.populateFontFamilyInfoTip(infoTip, cssValue.value);
@@ -1311,6 +1312,8 @@ Firebug.CSSStyleSheetPanel.prototype = Obj.extend(Firebug.Panel,
1311 1312
             delete this.infoTipType;
1312 1313
             delete this.infoTipValue;
1313 1314
             delete this.infoTipObject;
  1315
+
  1316
+            return false;
1314 1317
         }
1315 1318
     },
1316 1319
 
10  extension/content/firebug/lib/fonts.js
@@ -78,7 +78,7 @@ Fonts.getFontsUsedInContext = function(context)
78 78
  * Retrieves the information about a font
79 79
  * @context: Context of the font
80 80
  * @win: Window the font is used in
81  
- * @identifier: Either a URL in case of a Fonts font or the font name
  81
+ * @identifier: Either a URL in case of a web font or the font name
82 82
  * @return Object with information about the font
83 83
  */
84 84
 Fonts.getFontInfo = function(context, win, identifier)
@@ -94,15 +94,15 @@ Fonts.getFontInfo = function(context, win, identifier)
94 94
     }
95 95
 
96 96
     var fonts = Fonts.getFonts(doc.documentElement);
97  
-    var url = Url.splitURLBase(identifier);
98 97
 
99 98
     if (FBTrace.DBG_FONTS)
100  
-        FBTrace.sysout("Fonts.getFontInfo;", {fonts:fonts, url:url});
  99
+        FBTrace.sysout("Fonts.getFontInfo;", {fonts:fonts, identifier: identifier});
101 100
 
102 101
     for (var i=0; i<fonts.length; i++)
103 102
     {
104  
-        if ((fonts[i].rule && url && identifier == fonts[i].URI) ||
105  
-            identifier == fonts[i].CSSFamilyName || identifier == fonts[i].name)
  103
+        if ((identifier == fonts[i].URI) ||
  104
+            identifier.toLowerCase() == fonts[i].CSSFamilyName.toLowerCase() ||
  105
+            identifier.toLowerCase() == fonts[i].name.toLowerCase())
106 106
         {
107 107
             return fonts[i];
108 108
         }

0 notes on commit 8b93793

Please sign in to comment.
Something went wrong with that request. Please try again.