Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#753 closed defect (fixed)

css-interning doesn't fix paths of background images

Reported by: bill Owned by: James Burke
Priority: high Milestone:
Component: BuildTools Version: 0.3
Keywords: Cc:
Blocked By: Blocking:


Doing abuild with the css-interning flag, the url() paths are not adjusted. TabContainer?'s css has things like url(images/tab.gif), which needs to be changed to something like url(src/widgets/templates/images/tab.gif) before the CSS is added to the document.body.

Since the URL is interpreted relative to the current page (NOT to the location of dojo.js), I think it needs to be adjusted by javascript code. See fixPathsInCssText(). But of course in order to use that code, the build will have to store the original containing directory of the css file.

Interning of HTML files may have a similar problem.

Change History (5)

comment:1 Changed 16 years ago by James Burke

Bill, the interned CSS text is not changed since it won't be possible to guess the right value for URL (depends on dojo.baseScriptUri() which can change from application to application). I left the templateCssPath property in the widget so that the fixPaths thing (or whatever it was that is called in DomWidget?) would be able to properly fix the paths.

I just did a custom build that pulled in ComboBox?, and it seems to show up OK for me. Do you have a specific test case?

There is probably an issue with the HTML interning. I didn't touch that in this last round of changes, but I think it actually replaced the templatePath, instead of just adding the templateString.

comment:2 Changed 16 years ago by bill

Owner: changed from anonymous to mumme

The bug/testcase is actually from Dustin, for the website. (Just doing a custom build for the website.) I haven't looked at the code yet but I think that fixPaths() isn't getting called for builds. (It is called in the non-build case).

Fredrik, can you take a look?

comment:3 Changed 16 years ago by James Burke

Owner: changed from mumme to James Burke

I found the issue with the CSS paths not being correct. I was using the wrong part of dojo.uri in That part is fixed, but I'm keeping the bug open so I can see if the HTML string interning stuff works correctly. I'm going to assign the bug to me, but Fredrik, if you really want it, just assign it back.

comment:4 Changed 16 years ago by James Burke

Resolution: fixed
Status: newclosed

The HTML string interning does not use a fixpaths function like the CSS does, so there shouldn't be any issue with the templatePath/templateString.

comment:5 Changed 15 years ago by (none)

Milestone: 0.3.1

Milestone 0.3.1 deleted

Note: See TracTickets for help on using tickets.