Fix access of 'from-font' underline thickness
FontMetrics::UnderlineThickness() returns an Optional<float>, but this code was dereferencing the value without checking if there was one (using value()). This made the following check of the Optional<> dead/redundant. Instead receive the Optional<> without dereferencing it. Also use value_or(...) to return the auto value or the specified value depending on if the latter exists or not. Bug: 785230 Change-Id: Id85ac107600ef26f2edc738048abe657b9db3bf7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2238932Reviewed-by:Dominik Röttsches <drott@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#777292}
Showing
Please register or sign in to comment