qutebrowser / qutebrowser

A keyboard-driven, vim-like browser based on Python and Qt.
https://www.qutebrowser.org/
GNU General Public License v3.0
9.46k stars 1.01k forks source link

Split and update `caret.js` for Chromium changes #8147

Open The-Compiler opened 3 months ago

The-Compiler commented 3 months ago

Chromium has had some changes in recent years for its caret browsing code:

https://chromium.googlesource.com/chromium/src/+log/main/ui/accessibility/extensions/caretbrowsing (note, page takes an eternity to load)

Since the initial implementation in b184d2f94dc40f07e1c857348264c0e3dbfcde3a:

3e1a26c Update copyright headers in ui/, url/ by Avi Drissman · 1 year, 6 months ago 34bb210 Refactor caretbrowsing/storage.js and add tests by Anastasia Helfinstein · 2 years, 1 month ago 28fa2dd Add accessibility extension test base by Anastasia Helfinstein · 2 years, 1 month ago 17e1505 Extract independent node/selection functions in caret browsing extension by Anastasia Helfinstein · 2 years, 2 months ago abd3b15 Update comments in the caretenhancer extension by Anastasia Helfinstein · 2 years, 2 months ago 399e5ce Consolidate storage logic in caret browsing extension into a class by Anastasia Helfinstein · 2 years, 2 months ago 82b0912 Clean up caret browser extension for loops by Anastasia Helfinstein · 2 years, 2 months ago a9952eef Migrate caret browser extension to manifest v3 by Anastasia Helfinstein · 2 years, 2 months ago 59c2a4a Convert caret browsing extension to an ES6 style class by Anastasia Helfinstein · 2 years, 2 months ago 05cb1be Update caret browsing extension to replace var with const/let by Anastasia Helfinstein · 2 years, 2 months ago 9857a74 Migrate Caret Browsing extension to use service workers by Anastasia Helfinstein · 2 years, 2 months ago 62b139f Add BUILD file for Caret Browsing extension, update one string. by Dominic Mazzoni · 4 years, 5 months ago

I also think we should aim to split the file into multiple JS files, to mirror the Chromium structure. Finally, we should probably avoid/revert style-only changes we did in comparison to upstream, to allow for easier diffing...

Since we diverge a lot, not sure yet what the best strategy for this would be. Try to reimplement Chromium's changes manually on top of ours? Start with the current Chromium codebase and try to get our changes in again?