Commit graph

4 commits

Author SHA1 Message Date
Kunal Mehta
f63bbdeb08 Fix phpcs warning and errors in includes/resourceloader
Mainly breaking long lines

Change-Id: Ide37c81d156348cfb8a010043d79eaf80f95fded
2015-03-14 18:52:45 -07:00
Bryan Davis
1157312f1e Guard against unset key access in ResourceLoaderImageModule
Seen in production error logs:
  Undefined index: icon in ResourceLoaderImageModule.php on line 162
  Undefined index: icon in ResourceLoaderImageModule.php on line 185

Change-Id: I44e16563bda2dcc0be3c9694ed2b09d20b3d7468
2015-01-09 18:58:46 +00:00
jdlrobson
4cd748a006 ResourceLoaderImageModule: Allow use on mobile
Change-Id: Ic7913aa1a1e1fb8d3742503cbe8a6cb3427fc826
2014-12-10 23:34:40 +00:00
Bartosz Dziewoński
aa00a3e838 ResourceLoaderImageModule for icons
ResourceLoaderImageModule needs a set of SVG files and some data in
the module definition, and produces styles for a set of CSS classes,
one for each image, optionally with differently colored variants,
generated in SVG and PNG, data-URI-embedded if possible, compatible
with all browsers, and generally slick.

The intended usage is to ship icon libraries with MediaWiki that can
be used throughout the pages with no additional code.

* ResourceLoaderImageModule implements all of the logic for data
  parsing and CSS generation.
* ResourceLoaderImage implements the logic for SVG image colorization
  (for variants) and rasterization.
* ResourceLoader and ResourceLoaderContext were extended to serve a
  new kind of load.php request that delivers a single image file. This
  is used for fallback PNG images served to browsers that don't
  understand SVG.

See change Ic6a76bfb for a demo.

Bug: T76473
Co-Authored-By: Trevor Parscal <trevorparscal@gmail.com>
Co-Authored-By: Bartosz Dziewoński <matma.rex@gmail.com>
Change-Id: Idf6ff4eb8e94f45946f15d283d34108b881fae6e
2014-12-09 20:11:07 +01:00