Closed Bug 163505 Opened 24 years ago Closed 21 years ago

marquee stylistic attributes should be handled through attribute mapping

Categories

(Core :: Layout, defect, P4)

defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: dbaron, Assigned: martijn.martijn)

References

Details

(Keywords: testcase)

Attachments

(3 files, 4 obsolete files)

marquee's stylistic attributes should be handled through the attribute mapping code (nsIStyledContent::GetAttributeMappingFunction, etc.) rather than through the current JS hacks. This would fix things such as the second half of bug 163031, which is that the 'width' property on the marquee element doesn't work right, but instead is overridden (or partly so) by the width attribute. It would also make things a lot cleaner and fix a bunch of bugs related to attribute handling. Having said that, I still think it's pretty low priority.
QA Contact: petersen → amar
Target Milestone: --- → Future
Attached file Testcase (obsolete) —
Testcase showing that width does not work when set with css.
Attached file Testcase 2 (obsolete) —
This testcase has width set as an html attribute. Note that the scroll area of the Marquee is 400 px, but that the marquees width seems to be 100%.
Keywords: mozilla1.2
this shows the behaviour of marquee when the width is assigned as an HTML attribute vs. a CSS property
Attachment #96149 - Attachment is obsolete: true
Attachment #96150 - Attachment is obsolete: true
Keywords: mozilla1.2
To doron. Perhaps the XBL should implement nsIStyledContent? Can XBL implement non-IDLified interfaces?
Assignee: attinasi → doron
Keywords: testcase
Blocks: 162980
Attached patch patch (obsolete) — — Splinter Review
Attached file testcase3 —
Attached patch patch2 (obsolete) — — Splinter Review
Boris had a quick look at the previous patch, he had this to say: bz {#developers} mw22: so you want IsAttributeMapped to match GetAttributeMappingFunction bz {#developers} mw22: that is, use a different map there for the different nodeinfos bz {#developers} mw22: other than that, looks fine to me.. He also said to remove gutter and cols stuff.
Attachment #200203 - Attachment is obsolete: true
Attachment #200297 - Flags: superreview?(dbaron)
Attachment #200297 - Flags: review?(doronr)
Comment on attachment 200297 [details] [diff] [review] patch2 I really don't feel comfortable reviewing content code. bz might be a better person.
Attachment #200297 - Flags: review?(doronr)
Comment on attachment 200297 [details] [diff] [review] patch2 Ok, thanks. Asking Boris for review, then.
Attachment #200297 - Flags: review?(bzbarsky)
Comment on attachment 200297 [details] [diff] [review] patch2 >Index: content/html/content/src/nsHTMLDivElement.cpp > nsHTMLDivElement::IsAttributeMapped(const nsIAtom* aAttribute) const > static const MappedAttributeEntry* const map[] = { >- sDivAlignAttributeMap, > sCommonAttributeMap > }; >- > return FindAttributeDependence(aAttribute, map, NS_ARRAY_LENGTH(map)); replace all this with |return nsGenericHTMLElement::IsAttributeMapped(aAttribute)|, please. That will ensure that this is consistent with GetAttributeMappingFunction even if the generic changes. Apart from that, looks great.
Attachment #200297 - Flags: superreview?(dbaron)
Attachment #200297 - Flags: superreview-
Attachment #200297 - Flags: review?(bzbarsky)
Attachment #200297 - Flags: review-
Attached patch patch3 — — Splinter Review
Ok, done that.
Attachment #200297 - Attachment is obsolete: true
Attachment #200557 - Flags: review?(bzbarsky)
Attachment #200557 - Flags: superreview+
Attachment #200557 - Flags: review?(bzbarsky)
Attachment #200557 - Flags: review+
Assignee: doronr → martijn.martijn
Checked in on trunk. Is there a followup bug to remove the JS hacks?
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
I've filed bug 313642 for that.
Blocks: 248877
Blocks: 210729
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: