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

dark outline around links on cnet.com #2595

Closed
nical opened this issue Mar 30, 2018 · 2 comments
Closed

dark outline around links on cnet.com #2595

nical opened this issue Mar 30, 2018 · 2 comments
Labels

Comments

@nical
Copy link
Collaborator

@nical nical commented Mar 30, 2018

On this page: https://www.cnet.com/news/mozilla-open-source-firefox-move-helped-rewrite-tech-rules-anniversary/ the links have some sort of thin dark outline around them which looks like a sampling artifact. It was reproduced on linux and mac in the latest firefox nightly.

@nical nical added the type: bug label Mar 30, 2018
@glennw
Copy link
Member

@glennw glennw commented Apr 4, 2018

Here is a minimal repro:

---
root:
  items:
    - type: box-shadow
      bounds: [ 56.4833374023438, 50, 81, 25 ]
      color: black
      clip-mode: inset
      offset: 0 -4

I haven't confirmed, but I believe this will be an instance of this bug #2501.

The bounds of the shadow are on a sub-pixel boundary, which is getting snapped to a device pixel. However, as per the bug above, the clip mask generation doesn't correctly deal with device snapping in this case.

Note to self: if this was being segmented, the problem would disappear - the segment builder logic eliminates the need for a clip mask, resulting in correct rendering. In this case we don't select segment building, since the area of the primitive is too small - we might want to revisit this heuristic, since in this case segmenting is probably worth it, to save a clip mask being generated. We still need to fix the clip snapping logic above though.

@glennw
Copy link
Member

@glennw glennw commented Apr 4, 2018

This will be fixed when #2608 lands.

glennw pushed a commit to glennw/webrender that referenced this issue Apr 5, 2018
Previously, all ClipOut items would result in a clip mask being
generated. As we start to use ClipOut mode more often, it makes
sense to handle this natively in the segment builder and avoid
generating a clip-mask at all, where possible.

Fixes servo#2595.
Fixes servo#2501.
glennw pushed a commit to glennw/webrender that referenced this issue Apr 6, 2018
Previously, all ClipOut items would result in a clip mask being
generated. As we start to use ClipOut mode more often, it makes
sense to handle this natively in the segment builder and avoid
generating a clip-mask at all, where possible.

Fixes servo#2595.
Fixes servo#2501.
@bors-servo bors-servo closed this in 076b443 Apr 6, 2018
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
2 participants
You can’t perform that action at this time.