Bug 137199 - Use the new is<>() / downcast<>() for ShadowRoot and StyledElement
Summary: Use the new is<>() / downcast<>() for ShadowRoot and StyledElement
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on: 137056
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-28 16:11 PDT by Chris Dumez
Modified: 2014-09-29 10:35 PDT (History)
1 user (show)

See Also:


Attachments
Patch (38.77 KB, patch)
2014-09-28 16:26 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2014-09-28 16:11:15 PDT
Use the new is<>() / downcast<>() for ShadowRoot and StyledElement.
Comment 1 Chris Dumez 2014-09-28 16:26:18 PDT
Created attachment 238830 [details]
Patch
Comment 2 Darin Adler 2014-09-28 17:56:47 PDT
Comment on attachment 238830 [details]
Patch

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

> Source/WebCore/css/StyleResolver.cpp:391
> +    m_styledElement = element && is<StyledElement>(element) ? downcast<StyledElement>(element) : nullptr;

Iā€™m not going to comment on every one, since this is the same issue as in other patches. There is no need for the null check here since the is<StyledElement> function works fine on null, returning false. And the downcast should be done on *element, with a & before downcast. This pattern repeats throughout this patch in variants.
Comment 3 WebKit Commit Bot 2014-09-29 10:35:34 PDT
Comment on attachment 238830 [details]
Patch

Clearing flags on attachment: 238830

Committed r174069: <http://trac.webkit.org/changeset/174069>
Comment 4 WebKit Commit Bot 2014-09-29 10:35:38 PDT
All reviewed patches have been landed.  Closing bug.