1. 29 Sep, 2021 2 commits
  2. 28 Sep, 2021 1 commit
  3. 27 Sep, 2021 13 commits
  4. 22 Sep, 2021 4 commits
  5. 20 Sep, 2021 7 commits
  6. 16 Sep, 2021 3 commits
    • Eduardo's avatar
      Minor improvements following PR feedback · 9e4a4717
      Eduardo authored
      * check that the iframe's `src` element is not 'about:blank'.
      * use EventTarget class and fake DOM element for tests
      * fix typos
      9e4a4717
    • Eduardo Sanz García's avatar
      Complete testing of the onDocumentReady function · 8575eb96
      Eduardo Sanz García authored
      I removed the `/* istanbul ignore test */` and created a facade to
      emulate and iframe for testing.
      8575eb96
    • Eduardo Sanz García's avatar
      Improve the logic that checks for iframe's document ready · 919e5bf1
      Eduardo Sanz García authored
      In certain situations, the logic to check when the iframe's document is
      ready didn't work as expected. The reason for that is that browsers
      create an initial blank document before the actual document loads.
      This blank document has a `readyState` of 'complete' in Safari and
      Chrome and of 'uninitialized' in Firefox. This blank document can be
      mistaken by the final document. I was able to reproduce a situation
      where the Hypothesis client was injected into the blank document. Then,
      the blank document was replaced by the actual document and the
      Hypothesis client was not not longer embedded.
      
      In addition, this commit:
      
      * renames `frame` to `iframe` (only in the test)
      * renames `_handledFrames` to _annotatableFrames`
      * removes `isAccessible` (no longer neede)
      919e5bf1
  7. 15 Sep, 2021 5 commits
    • Robert Knight's avatar
      Tweak comment · f7f8e24f
      Robert Knight authored
      Add commas for readability
      Co-authored-by: 's avatarLyza Gardner <439947+lyzadanger@users.noreply.github.com>
      f7f8e24f
    • Robert Knight's avatar
      Prevent sidebar controls overlapping scrollbar in PDFs · 32cea8cc
      Robert Knight authored
      When the sidebar is closed or there is not enough room to show the
      sidebar alongside the PDF content, reserve space for the sidebar's
      toolbar and bucket bar. This fixes an issue where the sidebar's controls
      would overlap the document's scrollbar, making scrolling the PDF less
      convenient, especially in long documents.
      
      This also removes the need for some CSS overrides that reposition
      elements in PDF.js's toolbar. By ensuring that the `<body>` does not
      overlap the sidebar controls, the PDF.js toolbar which is contained
      within the body doesn't either.
      
      Fixes #3759
      32cea8cc
    • Robert Knight's avatar
      Remove vestigial `undefined` from map value type · 4ecde083
      Robert Knight authored
      This is no longer needed after the `Record<K, V>` => `Map<K, V>` change.
      4ecde083
    • Robert Knight's avatar
      Fix map lookup · e822a31c
      Robert Knight authored
      I expected TypeScript to generate an error for this obvious mistake, but
      it seems that this only happens if `noImplicitAny` is enabled.
      e822a31c
    • Robert Knight's avatar
      Use maps for PDF text and anchoring caches · ecb9b47c
      Robert Knight authored
      Using maps is a little faster and avoids the need for `hasOwnProperty`
      checks. The quote position cache has been converted to a single level
      map as this is more ergonomic to work with and the second level maps
      almost always had exactly one entry in them.
      ecb9b47c
  8. 14 Sep, 2021 5 commits