[Webkit-unassigned] [Bug 157249] Deduplicated initializer lists of BitmapImage constructors.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 4 04:39:20 PDT 2016


--- Comment #4 from Konstantin Tokarev <annulen at yandex.ru> ---
(In reply to comment #2)
> Comment on attachment 277869 [details]
> Patch
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=277869&action=review
> > Source/WebCore/platform/graphics/BitmapImage.cpp:48
> > +BitmapImage::BitmapImage(ImageObserver* observer, bool fromNativeImage)
> This approach of taking a boolean is a little bit inelegant, violates our
> coding style rule of not using literal "true" for a mysterious meaning that
> requires reading the code to find out what it means, and also adds a few
> branches to the constructors, but I think it’s OK.

I've got rid of branch in constructor by using template + std::true_type/false_type. Now it should compile to the same code as before, though I understand that it's inelegant.

> > Source/WebCore/platform/graphics/BitmapImage.h:302
> > +    int m_repetitionCount { cAnimationNone }; // How many total animation loops we should do.
> Not sure why we removed the comment explaining the meaning of
> cAnimationNone. Might be better to move it somewhere rather than removing it
> entirely.

I thought it's not so important after we have initializer. Returned it back now.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160504/42fc5921/attachment.html>

More information about the webkit-unassigned mailing list