Bug 50434

Summary: Marquee elements do not stop animating when scrollAmount is set to 0.
Product: WebKit Reporter: Andy Estes <aestes>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, darin
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
See Also: https://bugs.webkit.org/show_bug.cgi?id=140851
Bug Depends on: 49786    
Bug Blocks:    
Attachments:
Description Flags
Test case
none
Patch darin: review+

Andy Estes
Reported 2010-12-02 19:42:30 PST
Created attachment 75455 [details] Test case http://trac.webkit.org/changeset/73189 exposed a DOM interface for marquee elements. A marquee element should not animate when its scrollAmount content attribute is set to 0, but setting scrollAmount to 0 in script does not cause the element to stop animating. Instead, it behaves as if scrollAmount was set to 1. See the attached test case.
Attachments
Test case (242 bytes, text/html)
2010-12-02 19:42 PST, Andy Estes
no flags
Patch (34.58 KB, patch)
2010-12-02 20:58 PST, Andy Estes
darin: review+
Andy Estes
Comment 1 2010-12-02 19:42:51 PST
Andy Estes
Comment 2 2010-12-02 20:58:08 PST
David Levin
Comment 3 2010-12-02 22:11:40 PST
Comment on attachment 75460 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=75460&action=review A few comments. > WebCore/rendering/RenderMarquee.cpp:297 > + int increment = abs(m_layer->renderer()->style()->marqueeIncrement().calcValue(clientSize)); Why not just change the 1 to a 0? > LayoutTests/fast/html/marquee-scrollamount.html:13 > + // Marquee's default scrollDelay is 85ms, so wait for 100ms to ensure Why no change the scrollDelay to 0 and then wait a shorter time? 100ms doesn't seem long but it adds up over lots of tests.
Andy Estes
Comment 4 2010-12-03 00:38:31 PST
(In reply to comment #3) > (From update of attachment 75460 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=75460&action=review Thanks for the feedback David. > > A few comments. > > > WebCore/rendering/RenderMarquee.cpp:297 > > + int increment = abs(m_layer->renderer()->style()->marqueeIncrement().calcValue(clientSize)); > > Why not just change the 1 to a 0? It seems more concise to remove the call to max() entirely since an absolute value can't possibly be less than 0. > > > LayoutTests/fast/html/marquee-scrollamount.html:13 > > + // Marquee's default scrollDelay is 85ms, so wait for 100ms to ensure > > Why no change the scrollDelay to 0 and then wait a shorter time? > > 100ms doesn't seem long but it adds up over lots of tests. Good idea. I can mke that change before landing.
Andy Estes
Comment 5 2010-12-06 13:57:56 PST
Note You need to log in before you can comment on or make changes to this bug.