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

Display items with off-screen positions that are translated to be on-screen incorrectly culled out #262

Closed
pcwalton opened this issue Apr 16, 2016 · 4 comments
Labels

Comments

@pcwalton
Copy link
Collaborator

@pcwalton pcwalton commented Apr 16, 2016

Test case:

<!DOCTYPE html>
<div style="transform: translateX(-2000px)">
    <div style="position: absolute; top: 0; left: 2000px;">X</div>
</div>

This breaks http://apple.com/.

@pcwalton pcwalton added the type: bug label Apr 16, 2016
@daoshengmu
Copy link

@daoshengmu daoshengmu commented Jul 9, 2016

I can help investigate. I notice the below test case is wrong as well.

<div style="transform: translateX(0px)">
    <div style="position: absolute; top: 0; left: 0px;">X</div>
</div>
@daoshengmu
Copy link

@daoshengmu daoshengmu commented Jul 14, 2016

I think I have fixed the first test case via this way at frame::add_items_to_target():

let rect = info.world_transform.transform_rect(&item.rect
                  .translate(&info.offset_from_current_layer));

Because it forgets to append the world transform from it parent. I have checked http://apple.com/ that works well.

The test case of left: 0px; is another case that the letter x is clipped. Probably there is something wrong on the scissor test. I will follow up for this.

@pcwalton Do you think it is ok for me to send a PR?

@tschneidereit
Copy link

@tschneidereit tschneidereit commented Jul 14, 2016

@daoshengmu, if you already have a patch that fixes the issue for you, it's best to just open a PR. If something's wrong about it, then that can be discussed in the PR itself instead of here. This way, you don't need to wait for a response here and then again in the PR after you opened it.

@glennw
Copy link
Member

@glennw glennw commented Aug 8, 2016

No longer an issue in WR2.

@glennw glennw closed this Aug 8, 2016
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
4 participants
You can’t perform that action at this time.