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

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: all working! Created 7 years, 1 month 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 d062c4ee7b0067a0568d364e57e9b75817720f06..79f31d0d7e3bfca66997e1d3b5a78995e42caf7a 100644
--- a/LayoutTests/animations/resources/animation-test-helpers.js
+++ b/LayoutTests/animations/resources/animation-test-helpers.js
@@ -386,8 +386,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