Skip to content

Tweak the Bidi-detection heuristics for very short RTL strings (issue 11656) #14213

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

Merged
merged 1 commit into from
Nov 3, 2021

Conversation

Snuffleupagus
Copy link
Collaborator

Very short strings can narrowly miss the existing Bidi-detection threshold, leading to incorrect text-selection and copying behaviour.

In my testing, neither Adobe Reader or PDFium seem to handle copying "correctly" for this document. Hence it's not entirely clear to me that we actually want to fix this, since tweaking these heuristics can obviously cause regressions elsewhere (and our test coverage for RTL-text isn't exactly great).

@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 1

Live output at: http://54.241.84.105:8877/34c5b5f4cb7ab6c/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/34c5b5f4cb7ab6c/output.txt

Total script time: 4.55 mins

Published

Copy link
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

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

This seems reasonable, minimizes any risk and it also increases the test coverage for RTL text, so I'm in favor of doing this. r=me with passing tests; thank you!

@timvandermeij
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Nov 3, 2021

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/d432eafc84682de/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Nov 3, 2021

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/6f214fa6b2a48b9/output.txt

… 11656)

Very short strings can narrowly miss the existing Bidi-detection threshold, leading to incorrect text-selection and copying behaviour.

In my testing, neither Adobe Reader or PDFium seem to handle copying "correctly" for this document. Hence it's not entirely clear to me that we actually want to fix this, since tweaking these heuristics can *obviously* cause regressions elsewhere (and our test coverage for RTL-text isn't exactly great).
@pdfjsbot
Copy link

pdfjsbot commented Nov 3, 2021

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/d432eafc84682de/output.txt

Total script time: 23.13 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 7
  different first/second rendering: 2

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

@pdfjsbot
Copy link

pdfjsbot commented Nov 3, 2021

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/6f214fa6b2a48b9/output.txt

Total script time: 42.29 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 10
  different first/second rendering: 2

Image differences available at: http://54.193.163.58:8877/6f214fa6b2a48b9/reftest-analyzer.html#web=eq.log

@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@pdfjsbot
Copy link

pdfjsbot commented Nov 3, 2021

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/1d40311097a13dc/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Nov 3, 2021

From: Bot.io (Windows)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 1

Live output at: http://54.193.163.58:8877/0dfe869f44e52d8/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Nov 3, 2021

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/1d40311097a13dc/output.txt

Total script time: 2.86 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented Nov 3, 2021

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/0dfe869f44e52d8/output.txt

Total script time: 6.67 mins

  • Unit Tests: Passed

@Snuffleupagus Snuffleupagus merged commit e1a35e7 into mozilla:master Nov 3, 2021
@Snuffleupagus
Copy link
Collaborator Author

/botio makeref

@pdfjsbot
Copy link

pdfjsbot commented Nov 3, 2021

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/f684c3cef106bcc/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Nov 3, 2021

From: Bot.io (Windows)


Received

Command cmd_makeref from @Snuffleupagus received. Current queue size: 1

Live output at: http://54.193.163.58:8877/b0a7c0a5dc1bab4/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Nov 3, 2021

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/f684c3cef106bcc/output.txt

Total script time: 20.75 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

@pdfjsbot
Copy link

pdfjsbot commented Nov 3, 2021

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/b0a7c0a5dc1bab4/output.txt

Total script time: 38.88 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

@Snuffleupagus Snuffleupagus deleted the issue-11656 branch November 3, 2021 21:54
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.

Parenthesis with hebrew text not rendering in the correct way
3 participants