Checking if resizeWidth or resizeHeight are 0 when creating Bitmap
According to the standard https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html when creating a new ImageBitmap that has resizeWidth or resizeHeight equal to 0, it has to throw an exception. As in some cases, user can provide value between 0 and 1, these will be rounded down to zero (as according to the standard those resizeWidth and resizeHeight is a unsigned long, so it cannot have decimal values). Bug: 1137216 Change-Id: I4a0b241fa8a94cc6b59c77bb1313f7a4d7983733 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2636373Reviewed-by:Aaron Krajeski <aaronhk@chromium.org> Reviewed-by:
Fernando Serboncini <fserb@chromium.org> Commit-Queue: Juanmi Huertas <juanmihd@chromium.org> Cr-Commit-Position: refs/heads/master@{#845407}
Showing
Please register or sign in to comment