Closed
Bug 239919
Opened 20 years ago
Closed 19 years ago
Marquee DOMAttrModified - should it stay?
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: doronr, Assigned: martijn.martijn)
Details
Attachments
(4 files, 1 obsolete file)
2.78 KB,
text/html
|
Details | |
3.37 KB,
text/html
|
Details | |
16.50 KB,
patch
|
doronr
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
16.57 KB,
patch
|
Details | Diff | Splinter Review |
http://bugzilla.mozilla.org/show_bug.cgi?id=167224 introduced a DOMAttrModified handler, which isn't performant. I'll see if I can hack a way around it, or if we even need it in the end.
Assignee | ||
Comment 1•19 years ago
|
||
Well, it can be removed when you overload the setAttribute method, just like Erik did with his xbl marquee: http://webfx.eae.net/dhtml/xblmarquee/implementation.html (probably, putting all the extra properties/methods - that don't belong in a marquee - in a separate __marquee__ object is a good idea, also). It might very well be that I need to 'steal' some code from him for this (and probably also for other marquee stuff). I've asked him if that's all right, and he agreed. Also the removeAttribute method needs to be overloaded.
Assignee | ||
Comment 2•19 years ago
|
||
Assignee | ||
Comment 3•19 years ago
|
||
Assignee | ||
Comment 4•19 years ago
|
||
Well, I actually didn't go for the approach in comment 1, but I took a kind of a pragmatic approach. I overloaded the setAttribute and removeAttribute methods, but by using other known dom methods (setAttributeNodeNS and removeAttributeNode). So these other dom methods don't work with this patch, but I don't think they are used a lot and certainly in combination with marquees.
Attachment #202052 -
Flags: review?(doronr)
Reporter | ||
Updated•19 years ago
|
Attachment #202052 -
Flags: review?(doronr) → review+
Assignee | ||
Updated•19 years ago
|
Attachment #202052 -
Flags: superreview?(bzbarsky)
Comment 5•19 years ago
|
||
That breaks setAttributeNS too, no? Personally, I think we should stop shying away from mutation listeners and just make mutation events stuck less in the core.
Assignee | ||
Comment 6•19 years ago
|
||
(In reply to comment #5) > That breaks setAttributeNS too, no? Yes, but that will also not be used on marquees since IE doesn't support setAttributeNS and marquee is generally considered an IE thing. But I can rewrite the DOMAttrModified part, and leave out the setAttribute/removeAttribute part, if you prefer? I think the rest of the patch is still necessary for cleanup/more correctness in behavior.
Comment on attachment 202052 [details] [diff] [review] patch1 I agree with bz. This is not a good approach and I think that marquee is used rarly enough that we can avoid ughly hacks just to squeeze performance. If we can't make mutation attributes listeners in xbl fast enough we have to come up with something better in XBL2. This patch will not work for C++ callers or for getAttributeNS callers.
Attachment #202052 -
Flags: superreview?(bzbarsky) → superreview-
Assignee | ||
Comment 8•19 years ago
|
||
patch2, now still using the domattrmodified handler. This patch doesn't really have any relevance with this bug, but I started here, so, I'll keep posting the patches here. This patch is for cleanup/more correctness. See the testcases.
Attachment #202052 -
Attachment is obsolete: true
Attachment #202317 -
Flags: review?(doronr)
Reporter | ||
Comment 9•19 years ago
|
||
Comment on attachment 202317 [details] [diff] [review] patch2 >+ break; >+ case "truespeed": >+ //needed to update this._scrollDelay >+ setTimeout(function(x){ x._set_scrollDelay(x.getAttribute('scrolldelay'), false); }, 0, this); it is more readable to do var foo = function(){}; setTimeout(foo);
Attachment #202317 -
Flags: review?(doronr) → review+
Assignee | ||
Comment 10•19 years ago
|
||
Comment on attachment 202317 [details] [diff] [review] patch2 I'll address the review comment in a new patch.
Attachment #202317 -
Flags: superreview?(bzbarsky)
Comment 11•19 years ago
|
||
Martijn, could you get someone else to sr this? I won't be able to get to this for at least a week...
Assignee | ||
Comment 12•19 years ago
|
||
Comment on attachment 202317 [details] [diff] [review] patch2 Sure, I'll ask Johnny.
Attachment #202317 -
Flags: superreview?(bzbarsky) → superreview?(jst)
Comment 13•19 years ago
|
||
Comment on attachment 202317 [details] [diff] [review] patch2 sr=jst
Attachment #202317 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Comment 14•19 years ago
|
||
This is with Doron's review comment addressed.
Assignee | ||
Comment 15•19 years ago
|
||
Comment on attachment 202677 [details] [diff] [review] patch3 So this is ready for check-in, right?
Updated•19 years ago
|
Assignee: doronr → martijn.martijn
Comment 16•19 years ago
|
||
mozilla/layout/style/xbl-marquee/xbl-marquee.xml; new revision: 1.19;
Hardware: PC → All
Target Milestone: --- → mozilla1.9alpha
Assignee | ||
Comment 17•19 years ago
|
||
Ok, patch3 is checked in, I'm marking this bug fixed.
Status: NEW → RESOLVED
Closed: 19 years ago
Hardware: All → PC
Resolution: --- → FIXED
Target Milestone: mozilla1.9alpha → ---
Updated•19 years ago
|
Hardware: PC → All
Target Milestone: --- → mozilla1.9alpha
You need to log in
before you can comment on or make changes to this bug.
Description
•