From e558333cd1c2f59a8d310cdc47bfb1a4abcdbb6f Mon Sep 17 00:00:00 2001
From: Loic Bistuer <loic.bistuer@sixmedia.com>
Date: Thu, 27 Sep 2012 00:36:08 +0700
Subject: [PATCH 1/2] Added a test case for relative urls and imports

---
 test-relative-paths/Makefile                  |  12 ++++++++
 test-relative-paths/static/assets/logo.png    | Bin 0 -> 13831 bytes
 test-relative-paths/static/assets/xecret.ttf  | Bin 0 -> 22192 bytes
 test-relative-paths/static/css/background.css |   3 ++
 .../static/less/imports/font.less             |   8 ++++++
 .../static/less/imports/logo.less             |   5 ++++
 test-relative-paths/static/less/main.less     |   4 +++
 test-relative-paths/test-clientside.html      |  26 ++++++++++++++++++
 test-relative-paths/test-serverside.html      |  24 ++++++++++++++++
 9 files changed, 82 insertions(+)
 create mode 100644 test-relative-paths/Makefile
 create mode 100644 test-relative-paths/static/assets/logo.png
 create mode 100755 test-relative-paths/static/assets/xecret.ttf
 create mode 100644 test-relative-paths/static/css/background.css
 create mode 100644 test-relative-paths/static/less/imports/font.less
 create mode 100644 test-relative-paths/static/less/imports/logo.less
 create mode 100644 test-relative-paths/static/less/main.less
 create mode 100644 test-relative-paths/test-clientside.html
 create mode 100644 test-relative-paths/test-serverside.html

diff --git a/test-relative-paths/Makefile b/test-relative-paths/Makefile
new file mode 100644
index 000000000..f71c32339
--- /dev/null
+++ b/test-relative-paths/Makefile
@@ -0,0 +1,12 @@
+all: clean
+	@echo "Building less.js:"
+	make -C .. min
+
+	@echo
+
+	@echo "Building test-relative-paths:"
+	../bin/lessc static/less/main.less static/css/main.css
+
+clean:
+	@echo "Cleaning up test-relative-paths:"
+	rm -f static/css/main.css
diff --git a/test-relative-paths/static/assets/logo.png b/test-relative-paths/static/assets/logo.png
new file mode 100644
index 0000000000000000000000000000000000000000..1a739b3e9903d8c023ade58af038277b60719d5a
GIT binary patch
literal 13831
zcmV+iHu%YjP)<h;3K|Lk000e1NJLTq0074T002=41^@s6W;(K%0000PbVXQnQ*UN;
zcV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m!LF-`XOoL7lDAL`02QkaTELUu6fktlSQtog@rv?>I+G
zf0Jy2G_IljW842wpv69#?G(32G?vloIER#giUkLdw6@tLgW0959NYf40b&LP;JQFU
z8$AN{*NnbOHa3V8p-KsUZs{?Adx-zo_P;GX5&??a=aw7;D~aJmc!}nowAZVXlsE>A
z9~MBYKw<}+_IP!AkCtTiNeP0et@|DW#W9e$0mtpPmhNl$T|%o6x8gUcozHh{`(cBm
zEx)z)e61$N_8{V8KsdIw2Vf4{ISx009s|I!?fU>6%kBRQFaX2w0k7_rQab<u002ov
JPDHLkV1g`~`5XWM

literal 0
HcmV?d00001

diff --git a/test-relative-paths/static/assets/xecret.ttf b/test-relative-paths/static/assets/xecret.ttf
new file mode 100755
index 0000000000000000000000000000000000000000..2ae076fa2d243da873eab5ec0a5e7b1f81b61f41
GIT binary patch
literal 22192
zcmeHP3wT^vUH{*CX79ecFDMIpH~XONPSPgrwn^DXC&{FpHl1WAX?I%@m`rYxX(uzY
zcP2?w1))B0D=HKesG?B7M_H9Eifd7kqApuSq$qq=6s@p81@v1Nm8!e`e&>;yNt1S6
z_&(&LO=s@C=bZb0zs|X5t~ercrMzCkGSuHcvVHdrpMFAQ=iAVF^WgC6&e4xN@?{a{
zAzbgwPvt7_eB}O>BH`c1=NtK%nkRkHYenLZqCYZ`t5%+S4v=K$n{eGSQJfo(-r<jn
zT=v@{*E}=n=f=Lde)|~uK9A4(Ni<ycOe6~U*W>#3$*J1Do1eP!Rk;43NXRXg^SOIN
z$pql@Ix>~pS8+BAa5-HV@0D^>{=06w{8^FZzb3Nb^_6n9cHf~}K!0`x$jJ$L!>4j;
z<8!aR`krsf<t=CsdGZS9k@@3taPm}i2d-Nr#8&*nJ*wsLh`J0vr68$u^A%x><H)_Z
z=U$xiPDhQ}B<<?V!H{PJyhYbW--*tb>0|hFG9Fq6ZX|ZuJis{4EN&SZPmReY5%1C1
z__O2kxS~YS#POi051-}sBg-%SeV<Bz<^W$)pPQBKiStEV(duuOi1P^?m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4SyiyuRf2<YsbU;c}Sfz^zMwlG>cgq_W9@gf~2t>P_<mqDyB}y&w=HA#N~_
zRzN~cF`Rl}2O2QWH7KBiEh$AhXinmPFHM7bz;JL#I3t7Ek$F-cOb@3LUNV~=hIrim
z?BI3)hbnLfmA(Ta1TL7Erk84A8~fA*ecm82ig&wOaDA!d006=+GUt!QO34fPk%lb2
z<}m+$!e=uM-p6QuC#Qajr@tHrjUgxOM4YG-bK*{ma~a-3b-8nebER{YbG37gb1mLU
zb)9p)bAxlEbCdHT=f!wK)k~b4otHW<b8c}w=T`h8Zt*wAeNVhM&S`aSb8dI;aPD+o
z?yPWD;@w+!ISHrDX?IpTYn%?eiEFL1&bixJ?`&|ooNm0A>lMyD&b`ik&i&3NCyBRo
z_2T_xcypZ7hj+t$5$})t65bs5F1(rVeNGB*{5p;I%DvU;cQ(sY&KA5`?&I=hCylqp
z9hDE_&1N4_Zzp?Fo{-<f9*8{NG&hE~jQQ$~X`jNo#y*L6jeQkQ6F!6YjeQ#LKAXT>
z(%ynMm+{SGlX!R9*YT#hJ$T-*7f+*#cw+EwJcD>xJ&EN`o*JGt&f@K2`|!5AIlS-g
zwRq#*<MJN7@$Pl%op*fm+VMEnO4i_?Irf=jhdFkd<63iEXO4H9<9c)4V2)kp*lmtU
zbL=t4UUN*DW4}Ij82lXuZ->F#Veobsyd4H_hr!!n@OBuy9R_cQ!P{Z*b{M=JhQAJj
zzr*0)V2)jejxIw-m!YG}(9vb+=rVM489KTQ9bJZwE<;C`p`**t(Pil9GIVqqI=T%0
zZiBzu;O{p0yAA$sgTLG0?>6|m4gPL}zuVyNHu$>@{%(W6+u-ju_`41M<eEroIw)(U
sB+Z~6Lqv}uqQ@Zb={8{m?<ok``0~WFAN&HFpS=7QyhB#KxAhJG3%_X3+W-In

literal 0
HcmV?d00001

diff --git a/test-relative-paths/static/css/background.css b/test-relative-paths/static/css/background.css
new file mode 100644
index 000000000..30a5da37f
--- /dev/null
+++ b/test-relative-paths/static/css/background.css
@@ -0,0 +1,3 @@
+html {
+	background-color: #82e291;
+}
diff --git a/test-relative-paths/static/less/imports/font.less b/test-relative-paths/static/less/imports/font.less
new file mode 100644
index 000000000..5abb7e769
--- /dev/null
+++ b/test-relative-paths/static/less/imports/font.less
@@ -0,0 +1,8 @@
+@font-face {
+	font-family: xecret;
+	src: url('../assets/xecret.ttf');
+}
+
+#secret {
+	font-family: xecret, sans-serif;
+}
diff --git a/test-relative-paths/static/less/imports/logo.less b/test-relative-paths/static/less/imports/logo.less
new file mode 100644
index 000000000..322919d91
--- /dev/null
+++ b/test-relative-paths/static/less/imports/logo.less
@@ -0,0 +1,5 @@
+#logo {
+	width: 199px;
+	height: 81px;
+	background-image: url('../assets/logo.png');
+}
diff --git a/test-relative-paths/static/less/main.less b/test-relative-paths/static/less/main.less
new file mode 100644
index 000000000..ab0cc3902
--- /dev/null
+++ b/test-relative-paths/static/less/main.less
@@ -0,0 +1,4 @@
+@import "../css/background.css";
+
+@import "imports/logo";
+@import "imports/font";
diff --git a/test-relative-paths/test-clientside.html b/test-relative-paths/test-clientside.html
new file mode 100644
index 000000000..c98f588f6
--- /dev/null
+++ b/test-relative-paths/test-clientside.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+
+<html>
+	<head>
+		<meta charset="utf-8">
+		<title>Test case for relative paths</title>
+		<link rel="stylesheet/less" href="static/less/main.less">
+		<script>var less = { env: 'development' };</script>
+		<script src="../dist/less-1.3.0.js"></script>
+	</head>
+
+	<body>
+		<h1>Client-side test case for relative paths</a></h1>
+
+		<h2>Test 1: imports of .css</h2>
+		<p>Expected result: the background of the page should be green.</p>
+
+		<h2>Test 2: background-image url</h2>
+		<div id="logo"></div>
+		<p>Expected result: the LESS logo should appear above.</p>
+
+		<h2>Test 3: @font-face url</h2>
+		<div id="secret">abcdef</div>
+		<p>Expected result: the text above should be a series of "X".</p>
+	</body>
+</html>
diff --git a/test-relative-paths/test-serverside.html b/test-relative-paths/test-serverside.html
new file mode 100644
index 000000000..9162c4db3
--- /dev/null
+++ b/test-relative-paths/test-serverside.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+
+<html>
+	<head>
+		<meta charset="utf-8">
+		<title>Test case for relative paths</title>
+		<link rel="stylesheet" href="static/css/main.css">
+	</head>
+
+	<body>
+		<h1>Server-side test case for relative paths</a></h1>
+
+		<h2>Test 1: imports of .css</h2>
+		<p>Expected result: the background of the page should be green.</p>
+
+		<h2>Test 2: background-image url</h2>
+		<div id="logo"></div>
+		<p>Expected result: the LESS logo should appear above.</p>
+
+		<h2>Test 3: @font-face url</h2>
+		<div id="secret">abcdef</div>
+		<p>Expected result: the text above should be a series of "X".</p>
+	</body>
+</html>

From 7d8ad26549bd929a790b368ddbd1910f742796c0 Mon Sep 17 00:00:00 2001
From: Loic Bistuer <loic.bistuer@sixmedia.com>
Date: Thu, 27 Sep 2012 00:42:12 +0700
Subject: [PATCH 2/2] Fix the differences between client-side and server-side
 handling of relative urls and imports

---
 lib/less/browser.js     |  4 ++++
 lib/less/parser.js      |  7 ++++---
 lib/less/tree/import.js |  7 ++++++-
 lib/less/tree/url.js    | 10 +++++-----
 4 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/lib/less/browser.js b/lib/less/browser.js
index b7de8be8b..758142e40 100644
--- a/lib/less/browser.js
+++ b/lib/less/browser.js
@@ -133,6 +133,9 @@ function loadStyleSheet(sheet, callback, reload, remaining) {
             href = url.slice(0, url.lastIndexOf('/') + 1) + href;
         }
     }
+
+    var rootpath  = sheet.rootpath || href.replace(/[\w\.-]+$/, '');
+
     xhr(sheet.href, sheet.type, function (data, lastModified) {
         if (!reload && styles && lastModified &&
            (new(Date)(lastModified).valueOf() ===
@@ -149,6 +152,7 @@ function loadStyleSheet(sheet, callback, reload, remaining) {
                     paths: [href.replace(/[\w\.-]+$/, '')],
                     mime: sheet.type,
                     filename: href,
+                    rootpath: rootpath,     // Passing top importing sheet ref down.
                     'contents': contents    // Passing top importing parser content cache ref down.
                 }).parse(data, function (e, root) {
                     if (e) { return error(e, href) }
diff --git a/lib/less/parser.js b/lib/less/parser.js
index 928696903..3a6a532e2 100644
--- a/lib/less/parser.js
+++ b/lib/less/parser.js
@@ -79,6 +79,7 @@ less.Parser = function Parser(env) {
         queue: [],                      // Files which haven't been imported yet
         files: {},                      // Holds the imported parse trees
         contents: env.contents,         // Holds the imported file contents
+        rootpath:  env.rootpath,        // Holds the path of the top importing sheet
         mime:  env && env.mime,         // MIME type of .less files
         error: null,                    // Error in parsing/evaluating an import
         push: function (path, callback) {
@@ -647,7 +648,7 @@ less.Parser = function Parser(env) {
                     expect(')');
 
                     return new(tree.URL)((value.value != null || value instanceof tree.Variable)
-                                        ? value : new(tree.Anonymous)(value), imports.paths);
+                                        ? value : new(tree.Anonymous)(value), env.rootpath);
                 },
 
                 //
@@ -1120,7 +1121,7 @@ less.Parser = function Parser(env) {
                 if (dir && (path = $(this.entities.quoted) || $(this.entities.url))) {
                     features = $(this.mediaFeatures);
                     if ($(';')) {
-                        return new(tree.Import)(path, imports, features, (dir[1] === 'once'), index);
+                        return new(tree.Import)(path, imports, features, (dir[1] === 'once'), index, env.rootpath);
                     }
                 }
                 
@@ -1407,7 +1408,7 @@ if (less.mode === 'browser' || less.mode === 'rhino') {
         // This is so we can get the syntax tree as opposed to just the CSS output,
         // as we need this to evaluate the current stylesheet.
         // __ Now using the hack of passing a ref to top parser's content cache in the 1st arg. __
-        loadStyleSheet({ href: path, title: path, type: env.mime, contents: env.contents }, function (e) {
+        loadStyleSheet({ href: path, title: path, type: env.mime, contents: env.contents, rootpath: env.rootpath }, function (e) {
             if (e && typeof(env.errback) === "function") {
                 env.errback.call(null, path, paths, callback, env);
             } else {
diff --git a/lib/less/tree/import.js b/lib/less/tree/import.js
index 7a977def2..577e07104 100644
--- a/lib/less/tree/import.js
+++ b/lib/less/tree/import.js
@@ -11,13 +11,14 @@
 // `import,push`, we also pass it a callback, which it'll call once
 // the file has been fetched, and parsed.
 //
-tree.Import = function (path, imports, features, once, index) {
+tree.Import = function (path, imports, features, once, index, rootpath) {
     var that = this;
 
     this.once = once;
     this.index = index;
     this._path = path;
     this.features = features && new(tree.Value)(features);
+    this.rootpath = rootpath
 
     // The '.less' extension is optional
     if (path instanceof tree.Quoted) {
@@ -52,6 +53,10 @@ tree.Import.prototype = {
         var features = this.features ? ' ' + this.features.toCSS(env) : '';
 
         if (this.css) {
+            // Add the base path if the import is relative and we are in the browser
+            if (typeof window !== 'undefined' && typeof this._path.value === "string" && !/^(?:[a-z-]+:|\/)/.test(this._path.value)) {
+                this._path.value = this.rootpath + this._path.value;
+            }
             return "@import " + this._path.toCSS() + features + ';\n';
         } else {
             return "";
diff --git a/lib/less/tree/url.js b/lib/less/tree/url.js
index 2bea3c323..7b9a3840a 100644
--- a/lib/less/tree/url.js
+++ b/lib/less/tree/url.js
@@ -1,8 +1,8 @@
 (function (tree) {
 
-tree.URL = function (val, paths) {
+tree.URL = function (val, rootpath) {
     this.value = val;
-    this.paths = paths;
+    this.rootpath = rootpath
 };
 tree.URL.prototype = {
     toCSS: function () {
@@ -12,11 +12,11 @@ tree.URL.prototype = {
         var val = this.value.eval(ctx);
 
         // Add the base path if the URL is relative and we are in the browser
-        if (typeof window !== 'undefined' && typeof val.value === "string" && !/^(?:[a-z-]+:|\/)/.test(val.value) && this.paths.length > 0) {
-            val.value = this.paths[0] + (val.value.charAt(0) === '/' ? val.value.slice(1) : val.value);
+        if (typeof window !== 'undefined' && typeof val.value === "string" && !/^(?:[a-z-]+:|\/)/.test(val.value)) {
+            val.value = this.rootpath + val.value;
         }
 
-        return new(tree.URL)(val, this.paths);
+        return new(tree.URL)(val, this.rootpath);
     }
 };