[webkit-reviews] review granted: [Bug 137199] Use the new is<>() / downcast<>() for ShadowRoot and StyledElement : [Attachment 238830] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 28 17:56:47 PDT 2014


Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 137199: Use the new is<>() / downcast<>() for ShadowRoot and StyledElement
https://bugs.webkit.org/show_bug.cgi?id=137199

Attachment 238830: Patch
https://bugs.webkit.org/attachment.cgi?id=238830&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
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.


More information about the webkit-reviews mailing list