Bug 208154

Summary: ImageBuffer should not use ImageData since this is a layering violation
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: CanvasAssignee: Said Abou-Hallawa <sabouhallawa>
Status: NEW ---    
Severity: Normal CC: alecflett, beidson, cdumez, dino, esprehn+autocc, ews-watchlist, graouts, gyuyoung.kim, hi, joepeck, jsbell, kondapallykalyan
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Said Abou-Hallawa 2020-02-24 13:25:02 PST
ImageBuffer::getImageData() and ImageBuffer::puttImageData() deal with ImageData. Since ImageBuffer is in platform/graphics and ImageData is in html, this is considered a layering violation. The fix could be the following:

1. Move ImageData to platform/graphics except the DOM ImageData creation methods.
2. Add DOMImageData to html and make it inherit from ImageData.
3. Add the DOM ImageData creation methods to DOMImageData.
4. Rename ImageData.idl to DOMImageData.idl but make InterfaceName=ImageData.
5. Change all the DOM related reference to ImageData to be DOMImageData.
Comment 1 Said Abou-Hallawa 2020-02-25 18:32:08 PST
Created attachment 391712 [details]
Patch
Comment 2 Said Abou-Hallawa 2020-02-25 18:34:27 PST
Created attachment 391713 [details]
Patch