Bug 208154 - ImageBuffer should not use ImageData since this is a layering violation
Summary: ImageBuffer should not use ImageData since this is a layering violation
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-24 13:25 PST by Said Abou-Hallawa
Modified: 2020-02-25 18:34 PST (History)
12 users (show)

See Also:


Attachments
Patch (72.46 KB, patch)
2020-02-25 18:32 PST, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (70.84 KB, patch)
2020-02-25 18:34 PST, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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