Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Unified Diff: LayoutTests/animations/resources/animation-test-helpers.js

Issue 23241010: Support subpixel values for text-shadow and box-shadow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed review comments Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/animations/resources/animation-test-helpers.js
diff --git a/LayoutTests/animations/resources/animation-test-helpers.js b/LayoutTests/animations/resources/animation-test-helpers.js
index 271297b2f49f2f455de08f04e0cefeb0104e47b4..d7f6070712935f98ba6526e3969e7db75ba4ceda 100644
--- a/LayoutTests/animations/resources/animation-test-helpers.js
+++ b/LayoutTests/animations/resources/animation-test-helpers.js
@@ -310,8 +310,8 @@ function checkExpectedTransitionValue(expected, index)
// arbitrarily pick shadow-x and shadow-y
if (property == 'box-shadow' || property == 'text-shadow') {
var text = computedStyle[i].cssText;
- // Shadow cssText looks like "rgb(0, 0, 255) 0px -3px 10px 0px"
- var shadowPositionRegExp = /\)\s*(-?\d+)px\s*(-?\d+)px/;
+ // Shadow cssText looks like "rgb(0, 0, 255) 0px -3px 10px 0px" and can be fractional.
+ var shadowPositionRegExp = /\)\s*(-?[\d.]+)px\s*(-?[\d.]+)px/;
var match = shadowPositionRegExp.exec(text);
var shadowXY = [parseInt(match[1]), parseInt(match[2])];
values.push(shadowXY[0]);

Powered by Google App Engine
This is Rietveld 408576698