Bug 181287 - Implement createImageBitmap(ImageBitmap)
Summary: Implement createImageBitmap(ImageBitmap)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ms2ger (he/him; ⌚ UTC+1/+2)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-04 05:32 PST by Ms2ger (he/him; ⌚ UTC+1/+2)
Modified: 2018-01-08 00:00 PST (History)
8 users (show)

See Also:


Attachments
Patch (14.79 KB, patch)
2018-01-04 05:39 PST, Ms2ger (he/him; ⌚ UTC+1/+2)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ms2ger (he/him; ⌚ UTC+1/+2) 2018-01-04 05:32:50 PST
.
Comment 1 Ms2ger (he/him; ⌚ UTC+1/+2) 2018-01-04 05:39:44 PST
Created attachment 330460 [details]
Patch
Comment 2 Darin Adler 2018-01-07 23:03:25 PST
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 3 WebKit Commit Bot 2018-01-07 23:23:33 PST
Comment on attachment 330460 [details]
Patch

Clearing flags on attachment: 330460

Committed r226500: <https://trac.webkit.org/changeset/226500>
Comment 4 WebKit Commit Bot 2018-01-07 23:23:35 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2018-01-07 23:24:30 PST
<rdar://problem/36344128>
Comment 6 Ms2ger (he/him; ⌚ UTC+1/+2) 2018-01-08 00:00:15 PST
(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.