Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSkip explicit level computation when possible. #5
Conversation
If the text is all one direction or contains no explicit formatting characters, just set everything to the same level. This is based on the `flags` variable in Gecko's nsBidi class.
|
|
bors-servo
pushed a commit
that referenced
this pull request
Jul 21, 2015
Handle multiple paragraphs in input text. I thought this wasn't needed for Servo, since paragraphs in HTML are (normally) based on markup, so Servo can usually just process one paragraph at a time. However, for preformatted text, the bidi algorithm must handle multiple paragraphs in a single inline flow. The important changes here are in `process_text` and `initial_scan`. Most of the other changes are just renaming variables and functions to make sense in a multi-paragraph world. `process_text` no longer returns the max embedding level. This was intended for optimizations, but wasn't actually useful in Servo. An approach like #5 can provide a replacement for this optimization. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/unicode-bidi/12) <!-- Reviewable:end -->
|
This needs a rewrite. Closing the PR for now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
mbrubeck commentedJun 10, 2015
If the text is all one direction or contains no explicit formatting characters, just set everything to the same level. This is based on optimizations using the
flagsvariable in Gecko's nsBidi class. r? @SimonSapin