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

Remove unused annotation highlight div #5569

Merged
merged 1 commit into from
Dec 23, 2014

Conversation

timvandermeij
Copy link
Contributor

This is now done using CSS. For annotation-heavy documents this change makes the DOM much lighter.

This is now done using CSS. For annotation-heavy documents this change makes the DOM much lighter.
@timvandermeij
Copy link
Contributor Author

@CodingFabian Could you review this as you came up with the initial idea for this PR?

I would say this fixes #5207. It is already quite fast for me right now (most likely due to recent optimizations), but this PR helps even more by avoiding a lot of DOM elements. Would you agree?

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

@timvandermeij
Copy link
Contributor Author

/botio test

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

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

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

Total script time: 17.20 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/dca00f8c0646feb/output.txt

Total script time: 22.98 mins

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

@Snuffleupagus
Copy link
Collaborator

This was added as part of PR #4318, where #4318 (comment) should explain the reason for adding the code that this PR aims to remove.

While I completely agree that we should do as much as possible to reduce the number of DOM elements, we might want to make sure that we're not just removing code that someone might rely on.

We should probably involve @dferer in this discussion to see if he still needs this code, and if so see if there is a way that we could at least disable it by default.

@CodingFabian
Copy link
Contributor

i suggested to remove it because I could not find where it is used. So I fully support the removal.

If this is needed code then it is at least a smell, and we should figure out how to make it more obvious why the code is needed.

@timvandermeij
Copy link
Contributor Author

As I see it now, it is not used at all; it's just a hidden div.

but I did leave the highlighting code because a global "highlight annotations" feature is something I would like to have available if possible

That can also be achieved in other ways than by adding a new div, for example by changing the appearance of the annotation divs themselves. There is no such feature now, so right now the divs are just taking up unnecessary DOM space. If there were such a feature, it would be a slightly different story, but even then it should be implemented differently in my opinion.

@dferer Could you elaborate on how you think about this?

@ghost
Copy link

ghost commented Dec 21, 2014

I have no objection to their removal. They were useful to me at one point, but not anymore.

Snuffleupagus added a commit that referenced this pull request Dec 23, 2014
Remove unused annotation highlight div
@Snuffleupagus Snuffleupagus merged commit 406b57f into mozilla:master Dec 23, 2014
@Snuffleupagus
Copy link
Collaborator

Thank you!

@timvandermeij timvandermeij deleted the annotation-rewrite-1 branch December 23, 2014 21:15
speedplane pushed a commit to speedplane/pdf.js that referenced this pull request Feb 24, 2015
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