Closed
Bug 293639
Opened 19 years ago
Closed 19 years ago
[FIXr]xbl relative url issue, image not showing up anymore in this case
Categories
(Core :: XBL, defect, P1)
Core
XBL
Tracking
()
RESOLVED
FIXED
mozilla1.8beta2
People
(Reporter: martijn.martijn, Assigned: bzbarsky)
References
()
Details
(Keywords: regression, testcase)
Attachments
(1 file)
3.67 KB,
patch
|
sicking
:
review+
peterv
:
superreview+
asa
:
approval1.8b2+
|
Details | Diff | Splinter Review |
Not really sure if this is a bug at all, but anyway, this behavior changed, so.. See upcoming testcase. The image in the testcase shows up in a 2005-05-03 build, but not anymore in a 2005-05-04 build. I think this happened because of bug 211128. I use button image="download.ico", which is a relative url in the testcase. But xul buttons are bound: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/toolkit/content/widgets/button.xml&rev=1.8&root=/cvsroot#188 This is the place where the anonymous image gets added.
Reporter | ||
Comment 1•19 years ago
|
||
Oops, I can't attach anything to bugzilla, that would not work, so the testcase is the url.
Assignee | ||
Comment 2•19 years ago
|
||
So we have a problem.... Bug 211128 made the XBL document the base for relative URI resolution in the XBL binding document. But xbl:inherits inherits the exact string value. So in this case, we end up with a <xul:image src="download.ico"> in the XBL, which is then resolved relative to the binding document. Which is somewhere in chrome, of course. I suppose I could back out bug 211128 pending us sorting out how this should behave, but I don't see how this could be made to work in general, really...
We could add some syntax to xbl:inherits that flags an attribute as an uri, then the xbl:inherits code could resolve the uri against the originating elements baseuri and set it as an absolute uri. Of course, it's a non-trivial amount of work to track down all the places where we inherit an uri-attribute.
Comment 4•19 years ago
|
||
Also, theoretically, attributes could contain more than one URI, or contain URIs as part of other things -- for example, a "style" attribute can contain URIs in the shape of the url() syntax.
Assignee | ||
Comment 5•19 years ago
|
||
So unless we have a solution pretty soon (one that would be doable for 1.8), we should probably back out bug 211128.
Blocks: 211128
Flags: blocking1.8b3?
I'm not sure if this would be possible to do in a 1.8 timeframe, we could do something like this: <html:img xbl:inherits="border" xbl:inherits-uri="src"> we would then interpret 'src' as a space separated list of uris (to support attributes containing multiple uris) and set the absolute uri as attribute on the img. This would solve the case where there are multiple uris in an attribute. But it wouldn't take care of the style-example in comment 4. IMHO it would be ok to say that that simply isn't supported and that you'd have to scripting or some other mechanism to get that working (isn't there xbl features to control how styling is applied on the anonymous content?)
Assignee | ||
Comment 7•19 years ago
|
||
> we would then interpret 'src' as a space separated list of uris
That doesn't work if an attribute uses a comma-separated list of URIs or
something... We want this to work for general XML dialects, unfortunately. :(
Yeah, that's what i was going for. I was hoping that most places would use space separation. Ian, got any examples (in specs or specs-to-be) of where multiple uris is used in an attribute. Again, i don't think we can find a 100% solution here, but I don't think we need to either. There will always be cases where you want an attribute on the bound element have an effect on anonymous content but where a simple 'inherits' won't do. So we need to make it easy to react to attribute changes as well.
Assignee | ||
Comment 9•19 years ago
|
||
I'm not going to have time to do anything complicated here in the 1.8 timeframe, basically....
I'd be fine with backing out for now.. "if we've made it so far"
For a possible future implementation of xbl:inherits-uri: In HTML 4 has archive (on object and applet) and profile (on head) contains lists of URIs. Both use whitespace as separator. Comma is a bad separator for URIs since that is a valid char within the URI. rcf2396 appendix E suggests whitespace, angle-brackets <>, or quotes as delimiter for URIs. In that list I think only whitespace is likly to be used in attribute values.
Assignee | ||
Comment 12•19 years ago
|
||
Pre-requesting approval -- this just backs out an earlier patch that needs a little more thought, it seems...
Attachment #183939 -
Flags: superreview?(peterv)
Attachment #183939 -
Flags: review?(bugmail)
Attachment #183939 -
Flags: approval1.8b2?
Assignee | ||
Updated•19 years ago
|
Assignee: general → bzbarsky
OS: Windows 2000 → All
Priority: -- → P1
Hardware: PC → All
Summary: xbl relative url issue, image not showing up anymore in this case → [FIX]xbl relative url issue, image not showing up anymore in this case
Target Milestone: --- → mozilla1.8beta2
Updated•19 years ago
|
Attachment #183939 -
Flags: superreview?(peterv) → superreview+
Attachment #183939 -
Flags: review?(bugmail) → review+
Assignee | ||
Updated•19 years ago
|
Summary: [FIX]xbl relative url issue, image not showing up anymore in this case → [FIXr]xbl relative url issue, image not showing up anymore in this case
Comment 13•19 years ago
|
||
Comment on attachment 183939 [details] [diff] [review] Just back out bug 211128 for now a=asa
Attachment #183939 -
Flags: approval1.8b2? → approval1.8b2+
Assignee | ||
Updated•19 years ago
|
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Flags: blocking1.8b3?
You need to log in
before you can comment on or make changes to this bug.
Description
•