Why is Microsoft contributing to WebKit?

Summary:If Apple and Google won't work on supporting the proposed W3C standards for touch in WebKit, then Microsoft will - to get it adopted on websites that will then work better on Windows and Windows Phone.

Last week Microsoft contributed "an early open source HTML5 Labs Pointer Events prototype of the W3C Working Draft" to WebKit. Wait, what?

The contribution to WebKit is part of a definite trend inside Microsoft to, yes, support open source

No, Microsoft isn't planning to dump IE, Chakra and the Trident rendering engine in favour of the otherwise ubiquitous WebKit rendering engine. What it's trying to do is get developers who optimise their mobile websites for Safari and WebKit to start using the HTML5 standards without vendor prefixes, so that IE10 users on Windows RT and Windows Phone get the same experience as iPhone and Android users, not a fallback site that tells you how awful IE is and how you should get a real browser instead.

WebKit-optimised sites are in danger of becoming the new IE6. A site that's optimised for WebKit probably uses the experimental, vendor-prefixed versions of what are now W3C HTML5 standards and IE can't render those. IE10 does pretty well at the actual W3C HTML5 standards, but web developers don't always bother putting those in because the -webkit prefix works just fine on the iPhone they tested the site with. Never mind that they could use a JavaScript library like Modernizr to get all the vendor prefixes plus the un-prefixed standard for browsers that support that, if they don't want to follow the fairly simple steps that Microsoft documented last month on the Windows Phone Developer blog, and check the results using free tools like Adobe's Browser Lab and Edge Inspect.

WebKit optimisation is so pervasive that there have been suggestions that other browsers should implement -webkit prefixes. That's a terrible idea because now you have multiple implementations of the same prefix and no guarantee they are the same (or have the same bugs). Far better for WebKit to get new W3C standards and for WebKit-optimising developers to implement those (using more than just the experimental -webkit prefix).

It must be frustrating for Microsoft. When it finally manages to do the substantial work to get IE up to date with the W3C standards that are stable enough not to change too much (relying on WebWorkers too early on caused a lot of frustration for developers; having box-direction change to flex-direction as the flexbox standard evolves is annoying but not a showstopper), the web developers who have been complaining for years that Microsoft doesn't support standards switch to complaining that Microsoft doesn't just use WebKit.

Hence the contribution to WebKit (which is also part of a definite trend inside Microsoft to, yes, support open source - like having a team supporting Node.js for Azure or making TypeScript open source or working with Hortonworks on Hadoop and the Samba team on Samba 4.0 interoperabilty with Active Directory).

This is Microsoft trying to push forward in an area on something that's hugely important for Windows 8; having websites work well with touch. Apple's touch events are very low level; you get the position of the fingers and the start, end and move events - not whether I was trying to pinch zoom on screen or drag something out of a window. The Pointer Events spec (which Microsoft proposed to the W3C) reports how fast the touch was moving and whether I was trying to pinch or rotate or drag. If the browser can tell the web developer all that, they can make a much more touch-friendly website.

The W3C Working Draft only came out last week, but it's going to need some help. Google has questioned whether you need to handle touch differently from a mouse; Pointer Events treats clicks and taps as the same thing, but it does handle touch differently - because we don't use our fingers quite the same way we do a mouse.

Microsoft is putting its code where its mouth is and giving WebKit a prototype implementation to start from

And Apple? Apple's touch events are a de facto standard but Apple doesn't seem to be interested in making them available in a royalty free way - which has to be true for a technology to be part of a W3C standard. So rather than just getting a W3C standard that other browsers don't implement, Microsoft is putting its code where its mouth is and giving WebKit a prototype implementation to start from.

If it gets from proof of concept to a -webkit command that web developers implement, it should be easy for them to include the Microsoft prefix and the unprefixed standard version in their code. And then those WebKit-optimised sites will work much better when you touch them on your Windows RT Surface or Windows 8 phone. So far, one of the Chromium engineers is at least kicking the tyres on the Microsoft patch.

That's the theory - and it's a very different way for Microsoft to engage with standards and the developer community. It's slightly different from the way it approached DNT (which was to support it so enthusiastically that the advertisers threw up their hands in horror, leading to so little progress that the FTC has turned to investigating the web tracking companies themselves). Either way, this isn't the comfortably fallen-behind IE that you can safely mock and ignore any more.

Topics: Microsoft, Browser, Open Source, Web development, Windows, Windows 8

About

Mary Branscombe is a freelance tech journalist. Mary has been a technology writer for nearly two decades, covering everything from early versions of Windows and Office to the first smartphones, the arrival of the web and most things inbetween.

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Related Stories

The best of ZDNet, delivered

You have been successfully signed up. To sign up for more newsletters or to manage your account, visit the Newsletter Subscription Center.
Subscription failed.