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

Implement text-emphasis handling #17715

Open
Gankra opened this issue Jul 13, 2017 · 10 comments
Open

Implement text-emphasis handling #17715

Gankra opened this issue Jul 13, 2017 · 10 comments

Comments

@Gankra
Copy link
Contributor

@Gankra Gankra commented Jul 13, 2017

https://developer.mozilla.org/en-US/docs/Web/CSS/text-emphasis

  • stylo already handles it (because gecko does)
  • webrender doesn't need anything to handle it

The layout code just needs to grab the info from stylo, figure out the positioning of the glyphs, and emit a TextDisplayItem into its DisplayList.

I have marked off where text-emphasis marks should (potentially) be emitted in this PR: #17675.

@Gankra
Copy link
Contributor Author

@Gankra Gankra commented Jul 13, 2017

I guess one subtlety is that text-emphasis marks require space so you may need to adjust the whole text's baseline(?) to make room.

@njskalski
Copy link
Contributor

@njskalski njskalski commented Aug 7, 2017

Don't assign me yet, but I plan to give it a look.

@NeverHappened
Copy link
Contributor

@NeverHappened NeverHappened commented Aug 13, 2017

Hi! Can you assign me? I'm not a contributor yet though

@KiChjang
Copy link
Member

@KiChjang KiChjang commented Aug 13, 2017

@askalski Have you begun working on this issue? Would it be OK for @NeverHappened to start working on it?

@NeverHappened
Copy link
Contributor

@NeverHappened NeverHappened commented Aug 22, 2017

I've done some work on this issue and have questions. Where can I ask them? In IRC? Who should I talk to?

@jdm
Copy link
Member

@jdm jdm commented Aug 22, 2017

IRC or here are fine choices, especially if you don't end up receiving a response on IRC.

@NeverHappened
Copy link
Contributor

@NeverHappened NeverHappened commented Aug 23, 2017

  1. Why do we need this feature? As I understand, only Firefox has it :)
  2. As I understand, the text emphasis should be at the top and be 50% of the size of the base text. But I can't find any code that is able to scale/clone the TextDisplayItem, or easily generate new one? Does this require a lot of new code?
@jdm
Copy link
Member

@jdm jdm commented Aug 23, 2017

  1. It's a CSS standard, and supported by Safari according to http://caniuse.com/#feat=text-emphasis .
  2. @mrobinson is this a question you can answer?
@mrobinson
Copy link
Member

@mrobinson mrobinson commented Aug 24, 2017

@NeverHappened Any reason you need to clone the TextDisplayItem rather than just creating a new one with the properties calculated for the emphasis?

@NeverHappened
Copy link
Contributor

@NeverHappened NeverHappened commented Aug 24, 2017

@mrobinson No, no reason. I have issues because the code for generating display item is in the building display list phase, but the calculating text properties is done long before that.

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
6 participants
You can’t perform that action at this time.