ignatenkobrain / gnome-news

GNU General Public License v3.0
20 stars 7 forks source link

Resize images that are too large #71

Closed mcatanzaro closed 8 years ago

mcatanzaro commented 8 years ago

Test case: add my blog https://blogs.gnome.org/mcatanzaro/feed/ and view the article "Mozilla is responsible for the redhat.corpmerchandise.com fiasco"... scroll down until you see huge images that are cut off.

This PR adds a web extension, a shared object dlopened by the web process, to allow manipulating the DOM, and shrinks images that are too big.

Downside: since the web extension has to be written in native code (well, unless you know a way to compile Python into a shared library?); this means autogen/configure take 500x longer to run now (for AC_PROG_CC and libtool) and generates a bunch of autocrap (which I have added to gitignorefiles).

P.S. I added a requirement on Automake 1.14 since I didn't want to use obsolete AM_PROG_CC_C_O and since nobody will try to build News with older Automake and since you already require way new autoconf-archive anyway! This means AM_SILENT_RULES can be used unconditionally.

P.S. 2: There is a workaround for a python-gi bug included. I probably won't bother to file a bug, since I hadn't used python-gi until today, but if you want to, I can get you a nice backtrace.

mcatanzaro commented 8 years ago

I think the circleci container needs libtool installed.

ignatenkobrain commented 8 years ago

Would be great to have backtrace, but anyway merged ;) Looks very good! Thank you!

mcatanzaro commented 8 years ago

Hm, we need something smarter to handle screenshots that are not aligned to the left-hand side of the page....