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

Clarify invisible text #29

Closed
npm1 opened this issue May 24, 2018 · 10 comments
Closed

Clarify invisible text #29

npm1 opened this issue May 24, 2018 · 10 comments
Assignees
Milestone

Comments

@npm1
Copy link
Contributor

npm1 commented May 24, 2018

The Paint Timing API says that a paint occurs when the browser has rendered pixels to the screen. Invisible text and whitespaces technically do not cause pixels to be rendered in the screen, but the text can still be highlighted or searched and this would probably cause pixels to be rendered in the screen. It's also not super clear to me how easy it is for browsers to keep track of all invisible text and differentiate it with visible text. The spec should probably clarify whether this kind of text triggers a First Paint and/or a First Contentful Paint. Also, explicit tests should be added to test the behavior when only this kind of text is rendered in a frame.

@tdresser @spanicker let's first agree on what should happen and then I'll send PRs and tests?

@tdresser
Copy link
Contributor

We might just have to leave it vague. We should probably spec that FP & FCP should behave the same with respect to invisible text though?

@igrigorik
Copy link
Member

@npm1 what is our behavior today in Chrome?

@npm1
Copy link
Contributor Author

npm1 commented May 25, 2018

The following is exposed in Chrome:

  • &nbsp: first-paint

  • visibility: hidden 'a': first-paint, first-contentful-paint

  • visibility: hidden &nbsp: nothing

@igrigorik
Copy link
Member

Sorry, I meant.. How does Chrome react in response to invisible text? E.g. if I create page with nothing but text on it and a webfont that takes forever to load, what would FP / FCP tell me today?

@npm1
Copy link
Contributor Author

npm1 commented May 25, 2018

I think the spec says that even First Contentful Paint "includes text with pending webfonts" (but I haven't confirmed Chrome's behavior).

@igrigorik igrigorik added this to the Level 1 milestone May 25, 2018
@irori
Copy link

irori commented Jun 19, 2018

It seems Chrome triggers FP and FCP on invisible text:
http://output.jsbin.com/lipuzewube/2/quiet

@tdresser
Copy link
Contributor

Next step: find a list of cases where we run into whitespaces causing these metrics to fire early.

@toddreifsteck
Copy link
Member

Discussed at TPAC 2018:

  • We agreed that the critical issues are important to specify.
  • @tdresser @npm1 @rniwa will review data to determine important white space add to the spec then bring proposal back.

@npm1
Copy link
Contributor Author

npm1 commented Mar 10, 2020

I think this will be fixed with #66

@noamr
Copy link
Contributor

noamr commented Mar 23, 2020

Can we close this? @npm1

@npm1 npm1 closed this as completed Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants