mozilla / lightbeam-we

Web Extension version of the Firefox Lightbeam add-on
https://addons.mozilla.org/en-GB/firefox/addon/lightbeam/
Mozilla Public License 2.0
180 stars 61 forks source link

Increase favicon size relative to the circle radius #220

Closed Bilie closed 6 years ago

Bilie commented 7 years ago

Hi

This is aPR for issue #204 Looking forward to your feedback!

princiya commented 7 years ago

Thanks for the PR😊. At the moment i am travelling and have poor internet. Will get back in 2 days.

On 5 Oct 2017 02:31, "Biliana Valeva" notifications@github.com wrote:

Hi

This is aPR for issue #204 https://github.com/mozilla/lightbeam-we/issues/204 Looking forward to your feedback!

You can view, comment on, or merge this pull request online at:

https://github.com/mozilla/lightbeam-we/pull/220 Commit Summary

  • Increase favicon size relative to the circle radius

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mozilla/lightbeam-we/pull/220, or mute the thread https://github.com/notifications/unsubscribe-auth/AHpqpQAAOeGwVGvE6BCAFS8ugdYqPY9Tks5so_IbgaJpZM4PuOz9 .

jonathanKingston commented 7 years ago

Issue with the updates:

updates-favicon-lightbeam

The above happens when you load a google page, then load more like google images. The node increases in size over time whilst the users still has the Lightbeam tab open.

One side note is we don't want to request the image again which fixing this might lead to. Instead pick a max favicon size for convertURIToImageData and scale it to the right size when it is being drawn in drawFavicon.

Thanks for the PR!

Bilie commented 6 years ago

Hi, thank you very much for all your feedback! I just updated the PR, even though I am not sure this is what was expected. I have tried scaling down the image within putImageData, but then the image was just cropped. The only way I found scaling the image is when it is actually drawn with drawImage. The image now should be loaded once, but then the image is redrawn on the canvas in the correct size every time nodes are updated.

jonathanKingston commented 6 years ago

This appears not to have the perf issues before thanks @Bilie!