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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp

Issue 2594493002: offset-rotate: Clamp rotation to float prior to assignment (Closed)
Patch Set: Created 4 years 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: third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
index 24da6892c3a0b9b62a186d07c05577175b692ce9..f0d69113ae10ac406ccee4ca68bdb68f130194e5 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
@@ -895,13 +895,13 @@ StyleOffsetRotation StyleBuilderConverter::convertOffsetRotate(
} else if (item->isIdentifierValue() &&
toCSSIdentifierValue(*item).getValueID() == CSSValueReverse) {
result.type = OffsetRotationAuto;
- result.angle += 180;
+ result.angle = clampTo<float>(result.angle + 180);
} else {
const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(*item);
- result.angle += primitiveValue.computeDegrees();
+ result.angle =
+ clampTo<float>(result.angle + primitiveValue.computeDegrees());
}
}
- result.angle = clampTo<float>(result.angle);
return result;
}

Powered by Google App Engine
This is Rietveld 408576698