Skip to content

Generated docs on long pages render text on top of itself #88545

Closed

Description

@mqudsi

I hope this is the right repo to report this, I wasn't sure if it should go in the main rust repo instead.

The generated docs for pages with a crazy number of items seem to give up on positioning and then just dump all subsequent entries on the same line past a certain point. It looks like it might be related to hardware acceleration, but I'm not sure.

For example, viewing https://doc.rust-lang.org/beta/core/arch/arm/index.html in Chrome 92 on Windows and hitting ctrl+pgdwn to go to the very bottom shows this:

image

Activity

  1. transferred this issue fromrust-lang/docs.rson Aug 31, 2021
  2. added
    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
    on Aug 31, 2021
  3. jyn514 commented on Aug 31, 2021

    @jyn514
    Member

    @mqudsi no worries - rustdoc is used for both docs.rs and the main doc.rust-lang.org website, but docs.rs doesn't have control over the main site.

  4. added
    A-rustdoc-uiArea: Rustdoc UI (generated HTML)
    C-bugCategory: This is a bug.
    on Aug 31, 2021
  5. jyn514 commented on Aug 31, 2021

    @jyn514
    Member

    I can't reproduce this on mobile Chrome though - maybe it's related to the screen size?
    Screenshot_20210831-161236

  6. Seadragon91 commented on Sep 1, 2021

    @Seadragon91

    Can confirm that problem on my PC in Edge.
    Also on my smartphone in Edge and Chrome, I need to change the view of the website to "Desktop website" then I see it there too.

  7. camelid commented on Sep 1, 2021

    @camelid
    Member

    I can't reproduce this in Firefox on macOS, but I can in Chrome on macOS. So I'm guessing it's a bug specific to Blink because I think Chrome and Edge both use Blink, whereas Firefox does not.

  8. ChrisDenton commented on Sep 1, 2021

    @ChrisDenton
    Member

    It seems to be a bug with Blink's grid implementation. If I turn off the display: grid style it works (but obviously changes the layout).

  9. mqudsi commented on Sep 1, 2021

    @mqudsi
    ContributorAuthor

    It seems to be a bug with Blink's grid implementation. If I turn off the display: grid style it works (but obviously changes the layout).

    I’m not saying it’s not grid, but just pointing out that changing the display completely changes the layout and so may avoid the problem even if it’s something else. In theory, anyway.

  10. ChrisDenton commented on Sep 1, 2021

    @ChrisDenton
    Member

    Fair point. A minimal test case appears to show the same issue but I'll admit that does not necessarily determine the root cause:

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Test display grid with lots of children</title>
    </head>
    
    <body style="display: grid;">
    <script>
    for (let i = 0; i < 600; i++) {
        document.write(`<div>Testing</div>`);
        document.write(`<div>Overtype</div>`);
    }
    </script>
    </body></html>
  11. mqudsi commented on Sep 1, 2021

    @mqudsi
    ContributorAuthor

    I think your test case confirms the cause, at least from a black box perspective, sufficiently ;)

  12. dbalcomb commented on Sep 6, 2021

    @dbalcomb

    It looks like this issue was previously reported here and there are some relevant links towards the end. Notably a confirmation that there is currently a 1000 row limit to grids in Blink. There is also a recent reddit thread on the issue.

  13. GuillaumeGomez commented on Sep 8, 2021

    @GuillaumeGomez
    Member

    Do you have an idea @dns2utf8 ? The best would be to not use grid at all. If you have no idea, I'll send a fix in the next coming days.

  14. dns2utf8 commented on Sep 9, 2021

    @dns2utf8
    Contributor

    I can confirm this with Chromium 93 and IE Edge 91.
    I tried adding a <br> after the grid-layout (works with floats sometimes) but will try some more.

    It works with Firefox 91 and 92 so I assume it is a chrome render-engine bug.

  15. 9 remaining items

  16. dns2utf8 commented on Sep 9, 2021

    @dns2utf8
    Contributor

    In the upcoming CSS Grid-2 spec (https://www.w3.org/TR/css-grid-2/#overlarge-grids) there is this sentence:

    ...  in the range [-10000, 10000]), dropping all lines outside that limit.
    

    So we would run into trouble if a table gets longer than 10k entries.

    However:

    ... if a UA only supported grids with at most 1000 tracks in each dimension, the following placement properties:
      grid-row:
      grid-column:
    

    To me the spec reads as, the UA (User Agent aka Browser) is free to enforce lower limits if there is not enough memory available.

    I would like to look at the display: table* because that would allow us to keep the automatic layout switching on mobile (and support for it looks good) https://caniuse.com/?search=table

  17. added a commit that references this issue on Sep 10, 2021
  18. added 2 commits that reference this issue on Sep 11, 2021
  19. jyn514 commented on Sep 15, 2021

    @jyn514
    Member

    This was fixed by #88776, right?

  20. GuillaumeGomez commented on Sep 15, 2021

    @GuillaumeGomez
    Member

    I'm waiting for #88816 before closing it.

  21. camelid commented on Sep 16, 2021

    @camelid
    Member

    @GuillaumeGomez Can you add Closes <this issue number> to the PR description then, to make sure the issue is closed on merge?

  22. added 2 commits that reference this issue on Oct 5, 2021
    117270d
    52d3afa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions