Commit graph

12298 commits

Author SHA1 Message Date
Dan Stillman
6a2949be8a fx-compat: Add HiddenBrowser.jsm
Remove Zotero.Browser and add HiddenBrowser.jsm. Post-Fission, web/file
content loads in a separate process, so it's not possible (as best as I
can tell) to directly access the contents of a hidden browser -- it just
appears as about:blank in the parent process. We now use Mozilla's
JSWindowActor mechanism [1] to get page data, including character set
and body text for full-text indexing. We'll have to evaluate other uses
of hidden browsers to see how to handle them.

This also adds include.jsm for loading the Zotero object into a JSM.

[1] https://firefox-source-docs.mozilla.org/dom/ipc/jsactors.html
2022-06-17 20:28:58 -04:00
Dan Stillman
7f748b2620 Take path or nsIFile in Zotero.File.pathToFileURI() 2022-06-17 20:24:43 -04:00
Dan Stillman
41dd75af8a Wait for Zotero.init() before returning Zotero.reinit()
Not sure if this makes a difference, but it seems more correct.
2022-06-17 20:24:43 -04:00
Dan Stillman
0dd088e98d Add loadZoteroWindow() support function for tests
`loadBrowserWindow()` will need to be updated for loading remote URLs,
but anything needing a Zotero window (including `loadZoteroPane()`) can
use this.
2022-06-17 20:24:43 -04:00
Dan Stillman
730e86d661 fx-compat: Restore tests and test using actual Zotero executable
The test runner now uses the Zotero executable from
`zotero-standalone-build/staging` rather than the Firefox from
`zotero-standalone-build/xulrunner`. Along with testing the actual
program, this restores visible UI updates during tests, which should
make debugging various things easier. We can also now remove anything
related to Zotero being an extension.

Many tests are still broken, but this at least lets us start running
them.
2022-06-17 20:24:43 -04:00
Dan Stillman
5d08359dc9 fx-compat: Update httpd.js from mozilla-central 1739f130 2022-06-17 20:24:43 -04:00
Dan Stillman
3c9dcea46b Add comment explaining CSS rule to hide menuitem icons on macOS 2022-06-17 20:24:43 -04:00
Abe Jellinek
0e1a16b96b fx-compat: Show native field/creator transform popups
No longer anchored to the element, but instead to the cursor.
2022-06-17 18:49:07 -05:00
Abe Jellinek
c31df4ae6b fx-compat: Display item box using CSS grid
- Widths are now correct
- Rows are a little too tall
- Field value vertical alignment is off
- Platform styling isn't done and some styles might be redundant
- Still can't scroll vertically
- Creator name inputs still displayed wrong
2022-06-16 16:27:16 -05:00
Dan Stillman
f454944f8c fx-compat: Fix files not showing up in debugger 2022-06-16 04:19:41 -04:00
Tom Najdek
cb3d4b1800
Fix tag selector menus not appearing on fx102 (#2654)
Also tweaked offset where a context menu appears to 1px from cursor
(was 2px) to match other context menus.
2022-06-14 18:28:02 -04:00
Abe Jellinek
cd17c90f2e fx-compat: Don't show hidden types in Item Type menu 2022-06-10 14:03:53 -05:00
Abe Jellinek
ac9e882bda fx-compat: Item box: Fix URL opening and field blurring 2022-06-10 13:59:01 -05:00
Abe Jellinek
7dd60abb11 fx-compat: Exclude menulist from clicky :active styling
Menulists only get :active for the split second when they're clicked but
the menupopup hasn't yet been shown.
2022-06-10 11:41:04 -05:00
Martynas Bagdonas
097d423275 fx-compat: Fix spellchecker and dictionary manager 2022-06-10 12:57:27 +03:00
Martynas Bagdonas
3eb65eef4f fx-compat: Fix tab text alignment 2022-06-09 16:41:24 +03:00
Martynas Bagdonas
5924753fd1 fx-compat: Fix unloaded tab loading 2022-06-09 16:30:34 +03:00
Martynas Bagdonas
64c652ea06 fx-compat: Replace eval with wrappedJSObject in PDF reader 2022-06-09 13:13:08 +03:00
Abe Jellinek
9a2e98360a fx-compat: Scaffold: Update Monaco
Now that we can. Quite a bit faster and more customizable.
2022-06-08 17:38:59 -05:00
Abe Jellinek
e537018e71 fx-compat: Initial fix for Scaffold
Not working:
- Web tests (hidden browser is broken)
- Test Updated status text
- Various platform menu things (code copied from ZP and will use whichever
  approach we settle on there)
2022-06-08 17:16:50 -05:00
Martynas Bagdonas
1b324f9bd1 fx-compat: Fix color rendering in annotation popup, use checkbox 2022-06-08 21:22:37 +03:00
Martynas Bagdonas
1e25e2ac4c fx-compat: Fix invisible caret issue in linksBox tags popup 2022-06-08 21:22:37 +03:00
Martynas Bagdonas
a7bc25b553 fx-compat: Fix PDF reader window 2022-06-08 18:57:26 +03:00
Martynas Bagdonas
08089d6120 fx-compat: Fix tooltip node to work in PDF reader tab 2022-06-08 18:57:26 +03:00
Martynas Bagdonas
2e5388af5b fx-compat: Implement tagsBox element 2022-06-07 17:13:48 +03:00
Abe Jellinek
7e55ea59bb fx-compat: Item box: Change creator type label correctly 2022-05-31 16:31:20 -07:00
Abe Jellinek
b9f3bea8c3 fx-compat: Attachment box: Only add listener once 2022-05-31 16:30:55 -07:00
Abe Jellinek
1b74befd64 fx-compat: Fix Item Type menu regression 2022-05-31 15:04:14 -07:00
Abe Jellinek
d3555228b2 fx-compat: Fix Duplicate Items merge view 2022-05-31 14:57:47 -07:00
Abe Jellinek
59d5013952 fx-compat: Item box: Fix menu actions, plus/minus buttons 2022-05-31 11:23:19 -07:00
Abe Jellinek
496f34117c fx-compat: Fix attachment rename, remove <links-box> observer
<links-box> doesn't actually have a notify() method, so an error was
being thrown on each notification.
2022-05-27 13:28:07 -06:00
Abe Jellinek
1ef40d9423 fx-compat: Fix attachment box 2022-05-27 12:56:13 -06:00
Martynas Bagdonas
307701788f fx-compat: Fix and extract notesBox into a separate element 2022-05-27 13:21:18 +03:00
Abe Jellinek
ed572df563 fx-compat: 2xize clicky 2022-05-26 12:38:42 -06:00
Abe Jellinek
f05d6fe0e0 fx-compat: Fix basicViewer for http(s):// URLs
maychangeremoteness="true" is required to successfully load pages from
the web even though we never actually change remoteness.

https://searchfox.org/comm-central/rev/2cf3a09a0127fe73e932c5ee793986f3bed2ccd2/mail/base/content/aboutMessage.xhtml#118
2022-05-26 10:45:57 -06:00
Abe Jellinek
e26fd18450 fx-compat: Change autocomplete-input load method 2022-05-26 09:39:30 -06:00
Martynas Bagdonas
0079fbdb08 fx-compat: Fix relatedBox 'Add' button visibility 2022-05-26 18:31:07 +03:00
Martynas Bagdonas
db0ac723fa fx-compat: Note editor and links box fixes:
- Add links-box component (inside noteEditor.js).
- Add related-box component and fix related pane.
- Use tagsBox.jsx instead of tagsbox.xml in note editor links box popup.
- Remove CSS styles and bindings for noteeditor, relatedbox and tagsbox.
2022-05-26 18:23:31 +03:00
Martynas Bagdonas
4a1812e5ba fx-compat: Fix selectItemsDialog 2022-05-26 18:23:31 +03:00
Tom Najdek
1fbed10375
Report correct path for outFiles in symlink task (#2639) 2022-05-26 05:48:27 -04:00
Tom Najdek
89dd6faa2b
Run add_omni_files for changes to symlinked files (#2638) 2022-05-26 05:14:16 -04:00
Dan Stillman
5ac4bc6d8b
Merge pull request #2636 from tnajdek/fx102-improve-build
Fx102 improve build
2022-05-25 17:34:20 -04:00
Abe Jellinek
27e5e3ca29 fx-compat: Item box: Visual fixes
- Override normal cursor on Abstract label
- Disable textarea resize
- Show clicky hover/active backgrounds on Item Type menu
2022-05-25 13:34:57 -06:00
Abe Jellinek
4a856b94cc fx-compat: Item box: Fix abstract expander 2022-05-25 13:22:52 -06:00
Abe Jellinek
3566d1fc1f fx-compat: Item box: Fix item type menulist
- Use IDs as list item values
- Use addEventListener() so events are actually received
- Put menulist inside <td>
    * This causes a small appearance regression at the moment because
      <td> margins/padding are a bit off, but that issue is visible on
      all other fields already.
2022-05-25 12:51:15 -06:00
Tom Najdek
8b76bf6e65
Run add_omni_file script when file change detected 2022-05-25 19:56:23 +02:00
Tom Najdek
7aa3bde170
On error, ring the bell
Should help with noticing syntax errors etc.
2022-05-25 19:37:20 +02:00
Tom Najdek
eb5f2978cc
Fix a problem with build when switching branch
When switching between master and fx102 bogus files were created outside
of the build/ directory. That's because previously we had a symlinked
file itembox.css and now we compile a file itemBox.css into the same
directory. However when running `npm start`, after switching branch, the
symlink still existed and thus when writing a new file, symlink was
followed and output has been written inside a source file instead.

Build system will now run cleanup step first (where it checks if files
frim `.signatures.json` still exist in src), then proceed with build,
so old symlinks will be removed thus producing a valid build.

This problem probably only happened on case-insensitive file-systems
(like default config on macOS HFS+).
2022-05-25 16:38:16 +02:00
Tom Najdek
32c0d228cc
Fix all scss files rebuild on every non-js change
multimatch test was incorrect triggering scss rebuild on every change
that reached that logic.

Also fixed weird (legacy?) use of path.join()
2022-05-25 16:10:15 +02:00
Abe Jellinek
c2ce5c7596 fx-compat: Remove duplicate menulistItemTypes.js 2022-05-24 15:56:09 -06:00