1. 02 Mar, 2022 13 commits
  2. 01 Mar, 2022 5 commits
    • Robert Knight's avatar
      Limit VitalSource iframe height in PDFs · bfe0e9a7
      Robert Knight authored
      VitalSource PDF books currently create very tall iframes. When a user
      scrolls through a PDF page, they are scrolling the _parent_ frame rather
      than the iframe itself. The bucket bar and scrolling logic in the client
      don't support this. The result is that:
      
       - Bucket bar buckets are in the wrong location and don't scroll as the
         user scrolls the parent frame
       - Clicking on an annotation / bucket tries to scroll only the iframe,
         not the parent frame.
      
      To resolve this we need to do at least one of:
      
      1. Support these tall iframes in the client generally
      2. Forcibly change the height of the iframe and enable the iframe to scroll
      3. Persuade VitalSource to change the iframe layout so that the content frame
         scrolls, rather than the parent frame. They previously did this for EPUBs
         already.
      
      This commit implements a version of (2). If VS later apply (3) then we can
      remove this workaround.
      bfe0e9a7
    • Robert Knight's avatar
      Add missing parameter and variable types in src/annotator/ · 24b65649
      Robert Knight authored
      Add missing types found while trying to typecheck src/annotator with
      `noImplicitAny` enabled.
      24b65649
    • Lyza Danger Gardner's avatar
    • Robert Knight's avatar
      Reduce nesting of some tests and revise descriptions · 1c76a6d4
      Robert Knight authored
       - Use "contains" rather than "returns" to describe tests of objects or
         object properties
      
       - Avoid deeply nested `describe` blocks that only contain a single test. This
         is just a preference not to have too many levels of nesting unless
         there are tests that benefit from grouping.
      
       - Revise description of tests for link properties (`link`,
         `documentFingerprint`, `favicon`) since these cover properties other
         than just `link`.
      1c76a6d4
    • Eduardo Sanz García's avatar
      Rearrange tests in `html-metadata.js` · 295a8886
      Eduardo Sanz García authored
      I have created a few additional `describe` sub-sections and re-grouped
      tests by the resulting metadata property. This allow for a more atomic
      testing.
      295a8886
  3. 28 Feb, 2022 20 commits
  4. 25 Feb, 2022 2 commits
    • Robert Knight's avatar
      Support side-by-side mode in VitalSource PDF books · c037edd0
      Robert Knight authored
      Support side-by-side mode in PDF books by simply resizing the content of
      the page. This is similar to how side-by-side mode works in PDFs.
      
      The width of the page in the VS PDF demo has been increased so that it
      better matches the actual VS viewer, and also so that it triggers the
      heuristics in the Guest class for detecting an iframe that fills the
      parent frame.
      c037edd0
    • Robert Knight's avatar
      Use ResizeObserver to detect PDF image size changes · d0e2ab41
      Robert Knight authored
      This allows the client to detect, in most supported browsers, changes in the
      size and position of the PDF book image which don't affect the window
      size. This will be needed to support side-by-side mode for VS PDF books.
      It may also help if VS resizes the book image for any other reason.
      
      For Safari < 13.4, we fall back to using window resize events.
      d0e2ab41