Skip to content

Simplify annotation data passing - #6232

Merged
Snuffleupagus merged 1 commit into
mozilla:masterfrom
timvandermeij:annotations-data-passing
Jul 19, 2015
Merged

Snuffleupagus merged 1 commit into
mozilla:masterfrom
timvandermeij:annotations-data-passing

Conversation

@timvandermeij

Copy link
Copy Markdown
Collaborator

We can avoid the getData method call by just accessing the data property on the annotation object. We can avoid get annotationRefs by directly using its result (like all other methods in that file). Finally, getAnnotations in api.js can be simplified by interchanging the cases, i.e., always returing the promise and only creating it when it does not exist yet.

I have verified with 15 test files with different annotation types (Link, Text, Widget, Markup, et cetera) that rendering has not changed.

@Snuffleupagus Could you review this PR?

@timvandermeij timvandermeij changed the title Simply annotation data passing Simplify annotation data passing Jul 18, 2015
@timvandermeij
timvandermeij force-pushed the annotations-data-passing branch from eebb555 to 981202f Compare July 18, 2015 15:57
Comment thread src/core/core.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

While you're at it, remove the parentheses. They are not required, and do not enhance the readability of this line.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done in the new commit.

@timvandermeij
timvandermeij force-pushed the annotations-data-passing branch from 981202f to 995c5ba Compare July 19, 2015 12:03
@timvandermeij

Copy link
Copy Markdown
Collaborator Author

/botio-linux preview

@pdfjsbot

Copy link
Copy Markdown

@timvandermeij

Copy link
Copy Markdown
Collaborator Author

/botio test

@pdfjsbot

Copy link
Copy Markdown

@pdfjsbot

Copy link
Copy Markdown

@pdfjsbot

Copy link
Copy Markdown

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/3f8eb82a935f957/output.txt

Total script time: 18.28 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot

Copy link
Copy Markdown

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/88b6a79c47252a7/output.txt

Total script time: 18.76 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

Snuffleupagus added a commit that referenced this pull request Jul 19, 2015
@Snuffleupagus
Snuffleupagus merged commit d3e90cf into mozilla:master Jul 19, 2015
@Snuffleupagus

Copy link
Copy Markdown
Collaborator

Looks good, thanks!

@timvandermeij
timvandermeij deleted the annotations-data-passing branch July 19, 2015 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants