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

Use a rope for text storage inside of TextRun #119

Closed
burg opened this issue Oct 13, 2012 · 3 comments
Closed

Use a rope for text storage inside of TextRun #119

burg opened this issue Oct 13, 2012 · 3 comments

Comments

@burg
Copy link

@burg burg commented Oct 13, 2012

Right now, we simply copy all transformed text into a really long string, then put it into the TextRun. It should be possible to make a rope by transferring ownership of nonzero transformed strings, and do no copying.

@burg
Copy link
Author

@burg burg commented Oct 19, 2012

On second thought, this is not so easy.

We need to be able to do the equivalent of str::char_range_at on a Rope in order to implement TextRun::range_is_trimmable_whitespace. Currently, there is no (easy) way to start iterating characters from a specific byte index.

We also need some equivalent functionality for str::find_from, as well as iterating over all leaves specified by a byte Range. For example, this is needed to add a subset of utf8 data to the shaper buffer.

@burg
Copy link
Author

@burg burg commented Oct 29, 2012

This seems infeasible, as ropes are not sendable, and long term we want to put TextRuns into ARCs or cache them per-task. Also, ropes need some more user-friendly APIs (as noted above)

@burg
Copy link
Author

@burg burg commented Nov 22, 2012

Closing since there isn't much win to be had. Once text is shaped, its properties are queried from the GlyphStore, rather than the raw text.

@burg burg closed this Nov 22, 2012
glennw added a commit to glennw/servo that referenced this issue Jan 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.