[charts] Fix WebGL print export canvas stretching beyond drawing area
The canvas-to-image conversion used canvas.width/height (device pixel
buffer dimensions) for the img element, causing it to render 2x too
large on high-DPI displays. Use clientWidth/clientHeight instead for
correct CSS dimensions. Also fix the style copy loop which was broken
due to Object.hasOwn not matching CSSStyleDeclaration properties.
Fixes #21643
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>