Skip to content

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

Closed
@mqudsi

Description

@mqudsi
Contributor

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

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

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.

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

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

Seadragon91

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.

camelid

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.

ChrisDenton

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).

mqudsi

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.

ChrisDenton

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>
mqudsi

mqudsi commented on Sep 1, 2021

@mqudsi
ContributorAuthor

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

dbalcomb

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.

GuillaumeGomez

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.

dns2utf8

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.

29 remaining items

Loading
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

      Participants

      @mqudsi@dns2utf8@dbalcomb@GuillaumeGomez@ChrisDenton

      Issue actions

        Generated docs on long pages render text on top of itself · Issue #88545 · rust-lang/rust