Commit 107af1c5 authored by Kevin McNee's avatar Kevin McNee Committed by Commit Bot

Remove several redundant assignments

Bug: None
Change-Id: I77f2d4e364d8b2458c29fa28969e8abdb6d0f537
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2551777Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#829835}
parent 88ef0784
...@@ -806,7 +806,7 @@ PositionWithAffinity NGPhysicalBoxFragment::PositionForPoint( ...@@ -806,7 +806,7 @@ PositionWithAffinity NGPhysicalBoxFragment::PositionForPoint(
return layout_object_->CreatePositionWithAffinity(0); return layout_object_->CreatePositionWithAffinity(0);
const auto& child = To<NGPhysicalBoxFragment>(*closest_child); const auto& child = To<NGPhysicalBoxFragment>(*closest_child);
Node* child_node = child_node = child.NonPseudoNode(); Node* child_node = child.NonPseudoNode();
PhysicalOffset point_in_child = point - closest_child.offset; PhysicalOffset point_in_child = point - closest_child.offset;
if (!child.IsCSSBox() || !child_node) if (!child.IsCSSBox() || !child_node)
return child.PositionForPoint(point_in_child); return child.PositionForPoint(point_in_child);
......
...@@ -1507,7 +1507,7 @@ void PaymentRequest::OnError(PaymentErrorReason error, ...@@ -1507,7 +1507,7 @@ void PaymentRequest::OnError(PaymentErrorReason error,
break; break;
case PaymentErrorReason::NOT_SUPPORTED: case PaymentErrorReason::NOT_SUPPORTED:
exception_code = exception_code = DOMExceptionCode::kNotSupportedError; exception_code = DOMExceptionCode::kNotSupportedError;
break; break;
case PaymentErrorReason::NOT_SUPPORTED_FOR_INVALID_ORIGIN_OR_SSL: case PaymentErrorReason::NOT_SUPPORTED_FOR_INVALID_ORIGIN_OR_SSL:
......
...@@ -152,9 +152,8 @@ OpenTypeCapsSupport::FontFormat OpenTypeCapsSupport::GetFontFormat() const { ...@@ -152,9 +152,8 @@ OpenTypeCapsSupport::FontFormat OpenTypeCapsSupport::GetFontFormat() const {
bool has_morx_or_mort = hb_blob_get_length(morx_blob.get()) || bool has_morx_or_mort = hb_blob_get_length(morx_blob.get()) ||
hb_blob_get_length(mort_blob.get()); hb_blob_get_length(mort_blob.get());
bool has_gsub = hb_ot_layout_has_substitution(hb_face); bool has_gsub = hb_ot_layout_has_substitution(hb_face);
font_format_ = has_morx_or_mort&& !has_gsub font_format_ = has_morx_or_mort && !has_gsub ? FontFormat::kAat
? font_format_ = FontFormat::kAat : FontFormat::kOpenType;
: font_format_ = FontFormat::kOpenType;
} }
return font_format_; return font_format_;
} }
......
...@@ -45,8 +45,8 @@ CalculationValue::~CalculationValue() { ...@@ -45,8 +45,8 @@ CalculationValue::~CalculationValue() {
} }
float CalculationValue::Evaluate(float max_value) const { float CalculationValue::Evaluate(float max_value) const {
float value = is_expression_ ? value = data_.expression->Evaluate(max_value) float value = is_expression_ ? data_.expression->Evaluate(max_value)
: value = Pixels() + Percent() / 100 * max_value; : Pixels() + Percent() / 100 * max_value;
return (IsNonNegative() && value < 0) ? 0 : value; return (IsNonNegative() && value < 0) ? 0 : value;
} }
......
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