CSSMin: Support parenthesis and quotes in url references
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 4 May 2017 02:54:52 +0000 (19:54 -0700)
committerKrinkle <krinklemail@gmail.com>
Fri, 5 May 2017 18:33:24 +0000 (18:33 +0000)
commitbb36c7b32acfcad09b9405fe2c3baa1a33deb1e8
treee4b3d114494b00d8652bf2d97f6d5d52137595cb
parent0ec9359653864e19a733775c00c00a2b03c64bfe
CSSMin: Support parenthesis and quotes in url references

Previously they were often being cut short due to the url pattern
ending at the first single quote, double quote or closing parenthesis
regardless of which of those started the url match.

Running benchmarkCSSMin.php before and after the change doesn't seem
produce consistent improvement or regression. Repeated runs with count=100
with and without this change both have a median between 2.6ms and 2.9ms
using PHP 5.6, and between 2.6ms and 2.8ms using HHVM 3.12.

Bug: T60473
Change-Id: I6d6a077ad76588f3ed81b1901a26b7e56d2157ee
includes/libs/CSSMin.php
tests/phpunit/includes/libs/CSSMinTest.php