I was taking servo for a spin, my cwd was the servo build dir, and I tried to 
point it to a file on my desktop, like so:

./servo ~/Desktop/css-selectors.html

This results in a blank page because the path generated internally is:

file:/Users/josh/src/mozilla/bdaehlie-servo/build/Users/josh/Desktop/css-selectors.html

This is because the following code runs on the command line input:

    for opts.urls.each |filename| {
        let url = make_url(copy *filename, None);

See the following comment for make_url:

/**
Create a URL object from a string. Does various helpful browsery things like

* If there's no current url and the path looks like a file then it will
  create a file url based of the current working directory
* If there's a current url and the new path is relative then the new url
  is based off the current url

*/

Is there a reason the file path is considered relative by default for servo's 
command line? It's unexpected and there is no indication that the path isn't 
valid, I just get a white rect rendered.

Happy to fix this if the current behavior isn't intentional.
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to