Skip to content

Refactor annotation color handling and add unit tests - #6214

Merged
Snuffleupagus merged 1 commit into
mozilla:masterfrom
timvandermeij:annotation-color
Jul 16, 2015
Merged

Snuffleupagus merged 1 commit into
mozilla:masterfrom
timvandermeij:annotation-color

Conversation

@timvandermeij

Copy link
Copy Markdown
Collaborator

This PR has the following goals:

This rewrite automatically fixes an issue in the old code where transparency (here with color = null) would not be interpreted correctly and it would draw as black instead.

@Snuffleupagus Could you review this? It is a fairly easy patch and half of it are unit tests. http://tug.ctan.org/tex-archive/macros/latex/contrib/pdfcomment/doc/pdfcomment.pdf is a good document to verify that the colors are still the same before and after the patch (see page 6).

Comment thread src/core/annotation.js Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: How about using new UintArray(3) here instead?

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.

This has been changed in the new commit so we do not even need this anymore.

@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/5a9d5b59cd9e010/output.txt

Total script time: 18.30 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/63f2826b437d469/output.txt

Total script time: 19.54 mins

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

Snuffleupagus added a commit that referenced this pull request Jul 16, 2015
Refactor annotation color handling and add unit tests
@Snuffleupagus
Snuffleupagus merged commit cf6d40f into mozilla:master Jul 16, 2015
@Snuffleupagus

Copy link
Copy Markdown
Collaborator

Looks good, thanks!

@timvandermeij
timvandermeij deleted the annotation-color branch July 16, 2015 19:46
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.

3 participants