Page MenuHomePhabricator

Drop SVG fallback support for Hovercards
Closed, ResolvedPublic

Description

Given http://caniuse.com/svg it looks like SVG is supported by all our grade A browsers (with exception of Android 2.x but given we only support this on mobile and hovercards only works on desktop this may be acceptable).
We should thus remove any fallback SVG rendering.

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 17 2016, 8:29 PM

Change 289088 had a related patch set uploaded (by Jdlrobson):
Drop support for non-SVG browsers

https://gerrit.wikimedia.org/r/289088

Jdlrobson triaged this task as Normal priority.May 19 2016, 5:14 PM
Jdlrobson added a project: Readers-Web-Backlog.
phuedx added a subscriber: phuedx.

^ From the commit message:

Note: untested! Better commit message to follow!

I'll continue reviewing and testing the change.

phuedx added a comment.EditedJun 1 2016, 5:19 AM

The following are screenshots from IE9, IE10, and IE11 on Windows 7 (via VirtualBox) respectively:

SVG clipping and masking is supported in IE9+ https://msdn.microsoft.com/library/bg124134(v=vs.85).aspx?tduid=(746b80363c478a6c952b9eff784481d2)(256380)(2459594)(TnL5HPStwNw-c0eADJB13fx.XNq5keTJNA)() so it looks as if mw.popups.render.renderers.article#createSvgImageThumbnail or a client of the method is broken. N.B. that this also affects master with mw.popups.supportsSVG set to true.

Edit

This behaviour was uncovered by 69fff17. If I'd tested it in IE9 and IE10/11 at the time, then I'd probably have caught it.

phuedx added a comment.EditedJun 1 2016, 5:48 AM

SVG clipping and masking is supported in IE9+ https://msdn.microsoft.com/library/bg124134(v=vs.85).aspx?tduid=(746b80363c478a6c952b9eff784481d2)(256380)(2459594)(TnL5HPStwNw-c0eADJB13fx.XNq5keTJNA)() so it looks as if mw.popups.render.renderers.article#createSvgImageThumbnail or a client of the method is broken.

Ah! We're using CSS clipping (barely supported) with a clip path defined in an SVG element.

mw.popups.createSVGMask doesn't work in IE9+. div#mwe-popups-svg is inserted into the DOM but has no children, i.e. no clip-paths are being defined.

Change 289088 merged by jenkins-bot:
Drop support for non-SVG browsers

https://gerrit.wikimedia.org/r/289088

Change 292131 had a related patch set uploaded (by Phuedx):
[WIP] Make SVG image clipping cross-browser

https://gerrit.wikimedia.org/r/292131

phuedx added a comment.EditedJun 1 2016, 1:39 PM

^ I tagged 292131: WIP Make SVG image clipping cross-browser with this task for posterity.

Change 292131 abandoned by Phuedx:
Make SVG image clipping cross-browser

Reason:
I was overzealous in my bug hunt.

https://gerrit.wikimedia.org/r/292131

phuedx added a comment.Jun 2 2016, 6:31 AM

After creating some better test pages this morning, it seems as if this work has uncovered a distinct bug. I'll report the bug shortly.

phuedx closed this task as Resolved.EditedJun 2 2016, 4:44 PM
phuedx claimed this task.

During my bug hunt I verified that SVGs render and are clipped in IE9, 10, and 11 on Windows 7 (via VirtualBox). I'm happy to sign this off.