Split BitmapHandler into two classes.
authorBrian Wolff <bawolff+wn@gmail.com>
Wed, 9 Jul 2014 20:03:31 +0000 (17:03 -0300)
committerBrian Wolff <bawolff+wn@gmail.com>
Sun, 14 Sep 2014 22:10:37 +0000 (22:10 +0000)
commit757a70ae0a94f8a25034e9cd28e71edd7087a3b2
tree16ff0168e37d906651e5ce18fcc477bd968fbb3a
parentb82a8a080a4fdff6abd36290ff77f583a363127a
Split BitmapHandler into two classes.

BitmapHandler has a lot of generic-ish functionality that could
be re-usable by extension classes (Such as how it organizes
$scalerParams array, or various image magick escaping methods).
However it's combined with a lot of very format specific things,
such as the shell-out call to image magick.

Try to separate out the more generic stuff into
TransformationalImageHandler. In order to do this, I also made
canRotate, autoRotateEnabled, and getScalerType non-static. No
extensions in our repo appeared to be using these methods, and they
don't really make sense to be static (imo).

In particular, I think code duplication can be reduced in
PagedTiffHandler by extending this new class. See comments
on I1b9a77a4a56eeb65.

Change-Id: Id3a8b25a598942572cb5791a95e86054d7784961
includes/AutoLoader.php
includes/media/Bitmap.php
includes/media/ExifBitmap.php
includes/media/MediaHandler.php
includes/media/TransformationalImageHandler.php [new file with mode: 0644]
includes/media/XCF.php
includes/resourceloader/ResourceLoaderStartUpModule.php
includes/specials/SpecialUpload.php
tests/phpunit/includes/media/ExifRotationTest.php