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

Change the getVisibleElements helper function to take a parameter object #12572

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

Given the number of parameters, and the fact that many of them are booleans, the call-sites are no longer particularly easy to read and understand. Furthermore, this slightly improves the formatting of the JSDoc-comment, since it needed updating as part of these changes anyway.

Finally, this removes an unnecessary numViews === 0 check from getVisibleElements, since that should be very rare and more importantly that the binarySearchFirstItem function already has a fast-path for that particular case.

…bject

Given the number of parameters, and the fact that many of them are booleans, the call-sites are no longer particularly easy to read and understand. Furthermore, this slightly improves the formatting of the JSDoc-comment, since it needed updating as part of these changes anyway.

Finally, this removes an unnecessary `numViews === 0` check from `getVisibleElements`, since that should be *very* rare and more importantly that the `binarySearchFirstItem` function already has a fast-path for that particular case.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Nov 4, 2020

From: Bot.io (Windows)


Received

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

Live output at: http://3.101.106.178:8877/5059468b68a4658/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Nov 4, 2020

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/b107286410dd485/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Nov 4, 2020

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/b107286410dd485/output.txt

Total script time: 25.03 mins

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

Image differences available at: http://54.67.70.0:8877/b107286410dd485/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

pdfjsbot commented Nov 4, 2020

From: Bot.io (Windows)


Failed

Full output at http://3.101.106.178:8877/5059468b68a4658/output.txt

Total script time: 28.92 mins

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

Image differences available at: http://3.101.106.178:8877/5059468b68a4658/reftest-analyzer.html#web=eq.log

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Nov 4, 2020

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/0e5f3fd8b6ebfd9/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Nov 4, 2020

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/0e5f3fd8b6ebfd9/output.txt

Total script time: 4.05 mins

Published

@timvandermeij timvandermeij merged commit 8b652d6 into mozilla:master Nov 4, 2020
@timvandermeij
Copy link
Contributor

Thanks! I really like this improvement.

@Snuffleupagus Snuffleupagus deleted the getVisibleElements-object branch November 5, 2020 08:57
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