Bug 124707

Summary: Generate toHTMLMarquee|OListElement() to cleanup static_cast<>
Product: WebKit Reporter: Gyuyoung Kim <gyuyoung.kim>
Component: New BugsAssignee: Gyuyoung Kim <gyuyoung.kim>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Gyuyoung Kim 2013-11-21 03:10:15 PST
As a step to use toFoo(), we need to generate toHTMLMarquee|OListElement(). Besides this patch cleans up remaining static_cast<> usage.
Comment 1 Gyuyoung Kim 2013-11-21 03:17:48 PST
Created attachment 217542 [details]
Patch
Comment 2 Gyuyoung Kim 2013-11-21 18:36:39 PST
Comment on attachment 217542 [details]
Patch

There is no regression on layout test when I run layout test locally.
Comment 3 Gyuyoung Kim 2013-11-21 20:28:23 PST
CC'ing Darin.
Comment 4 Darin Adler 2013-11-22 08:18:30 PST
Comment on attachment 217542 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=217542&action=review

> Source/WebCore/rendering/RenderMarquee.cpp:78
>      if (element && element->hasTagName(marqueeTag)) {
> -        HTMLMarqueeElement* marqueeElement = static_cast<HTMLMarqueeElement*>(element);
> -        result = std::max(result, marqueeElement->minimumDelay());
> +        result = std::max(result, toHTMLMarqueeElement(element)->minimumDelay());
>      }

WebKit coding style says we remove the braces when an if statement becomes a single line like this.
Comment 5 Gyuyoung Kim 2013-11-22 23:44:25 PST
Created attachment 217742 [details]
Patch
Comment 6 WebKit Commit Bot 2013-11-24 07:23:18 PST
Comment on attachment 217742 [details]
Patch

Clearing flags on attachment: 217742

Committed r159733: <http://trac.webkit.org/changeset/159733>
Comment 7 WebKit Commit Bot 2013-11-24 07:23:22 PST
All reviewed patches have been landed.  Closing bug.