wiki.techinc.nl/tests/phpunit/includes
Brion Vibber 966cda2f80 Initial stab at responsive images for screen densities.
* adds $wgResponsiveImages setting, defaulting to true, to enable the feature
* adds 'srcset' attribute with 1.5x and 2x URLs to image links and image thumbs
* adds jquery.hidpi plugin to check pixel density and implement partial 'srcset' polyfill
** $.devicePixelRatio() returns window.devicePixelRatio, with compat fallback for IE 10
** $().hidpi() performs a 'srcset' polyfill for browsers with no native 'srcset' support
* adds mediawiki.hidpi RL script to trigger hidpi loads after main images load

Note that this is a work in progress. There will be places where this doesn't yet work which output their imgs differently. If moving from a low to high-DPI screen on a MacBook Pro Retina display, you won't see images load until you reload.

Confirmed basic images and thumbs in wikitext appear to work in Safari 6, Chrome 21, Firefox 18 nightly on MacBook Pro Retina display, and IE 10 in Windows 8 at 150% zoom, 200% zoom, and 140% and 180%-ratio Metro tablet sizes.

Internally this is still a bit of a hack; Linker::makeImageLink and Linker::makeThumbLink explicitly ask for 1.5x and 2x scaled versions and insert their URLs, if different, into the original thumbnail object which (in default handler) outputs the srcset. This means that a number of places that handle images differently won't see the higher-resolution versions, such as <gallery> and the large thumbnail on the File: description page.

At some point we may wish to redo some of how the MediaHandler stuff works so that requesting a single thumbnail automatically produces the extra sizes in all circumstances. We might also consider outputting a 'srcset' or multiple src sizes in 'imageinfo' API requests, which would make ApiForeignRepo/InstantCommons more efficient. (Currently it has to make three requests for each image to get the three sizes.)

Change-Id: Id80ebd07a1a9f401a2c2bfeb21aae987e5aa863b
2012-10-11 10:54:21 -07:00
..
api Merge branch 'Wikidata' into master. 2012-10-09 11:34:24 +02:00
cache Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
db Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
debug Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
filerepo Merge "[FileBackend] Tweaked TempFSFile::bind() to handle __get()." 2012-10-09 16:08:55 +00:00
GlobalFunctions Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
installer
json
libs Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
media Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
mobile Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
normal
parser Initial stab at responsive images for screen densities. 2012-10-11 10:54:21 -07:00
search Merge branch 'Wikidata' into master. 2012-10-09 11:34:24 +02:00
specials Fix test SpecialSearchTest.testSearchTermIsNotExpanded 2012-10-10 11:48:20 +02:00
upload Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
ArticleTablesTest.php Avoid deprecation warnings in test cases. 2012-08-28 16:00:39 +02:00
ArticleTest.php Merge branch 'Wikidata' into master. 2012-10-09 11:34:24 +02:00
BlockTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
CdbTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
ContentHandlerTest.php Cleanup of Wikidata branch. 2012-10-08 17:34:47 +02:00
CssContentTest.php Don't assume main namespace contains wikitext 2012-09-20 16:18:30 +02:00
DiffHistoryBlobTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
EditPageTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
ExternalStoreTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
ExtraParserTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
FauxResponseTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
FormOptionsInitializationTest.php
FormOptionsTest.php
HooksTest.php Fix behavior of Hooks class. 2012-10-08 13:45:58 +02:00
HtmlTest.php Fix HtmlTest, XmlTest; Add setMwGlobals method to base TestCase. 2012-10-09 00:26:52 +02:00
HttpTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
IPTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
JavascriptContentTest.php Don't assume main namespace contains wikitext 2012-09-20 16:18:30 +02:00
JsonTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
LanguageConverterTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
LicensesTest.php
LinksUpdateTest.php Merge branch 'Wikidata' into master. 2012-10-09 11:34:24 +02:00
LocalFileTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
LocalisationCacheTest.php Updated plural rules from CLDR 22 2012-09-17 16:59:29 +00:00
MessageTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
MWFunctionTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
MWNamespaceTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
ParserOptionsTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
PathRouterTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
PreferencesTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
Providers.php
RecentChangeTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
ResourceLoaderTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
RevisionStorageTest.php Merge branch 'Wikidata' into master. 2012-10-09 11:34:24 +02:00
RevisionStorageTest_ContentHandlerUseDB.php some cleanup and checks in the Revision class 2012-06-07 17:23:05 +02:00
RevisionTest.php Merge branch 'Wikidata' into master. 2012-10-09 11:34:24 +02:00
SampleTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
SanitizerTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
SanitizerValidateEmailTest.php
SeleniumConfigurationTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
SiteConfigurationTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
TemplateCategoriesTest.php merged master 2012-08-29 15:20:15 +02:00
TestUser.php Move api/ApiTestUser.php to TestUser.php and make available in MediaWikiTestCase class. 2012-09-13 18:40:23 +00:00
TimeAdjustTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
TimestampTest.php Merge branch 'Wikidata' into master. 2012-10-09 11:34:24 +02:00
TitleMethodsTest.php Merge branch 'Wikidata' into master. 2012-10-09 11:34:24 +02:00
TitlePermissionTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
TitleTest.php Merge branch 'Wikidata' into master. 2012-10-09 11:34:24 +02:00
UserTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
WebRequestTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
WikiPageTest.php Merge branch 'Wikidata' into master. 2012-10-09 11:34:24 +02:00
WikiPageTest_ContentHandlerUseDB.php Use integers for content_model and content_format. 2012-05-14 10:22:52 +02:00
WikitextContentHandlerTest.php Cleanup of Wikidata branch. 2012-10-08 17:34:47 +02:00
WikitextContentTest.php Cleanup of Wikidata branch. 2012-10-08 17:34:47 +02:00
XmlJsTest.php
XmlSelectTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
XmlTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00
ZipDirectoryReaderTest.php Clean and repair many phpunit tests (+ fix implied configuration) 2012-10-09 03:01:51 +02:00