-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
Chrome Extension clashing with HiDPI canvas polyfill #1226
Comments
I'd be interested in seeing a reduced test case of that one. |
I'm not sure what's happening, but from what I can see, the first call to the Quick search over this repo indeed gives results while searching for https://github.com/EFForg/privacybadger/search?utf8=%E2%9C%93&q=fillText |
Also, bit context on the lib it self: The canvas is blurry on the retina displays. (Ha, go figure :) ) To solve that, there is this pollyfill that scales the cavas 2x, and then also overrides all the native canvas methods and just multiplies x/y coords with the pixel ratio (in case of rMBP 2) This gives sharp and clean graphics on the canvas. To my knowledge, this was first covered in this, now famous article: And later, good people of the Internet created that pollyfill that you just include on the page and it does everything automagically 👍 |
@kodi What I meant was a simplified code example on some public resource (plunker or codepend or whatever the cool kids use nowadays) that showed it breaking. I'm just a passerby (I just started following this repo yesterday looking for an opportunity to maybe help out) so I know about as much as you do, but this a bug that looks like it might be interesting (to me at least.) |
Sure, here is really simplified usecase (I used modified index.html from their repo): https://jsfiddle.net/kodisha/4xgjpgk6/ |
btw, i noticed obvious text difference, not sure about other elements. |
It is interesting. I can verify the bug. |
This seems like it is probably related to the fingerprinting monitoring. There is some canvas hacking in there. @roblarsen This would probably be a good place to start if you are interested https://github.com/EFForg/privacybadger/blob/master/src/fingerprinting.js#L154 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The method may be overridden again after we override, as is done in the `hidpi-canvas-polyfill`. So if we restore the method to the original as we see it, we'll wipe out the polyfill. Fixes EFForg#2657, EFForg#1226
Fixed in #2658, here's what's happening:
The fix is to check if you've been overridden before restoring your method. If you have, you can do a very slightly more costly optimization, where the function simply bails out every time it runs thereafter. |
The method may be overridden again after we override, as is done in the `hidpi-canvas-polyfill`. So if we restore the method to the original as we see it, we'll wipe out the polyfill. Fixes EFForg#2657, EFForg#1226
The method may be overridden again after we override, as is done in the `hidpi-canvas-polyfill`. So if we restore the method to the original as we see it, we'll wipe out the polyfill. Fixes EFForg#2657, EFForg#1226
HiDPI canvas polyfill is really famous and great library for HiDPI retina canvas support (if you don't use it you get blured canvas on retina/HiDPI screens)
Here is the explanation of what lib does:
http://jondavidjohn.github.io/hidpi-canvas-polyfill/
Here is the issue on their github:
jondavidjohn/hidpi-canvas-polyfill#29
I know many people that use this in their production code, it would be such a shame for them to experience this just by having this great extension, such the Privacy Badger is.
Chrome Version: 56.0.2924.87 (64-bit)
Please advise!
The text was updated successfully, but these errors were encountered: