Permalink
Browse files

Don't complete within url()

Related to issue 5467.
  • Loading branch information...
1 parent b99b800 commit e34d84c81991207897cba5345d361cd894a210e9 @simonlindholm simonlindholm committed May 15, 2012
Showing with 7 additions and 2 deletions.
  1. +1 −1 extension/content/firebug/css/cssModule.js
  2. +6 −1 extension/content/firebug/css/cssPanel.js
@@ -18,7 +18,7 @@ function(Obj, Firebug, Xpcom, Events, Url, Css, Win, Xml) {
const Cc = Components.classes;
const Ci = Components.interfaces;
-const reSplitCSS = /(url\("?[^"\)]+?"?\))|(rgba?\([^)]*\)?)|(hsla?\([^)]*\)?)|(#[\dA-Fa-f]+)|(-?\d+(\.\d+)?(%|[a-z]{1,4})?)|"([^"]*)"?|'([^']*)'?|([^,\s\/!\(\)]+)|(!(.*)?)/;
+const reSplitCSS = /(url\("?[^"\)]+"?\)?)|(rgba?\([^)]*\)?)|(hsla?\([^)]*\)?)|(#[\dA-Fa-f]+)|(-?\d+(\.\d+)?(%|[a-z]{1,4})?)|"([^"]*)"?|'([^']*)'?|([^,\s\/!\(\)]+)|(!(.*)?)/;
const reURL = /url\("?([^"\)]+)?"?\)/;
const reRepeat = /no-repeat|repeat-x|repeat-y|repeat/;
@@ -1709,7 +1709,12 @@ CSSEditor.prototype = domplate(Firebug.InlineEditor.prototype,
var nodeType = Xml.getElementSimpleType(Firebug.getRepObject(this.target));
var keywords;
- if (range.type === "fontFamily")
+ if (range.type === "url")
+ {
+ // We can't complete urls yet.
+ return [];
+ }
+ else if (range.type === "fontFamily")
{
keywords = Css.cssKeywords["fontFamily"].slice();
if (this.panel && this.panel.context)

0 comments on commit e34d84c

Please sign in to comment.