mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 11:58:55 +00:00

In `getTokenLocation`, the call to `coordsChar` needed an extra parameter so the coordinates are relative to the top left corner fo the currently visible window. We were passing the center of the bounding client rect to `getTokenLocation`, but a token could wrap and have it's bounding rect center not being on the token. To fix this we're passing the center of the first box quads of the token. The inline preview widgets were causing some troubles on CodeMirror internal state too. Since we're using React to populate the bookmark we set on the line, and given that React.render is asynchronous, we were setting an empty element as a bookmark on the editor, which React populates later. But CodeMirror probably update its internal state when the bookmark is added, so that was causing wrong computation later. To avoid that, we only set the bookmark once React actually rendered the element in the DOM. Finally, while codeMirror already listen for window resize to update its internal state, the Editor can be resized without the window being resized, when primary/secondary panels are resized. In such case, we manually trigger a codeMirror refresh. We add a test to cover this, and also modify test helpers so we would query the DOM instead of relying on CodeMirror methods. Differential Revision: https://phabricator.services.mozilla.com/D190272
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
An explanation of the Firefox Source Code Directory Structure and links to project pages with documentation can be found at: https://firefox-source-docs.mozilla.org/contributing/directory_structure.html For information on how to build Firefox from the source code and create the patch see: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html If you have a question about developing Firefox, and can't find the solution on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel. Nightly development builds can be downloaded from: https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ - or - https://www.mozilla.org/firefox/channel/desktop/#nightly Keep in mind that nightly builds, which are used by Firefox developers for testing, may be buggy.
Description
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Languages
JavaScript
32.3%
C++
25.4%
HTML
21%
C
10.8%
Python
2.8%
Other
7.2%