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

Ensure that hidden popups do not use any space #6807

Merged
merged 1 commit into from Dec 28, 2015

Conversation

timvandermeij
Copy link
Contributor

Fixes #6806.

this.container = wrapper;
}
this.container.setAttribute('hidden', true);

var popup = this.popup = document.createElement('div');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: this.popup doesn't seem necessary any more.

Copy link
Contributor 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.

@Snuffleupagus
Copy link
Collaborator

It appears that the z-index isn't being set on the correct element with this patch. Note how the popup gets placed below the other annotations in e.g. http://tug.ctan.org/tex-archive/macros/latex/contrib/pdfcomment/doc/pdfcomment.pdf#page=6.

Edit: If possible, it would be really nice to have a test-case (with multiple annotations) to check that this works as intended.

@timvandermeij
Copy link
Contributor Author

The z-index placement was indeed incorrect, which has been fixed in the new commit. I tried creating reduced test cases with several tools, but all of them did not expose the issue that the pdfcomments.pdf file has. Then I tried including the pdfcomments.pdf file as a linked test, but the SVG rasterizer from the test suite does not appear to take z-index into account, causing the icons to overlap the popups in the reference image, but not when testing it manually. Hence I don't really think it's possible to add a reliable test case for this at this point, unfortunately.

this.color = parameters.color;
this.title = parameters.title;
this.contents = parameters.contents;
this.hideContainer = parameters.hideContainer;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since the case of a Text annotation without an associated Popup annotation is special, it would seem a bit more logical if the the parameter was such that the caller explicitly had to set it to true, in order to get the special case (this.hideElement = wrapper; in the current code).

Copy link
Contributor 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
Copy link
Contributor Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/3744a6b0183cb3c/output.txt

@timvandermeij
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://107.22.172.223:8877/c6795e033d3693d/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/51b2d7fd0381bcc/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/c6795e033d3693d/output.txt

Total script time: 20.44 mins

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

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/51b2d7fd0381bcc/output.txt

Total script time: 20.55 mins

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

@Snuffleupagus
Copy link
Collaborator

Thanks for fixing this so quickly!

Snuffleupagus added a commit that referenced this pull request Dec 28, 2015
Ensure that hidden popups do not use any space
@Snuffleupagus Snuffleupagus merged commit 8558948 into mozilla:master Dec 28, 2015
@timvandermeij timvandermeij deleted the popup-annotation-hidden branch December 28, 2015 21:59
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.

None yet

3 participants