Calling setAttribute on a canvas will reset its context.imageSmoothingEnabled to true
Reported by
aaron.de...@gmail.com,
Dec 2 2017
|
||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36 Steps to reproduce the problem: Please find a test case here: https://codepen.io/AaronGeorge/pen/pdGNBj?editors=1111 What is the expected behavior? context.imageSmoothingEnabled stays set at the value it was before setAttribute is called What went wrong? Calling setAttribute on a canvas will reset its context.imageSmoothingEnabled to true, even if it was set to false previously Did this work before? N/A Does this work in other browsers? N/A Chrome version: 62.0.3202.94 Channel: stable OS Version: OS X 10.12.6 Flash Version:
,
Dec 4 2017
This is working as intended. Setting the width or height attributes (even resetting them to the same value as before) results in the entire 2d context state being reset. It also result in the canvas pixels getting cleared. This is cross-browser compatible behavior and it is required by the specification. For reference: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-set-bitmap-dimensions
,
Dec 4 2017
@mmanchala yeah that's correct. @junov, ohh okay. I wasn't aware that setting width or height will reset the context. Thanks for clarifying. |
||
►
Sign in to add a comment |
||
Comment 1 by mmanchala@chromium.org
, Dec 4 2017Labels: Needs-Triage-M62 Needs-Feedback
969 KB
969 KB View Download