Closed Bug 119317 Opened 23 years ago Closed 23 years ago

inherits should be xbl:inherits

Categories

(Core :: XBL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.0

People

(Reporter: sicking, Assigned: sicking)

References

Details

Attachments

(1 file, 4 obsolete files)

This was just a funny idea that struck me, so feel free to mark it invalid if you don't agree: The current "inherits" attribute looks kind of strange to me. It looks like a normal attribute targeted at the element it lives in, but in fact it's a special xbl-attribute targeted at the xbl-engine. This also makes it cumbersome (impossible?) to add an attribute called "inherits" to the generated element. So my suggestion is that the attribute is placed in the xbl-namespace. So <html:input inherits="onfocus"/> becomes <html:input xbl:inherits="onfocus"/> That way it is clear that the attribute has a special meaning related to xbl, and we get no collisions with "inherits" attributes on the element. No syntax changes needed, just add the "xbl:" prefix and add a xmlns:xbl="http://www.mozilla.org/xbl" mapping at the top of the file.
Here goes a patch that uses xbl:inherits and fallbacks to inherits if it doesn't exist. There is some code that unsets the attribute, however it's out-commented. I changed it (but didn't create any fallback code) in case it is uncommented sometime. Once this is in the tree i'll start search-n-replacing in the xbl
oh, btw, i found a "inheritstyle" attribute in the code, but i couldn't find anything in the spec about how it works. Should it be moved to the xbl namespace too?
sr=hyatt
Comment on attachment 65171 [details] [diff] [review] use xbl:inherits and fallbacks to inherits r=jkeiser
Attachment #65171 - Flags: review+
Comment on attachment 65171 [details] [diff] [review] use xbl:inherits and fallbacks to inherits checked in
Attachment #65171 - Attachment is obsolete: true
The patches changes all uses in the tree from inherits to xbl:inherits. It also adds an assertion for uses of plain inherits=".." to speed up the transition. 1.0 is comming awfully fast and i'd like to remove support for the old syntax before then. When appling this patch we start running into assertions since html elements can't handle namespaced attributes. That is bug 41983 which hopefully should be fixed pretty soon. Not sure if we should remove the assertions for now or just hold checking this in until bug 41983 is fixed. (I would rather not wait too long though)
turns out that those assertions were pretty bad, we have to land bug 41983 before all uses can be switched over. If that takes too long i'll make a patch that changes all elements except html ones. Taking the bug since i have the patches
Assignee: hyatt → sicking
Depends on: 41983
this patch changes all inherits to xbl:inherits except for the ones in html-elements. It also doesn't add the assertion. I'd be great if we could land this right away since bug 41983 might take a while before it lands.
Attachment #73128 - Attachment is obsolete: true
Comment on attachment 73310 [details] [diff] [review] replace all inherits except the ones in html-elements r=hixie I especially like the minor whitespace fixups you did at the same time. :-)
Attachment #73310 - Flags: review+
sr=hyatt
Comment on attachment 73310 [details] [diff] [review] replace all inherits except the ones in html-elements a=asa (on behalf of drivers) for checkin to the 1.0 branch
Attachment #73310 - Flags: superreview+
Attachment #73310 - Flags: approval+
Comment on attachment 73310 [details] [diff] [review] replace all inherits except the ones in html-elements checked in on trunk and 1.0-branch
Attachment #73310 - Attachment is obsolete: true
Attached patch final stage (obsolete) — Splinter Review
removes support for old "inherits" syntax and fixes the last few uses
Comment on attachment 81901 [details] [diff] [review] final stage r=hixie
Attachment #81901 - Flags: review+
Are we sure we want to *remove* backwards-compatibility altogether for this (probably commonly-used) syntax for XBL? I bet there are a lot of people out using XBL that this will break.
if we don't remove the old support it will still be problematic (although not impossible) for people wanting to create attributes named "inherits", which was one of the reasons for this bug in the first place. We've done the same for XUL and XBL in the past and announcements has been done in all proper channels. I've even contacted some people personally.
the differences between the trunk and the branch was bigger then I though. This does the same as attachment 81901 [details] [diff] [review] but for checkin to the branch
Comment on attachment 81901 [details] [diff] [review] final stage sr=hyatt
Attachment #81901 - Flags: superreview+
Comment on attachment 81920 [details] [diff] [review] same as above but for the 1.0 branch r=fabian
Attachment #81920 - Flags: review+
Comment on attachment 81901 [details] [diff] [review] final stage checked in on trunk
Attachment #81901 - Attachment is obsolete: true
IMO this is quite important for 1.0 since XBL is a pretty well-used API
Target Milestone: --- → mozilla1.0
Yes, we want this. Hyatt says "hell yes", so his sr= carries over. :-) /be
Blocks: 143200
Comment on attachment 81920 [details] [diff] [review] same as above but for the 1.0 branch sr=hyatt, a=brendan for the 1.0 branch -- someone please check in ASAP and say so here. /be
Attachment #81920 - Flags: superreview+
Attachment #81920 - Flags: approval+
Comment on attachment 81920 [details] [diff] [review] same as above but for the 1.0 branch commited to branch
Keywords: fixed1.0.0
This one should now be fully fixed. Serached all .xml files for [^:]inherits and everything looks ok. (I did this *before* checking in of course :-) )
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: