[webui][ntp] Fix doodle share button position, size for scaled doodles
Previously, we set the share button position to the position sent in the doodle response and hardcoded the share button size to 26x26px. This works fine as long as the doodle is shown with the same dimensions as its intrinsic size. However, we limit the doodle height to 230px (or potentially more in the future for boxed themed mode doodles) and scale the doodle image accordingly. Therefore, the share button can end up at a different position and size relative to the doodle image as originally intended. This CL fixes that by setting the share button size and position as a percentage of the intrinsic doodle image size. Bug: 688960 Change-Id: I55261f46d9ae074b81c03a7563bc068b1fd247bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2250512 Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org> Reviewed-by:Esmael Elmoslimany <aee@chromium.org> Reviewed-by:
Marc Treib <treib@chromium.org> Reviewed-by:
Alex Gough <ajgo@chromium.org> Cr-Commit-Position: refs/heads/master@{#780029}
Showing
Please register or sign in to comment