• Daniel Hosseinian's avatar
    PDF Viewer: Delegate rotation tracking to the plugin · 70b5c87f
    Daniel Hosseinian authored
    Certain UI elements, such as the thumbnails and the annotations dialog,
    require the number of rotations on the PDF content.
    
    Currently, that value is tracked both on the UI and the plugin backend,
    but they can go out of sync because:
    - The UI value is updated synchronously whenever the rotate button is
    clicked.
    - The plugin value updates when a rotate request comes from the UI or
    the context menu.
    
    Therefore, the true value is held in the plugin, as the rotate requests
    from the context menu do not go through the UI.
    
    Furthermore, the number of rotations from the plugin is already sent to
    the UI on the 'documentDimensions' message. Use that value instead.
    
    Fixed: 1166590
    Change-Id: Ia7fa111ae338a863828fd1196715684301d7b5c3
    Bug: 1166590
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2630428
    Commit-Queue: dpapad <dpapad@chromium.org>
    Reviewed-by: default avatardpapad <dpapad@chromium.org>
    Auto-Submit: Daniel Hosseinian <dhoss@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#844746}
    70b5c87f
viewport.js 46.9 KB