Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Editor] Use serialized data when copying/pasting #15179

Merged
merged 1 commit into from
Jul 19, 2022

Conversation

calixteman
Copy link
Contributor

  • in using the global clipboard, it'll be possible to copy from a
    pdf and paste in an other one;
  • it'll allow to edit a previously created annotation;
  • copy the editors in the current page.

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, with comments addressed and passing tests; thank you!

const editor = super.deserialize(data, parent);

editor.#fontSize = data.fontSize;
editor.color = Util.makeHexColor(...data.color);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct, since I'd expect the following?

Suggested change
editor.color = Util.makeHexColor(...data.color);
editor.#color = Util.makeHexColor(...data.color);

@@ -285,35 +285,46 @@ class KeyboardManager {
*/
class ClipboardManager {
constructor() {
this.element = null;
this.elements = null;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly unrelated to this patch, but should this property perhaps be private instead?

- in using the global clipboard, it'll be possible to copy from a
  pdf and paste in an other one;
- it'll allow to edit a previously created annotation;
- copy the editors in the current page.
@calixteman
Copy link
Contributor Author

/botio integrationtest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/c11c5ec7a7dca00/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 1

Live output at: http://54.193.163.58:8877/96e7d8857b17195/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/c11c5ec7a7dca00/output.txt

Total script time: 4.49 mins

  • Integration Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/96e7d8857b17195/output.txt

Total script time: 10.81 mins

  • Integration Tests: FAILED

@calixteman
Copy link
Contributor Author

/botio unittest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/b1168438e6f0fb9/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_unittest from @calixteman received. Current queue size: 1

Live output at: http://54.193.163.58:8877/8b305972faace3f/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/b1168438e6f0fb9/output.txt

Total script time: 3.11 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/8b305972faace3f/output.txt

Total script time: 9.66 mins

  • Unit Tests: Passed

@calixteman calixteman merged commit ad15532 into mozilla:master Jul 19, 2022
@calixteman calixteman deleted the editor_cp branch July 19, 2022 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants