• Xida Chen's avatar
    [PaintWorklet] Fix shadow offset when page zooms · 76e7ac4c
    Xida Chen authored
    When the page zooms, for example, to 200%, the offset of the shadow
    remains the same as when the page scale is 100%. The problem here is
    that whenever we zoom the page, we queue a paint call back. Then the
    new paint call back will set the shadow offset with the size that doesn't
    account for the page zoom.
    
    The fix is to override the BaseRenderingContext2d::setShadowOffset
    method with the zoom.
    
    This CL also includes a layout test to verify the correctness of the fix.
    
    Bug: 849706
    Change-Id: I427209fca397a7540936bccd9e8fb18ba7c018ba
    Reviewed-on: https://chromium-review.googlesource.com/1087874Reviewed-by: default avatarStephen McGruer <smcgruer@chromium.org>
    Reviewed-by: default avatarFernando Serboncini <fserb@chromium.org>
    Commit-Queue: Xida Chen <xidachen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#564955}
    76e7ac4c
shadow-scale-with-page-zoom-expected.html 436 Bytes