Kovid Goyal
e3e588c901
Workaround for Firefox sending null data in messages
2020-08-22 18:48:39 +05:30
Kovid Goyal
25adbe6bd6
Fix focus outline in dark mode
2020-08-22 18:48:39 +05:30
Kovid Goyal
d1a5850619
When creating range wrappers, normalize parent nodes to ensure there are no empty text nodes, as these mess up CFI calculations
2020-08-22 18:48:39 +05:30
Kovid Goyal
11d00b59ea
Reduce handle size by 30%
2020-08-22 18:48:39 +05:30
Kovid Goyal
ef7222d007
Modernize future import
2020-08-22 18:48:39 +05:30
Kovid Goyal
0e3c79ef70
Use a darker shade of red in dark mode
2020-08-22 18:48:39 +05:30
Kovid Goyal
9dadd1a1a4
Fix a regression that broke scrolling to CFIs with zero offset pointing to text surrounded by a range wrapper
2020-08-22 18:48:38 +05:30
Kovid Goyal
2d342d3429
Bump beta version
2020-08-22 18:48:38 +05:30
Kovid Goyal
69beb825ad
Allow exporting annotations from the annotations browser
2020-08-22 18:48:38 +05:30
Kovid Goyal
be0ed348fd
Make rating clickable in the book details page
2020-08-22 18:48:38 +05:30
Kovid Goyal
f758320251
Fix re-opening a book in the content server viewer not preserving last read position
...
Fixes #1891328
2020-08-22 18:48:38 +05:30
Kovid Goyal
f34b132c69
Fix scrolling to last column immediately after load not working in some books on Chrome
...
It's insane how buggy browsers are
2020-08-22 18:48:38 +05:30
Kovid Goyal
10d123dedf
Use bound methods
2020-08-22 18:48:38 +05:30
Kovid Goyal
5ceb657088
Fix test failing on CI
2020-08-22 18:48:37 +05:30
Kovid Goyal
fd896540d7
Better error message for failed test
2020-08-22 18:48:37 +05:30
Kovid Goyal
6e155612b4
py3: Workaround for lxml choking while parsing unicode strings with non-BMP characters on windows
2020-08-22 18:48:37 +05:30
Kovid Goyal
8fbf98aac2
On closing highlights panel go back to text
2020-08-22 18:48:37 +05:30
Kovid Goyal
bc1aa48632
Highlights should be displayed sorted by appearance order
2020-08-22 18:48:37 +05:30
Kovid Goyal
7db1a9d0a4
Fix notes indicator not being updated when editing notes from the highlights panels
2020-08-22 18:48:37 +05:30
Kovid Goyal
832211b904
Missed debug print
2020-08-22 18:48:37 +05:30
Kovid Goyal
2523c0ebfc
Implement editing of notes
2020-08-22 18:48:37 +05:30
Kovid Goyal
beffb64f3b
Implement searching in the highlights panel
2020-08-22 18:48:37 +05:30
Kovid Goyal
455f40f2da
Implement the remove highlight action
2020-08-22 18:48:37 +05:30
Kovid Goyal
b93da5d3b8
Fix changing annot not updating in IndexedDB
2020-08-22 18:48:36 +05:30
Kovid Goyal
9e91907268
Start work on highlights panel for browser viewer
2020-08-22 18:48:36 +05:30
Kovid Goyal
8343e8165a
Selection bar: Allow customizing to add quick highlight buttons with specific styles
2020-08-22 18:48:36 +05:30
Kovid Goyal
1ef9d7b7da
Give custom highlight styles a name
2020-08-22 18:48:36 +05:30
Kovid Goyal
c290f4e1cb
Sync annots from browser to server when using the sync button
2020-08-22 18:48:36 +05:30
Kovid Goyal
f2e7f3e924
UI to remove bookmarks
2020-08-22 18:48:36 +05:30
Kovid Goyal
3f30103802
Content server viewer: Add user interface for bookmarking
2020-08-22 18:48:36 +05:30
Kovid Goyal
7edad3048e
When focusing iframe if the selection bar is visible focus that instead
2020-08-22 18:48:36 +05:30
Kovid Goyal
9eea78f092
Allow adding a create bookmark button to the selection bar
2020-08-22 18:48:35 +05:30
Kovid Goyal
f228431fb9
Minor fixes from merge to viewport
...
Also remove an unused function
2020-08-22 18:48:35 +05:30
Kovid Goyal
5da5d527c4
brackets for clarity
2020-08-22 18:48:35 +05:30
Kovid Goyal
7359b314b3
Fix incorrect single screen detection
...
This detection runs on first layout, before columns are created,
therefore, the block direction is the appropriate thing to check
2020-08-22 18:48:35 +05:30
Kovid Goyal
448651d2fc
Fix next_screen_location()
...
The change to column_at() to consider points on the boundary as
belonging to the left column broke next_screen_location()
2020-08-22 18:48:35 +05:30
Kovid Goyal
3818b5e1c4
Use block and inline rather than X and Y for anchor_funcs in flow mode
2020-08-22 18:48:35 +05:30
Kovid Goyal
9a9f35ae43
Fix visibility() which was broken similar to pos_for_elem()
2020-08-22 18:48:35 +05:30
Kovid Goyal
d7259dd2e2
Fix pos_for_elem() in flow mode changed to return only one co-ordinate
2020-08-22 18:48:35 +05:30
Kovid Goyal
2076c92ab5
misc cleanups, mostly whitespace
2020-08-22 18:48:35 +05:30
Kovid Goyal
6141113d5b
Fix points at the right edge of the column being identified as belonging to the next column in paged mode
2020-08-22 18:48:34 +05:30
Kovid Goyal
603b9b70ff
Adjust limits used for at_current() loop
2020-08-22 18:48:34 +05:30
Kovid Goyal
bca1ef5767
Hoist variable definition outside loop since it is used outside loop
2020-08-22 18:48:34 +05:30
Kovid Goyal
ed21a72eae
Ensure at_point() does not raise exceptions
2020-08-22 18:48:34 +05:30
Kovid Goyal
3a05d2b2ad
Micro-optimizations
2020-08-22 18:48:34 +05:30
Kovid Goyal
53c0c3fb68
Allow for offsets larger than text length in decode_with_range()
...
This can happen if the book is edited, for example. And rather than fail
in such cases, better to use a close but not perfect match.
2020-08-22 18:48:34 +05:30
Kovid Goyal
120107e9d2
spacial -> spatial
2020-08-22 18:48:34 +05:30
Kovid Goyal
200a3cba71
fixes from static checking
2020-08-22 18:48:34 +05:30
Mark W. Gabby-Li
8b39fea8f8
Vertical RTL Book Reading Support
...
Added a variety of functions to viewport to allow working based on block and inline direction rather than X and Y.
Changed paged mode and flow mode to be based on block and inline directions, making them agnostic to writing direction.
Added jump_to_cfi function to flow mode code, and use this in iframe. This fixes some issues with CFI jumping in flow mode.
Use self.jump_to_cfi in iframe so that it is based on the current mode.
Removed a redundant self.onscroll call that was causing CFIs to be queried twice on load, doubling the time they took.
Fixed some bugs related to scrolling in flow mode related to a decorator not working with keyword arguments, by removing the keyword arguments.
Fixed some bugs with flow mode visibility anchor function.
CFI changes:
Renamed some functions and variables to clarify meaning.
Remove use of exceptions, since they were causing CFI calculation to run about six times more slowly in benchmarks. (Worst-case went from ~6 to ~1 second.)
Remove forward flag and allow text offset to be equal to node length, and correct for this by adding a flag to the decoded CFI to indicate this.
Added comments clarifying the results of decoding a CFI.
Fix bugs in the point (now decode_with_range) function and simplified it.
Added new functions that get CFI position from decoded CFIs, to replace places where this was being done in slightly different ways.
Fixed some issues with cfi.pyj's scroll_to that were exposed by vertical writing support, mainly caching and using span's parent to create the start and end ranges, which causes re-creating the range to succeed. Also, don't store the span's bounding rect, since it's not needed anymore.
Rewrote at_current to do a simplified scan of the viewport in the inline and then block direction.
2020-08-22 18:48:34 +05:30
Kovid Goyal
c5b9677809
Select highlight in panel when it is selected in text
2020-08-22 18:48:34 +05:30