Mobile support in MediaWiki core

Rationale
By default, MediaWiki does not offer mobile device-specific support, making MediaWiki sites very difficult to use on mobile devices. This has been mitigated in many ways by Extension:MobileFrontend, however there is much to be gained by building native mobile support into MediaWiki core. Such as:


 * Increased performance
 * A better framework for other extensions to make mobile-specific features
 * Out-of-the-box mobile support for MediaWiki sites
 * A present and future-ready device-agnostic core that can display data in a multitude of different ways, increasing MediaWiki's flexibility
 * Greater developer and end-user support by increasing exposure to mobile-specific issues

Timeline

 * Move 'mobileaction' features in MobileFrontend to be powered by special pages (to later be reused in core, with the initial benefit of improving MobileFrontend performance and maintainability) - End of April, 2012
 * Have current DOM parsing mechanism of MobileFrontend make greater use of memcached and the native parser cache - End of April, 2012
 * Move DOM Parsing mechanism into MediaWiki core - mid-May, 2012
 * Make MediaWiki core context/device aware - End of June, 2012
 * Offer device-specific skins - End of June, 2012
 * Migrate from using DOM parsing for mobile contexts to the native MediaWiki parser - The future (pending collaboration with VisualEditor team).

Brainstorming notes
Brion's dream: One codebase to do everything except WAP

Parser conversion
DOM parser currently just strips out things that sould not be present in a mobile view
 * THIS SOULD BE REEVALUATED - are we stripping out the right elements? too many elements?

VisualEditor is going to result in core parser changes (Gabriel working on that?)
 * No idea about timeline (October-ish range?)
 * Can we work with them to make sure they're doing it right and/or get stuff migrated in as they go?

Parser changes are less cut-and-dry than DOM parser, so it's a little scarrier and will probably have a lot of edgey cases

Skinning

 * Can we extend existing skin?
 * Does it make more sense to have one mobile skin? Or let skins support mobile-stuff?
 * Mobile 'fallback' skin?

Special pages

 * Moving actions etc over to special pages will alleviate a lot of current pain points

Etc

 * Make Mediawiki aware of context (mobile or not)
 * for delivering proper URLs
 * Would enable more flexible mobile-specific URL construction
 * eg perhaps with a post-processing hook
 * for resource loading
 * view-related stuff like skin, blah
 * perhaps start by moving dom-parser into core and rely on memcache, rely on key from parser cache