define(function LiveCSSDocumentModule(require,exports,module){var _=require("thirdparty/lodash"),CSSUtils=require("language/CSSUtils"),EventDispatcher=require("utils/EventDispatcher"),LiveDocument=require("LiveDevelopment/MultiBrowserImpl/documents/LiveDocument"),PathUtils=require("thirdparty/path-utils/path-utils"),LiveCSSDocument=function LiveCSSDocument(protocol,urlResolver,doc,editor,roots){LiveDocument.apply(this,arguments),this.doc.addRef(),this.onChange=this.onChange.bind(this),this.onDeleted=this.onDeleted.bind(this),this.doc.on("change.LiveCSSDocument",this.onChange),this.doc.on("deleted.LiveCSSDocument",this.onDeleted),editor&&this._attachToEditor(editor)};(LiveCSSDocument.prototype=Object.create(LiveDocument.prototype)).constructor=LiveCSSDocument,LiveCSSDocument.prototype.parentClass=LiveDocument.prototype,EventDispatcher.makeEventDispatcher(LiveCSSDocument.prototype),LiveCSSDocument.prototype.close=function(){this.doc.off(".LiveCSSDocument"),this.doc.releaseRef(),this.parentClass.close.call(this)},LiveCSSDocument.prototype._updateBrowser=function(){var i,docUrl=this.doc.url;function makeUrlsRelativeToCss(match,quotationMark,url){var absUrl;return PathUtils.isRelativeUrl(url)?"url("+quotationMark+PathUtils.makeUrlAbsolute(url,docUrl)+quotationMark+")":match}for(i=0;i