Bug 124707 - Generate toHTMLMarquee|OListElement() to cleanup static_cast<>
Summary: Generate toHTMLMarquee|OListElement() to cleanup static_cast<>
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gyuyoung Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-21 03:10 PST by Gyuyoung Kim
Modified: 2013-11-24 07:23 PST (History)
3 users (show)

See Also:


Attachments
Patch (18.54 KB, patch)
2013-11-21 03:17 PST, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (18.58 KB, patch)
2013-11-22 23:44 PST, Gyuyoung Kim
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.