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

[TextLayer] Immediately set the padding, rather than checking if it's empty, in expandTextDivs #11586

Merged
merged 1 commit into from
Feb 12, 2020

Conversation

Snuffleupagus
Copy link
Collaborator

In practice it's extremely rare[1] for the padding to be zero in all components, hence it seems better to just set it directly rather than creating a temporary variable and checking for the "no padding"-case.


[1] In the tracemonkey.pdf file that only happens with 0.08% of all text elements.

… empty, in `expandTextDivs`

In practice it's extremely rare[1] for the padding to be zero in *all* components, hence it seems better to just set it directly rather than creating a temporary variable and checking for the "no padding"-case.

---
[1] In the `tracemonkey.pdf` file that only happens with `0.08%` of all text elements.
@brendandahl
Copy link
Contributor

Was there a specific PDF that this was added for?

@Snuffleupagus
Copy link
Collaborator Author

Was there a specific PDF that this was added for?

Don't think so, it's probably just a case of a premature optimization.
(Also, this is only relevant for the "enhanced" text-selection mode which is still disabled by default.)

@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

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/1a8430f32416a6a/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/83b0cd0e6e5441d/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.215.176.217:8877/83b0cd0e6e5441d/output.txt

Total script time: 2.20 mins

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

Image differences available at: http://54.215.176.217:8877/83b0cd0e6e5441d/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/1a8430f32416a6a/output.txt

Total script time: 20.16 mins

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

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

@brendandahl
Copy link
Contributor

/botio-window test

Copy link
Contributor

@brendandahl brendandahl left a comment

Choose a reason for hiding this comment

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

r+ if the windows bot runs okay

@brendandahl
Copy link
Contributor

/botio-windows test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/cce30b17ebeb421/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.215.176.217:8877/cce30b17ebeb421/output.txt

Total script time: 26.93 mins

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

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

@timvandermeij timvandermeij merged commit 993a1d7 into mozilla:master Feb 12, 2020
@timvandermeij
Copy link
Contributor

Looks good to me!

@Snuffleupagus Snuffleupagus deleted the expandTextDivs-padding branch February 13, 2020 09:07
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