.
Created attachment 330460 [details] Patch
Comment on attachment 330460 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=330460&action=review > Source/WebCore/html/ImageBitmap.cpp:399 > + if (existingImageBitmap->isDetached() || !existingImageBitmap->buffer()) { Why do we need both checks? Why isn’t isDetached sufficient? Do we have test cases covering both cases?
Comment on attachment 330460 [details] Patch Clearing flags on attachment: 330460 Committed r226500: <https://trac.webkit.org/changeset/226500>
All reviewed patches have been landed. Closing bug.
<rdar://problem/36344128>
(In reply to Darin Adler from comment #2) > Comment on attachment 330460 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=330460&action=review > > > Source/WebCore/html/ImageBitmap.cpp:399 > > + if (existingImageBitmap->isDetached() || !existingImageBitmap->buffer()) { > > Why do we need both checks? Why isn’t isDetached sufficient? Do we have test > cases covering both cases? I followed the pattern in ImageBitmap::width/height(), which also check both. I think it'd be possible to simply define isDetached() as !buffer() at this point (removing the m_detached member), but I don't really want to do that until the implementation of the API is more complete. Will make a note to look into it later.