Commit 4408fb81 authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

Revert "Verify if crbug.com/996037 has been fixed"

This reverts commit 0a8524d2.

Reason for revert: Reverting CHECKs back to DCHECKs in the next version

Original change's description:
> Verify if crbug.com/996037 has been fixed
> 
> This patch turns a DCHECK into CHECK to verify if the DCHECK is still
> hit on production builds.
> 
> This patch will be landed into version 3903, and will be reverted in
> the next version.
> 
> Bug: 996037
> Change-Id: Ice5237e9a0761b991425b1dbe402350a6ddd9b86
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1784161
> Reviewed-by: Emil A Eklund <eae@chromium.org>
> Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#693371}

TBR=eae@chromium.org,xiaochengh@chromium.org,srinivassista@chromium.org

Change-Id: I46ca89b68b901d0d86cc03a61ea851e2bdc8fdae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 996037
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1787031Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693885}
parent b5e29e07
...@@ -138,22 +138,23 @@ void CSSLengthInterpolationType::ApplyStandardPropertyValue( ...@@ -138,22 +138,23 @@ void CSSLengthInterpolationType::ApplyStandardPropertyValue(
Length length = To<InterpolableLength>(interpolable_value) Length length = To<InterpolableLength>(interpolable_value)
.CreateLength(conversion_data, value_range_); .CreateLength(conversion_data, value_range_);
if (LengthPropertyFunctions::SetLength(CssProperty(), style, length)) { if (LengthPropertyFunctions::SetLength(CssProperty(), style, length)) {
// TODO(crbug.com/996037): Turn this block into DCHECK in version 3904 #if DCHECK_IS_ON()
// Assert that setting the length on ComputedStyle directly is identical to // Assert that setting the length on ComputedStyle directly is identical to
// the StyleBuilder code path. This check is useful for catching differences // the StyleBuilder code path. This check is useful for catching differences
// in clamping behaviour. // in clamping behaviour.
Length before; Length before;
Length after; Length after;
CHECK(LengthPropertyFunctions::GetLength(CssProperty(), style, before)); DCHECK(LengthPropertyFunctions::GetLength(CssProperty(), style, before));
StyleBuilder::ApplyProperty(GetProperty().GetCSSProperty(), state, StyleBuilder::ApplyProperty(GetProperty().GetCSSProperty(), state,
*CSSValue::Create(length, zoom)); *CSSValue::Create(length, zoom));
CHECK(LengthPropertyFunctions::GetLength(CssProperty(), style, after)); DCHECK(LengthPropertyFunctions::GetLength(CssProperty(), style, after));
CHECK(before.IsSpecified()); DCHECK(before.IsSpecified());
CHECK(after.IsSpecified()); DCHECK(after.IsSpecified());
const float kSlack = 0.1; const float kSlack = 0.1;
float delta = float delta =
FloatValueForLength(after, 100) - FloatValueForLength(before, 100); FloatValueForLength(after, 100) - FloatValueForLength(before, 100);
CHECK_LT(std::abs(delta), kSlack); DCHECK_LT(std::abs(delta), kSlack);
#endif
return; return;
} }
StyleBuilder::ApplyProperty(GetProperty().GetCSSProperty(), state, StyleBuilder::ApplyProperty(GetProperty().GetCSSProperty(), state,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment