summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/layout/layout_text_combine.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/layout/layout_text_combine.cc')
-rw-r--r--chromium/third_party/blink/renderer/core/layout/layout_text_combine.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/chromium/third_party/blink/renderer/core/layout/layout_text_combine.cc b/chromium/third_party/blink/renderer/core/layout/layout_text_combine.cc
index 62c19718366..cb823919580 100644
--- a/chromium/third_party/blink/renderer/core/layout/layout_text_combine.cc
+++ b/chromium/third_party/blink/renderer/core/layout/layout_text_combine.cc
@@ -177,7 +177,7 @@ void LayoutTextCombine::UpdateFontStyleForCombinedText() {
FontSelector* font_selector = style->GetFont().GetFontSelector();
// Need to change font orientation to horizontal.
- bool should_update_font = style->SetFontDescription(description);
+ style->SetFontDescription(description);
if (combined_text_width_ <= em_width) {
scale_x_ = 1.0f;
@@ -187,14 +187,13 @@ void LayoutTextCombine::UpdateFontStyleForCombinedText() {
kQuarterWidth};
for (size_t i = 0; i < base::size(kWidthVariants); ++i) {
description.SetWidthVariant(kWidthVariants[i]);
- Font compressed_font = Font(description);
- compressed_font.Update(font_selector);
+ Font compressed_font(description, font_selector);
float run_width = compressed_font.Width(run);
if (run_width <= em_width) {
combined_text_width_ = run_width;
// Replace my font with the new one.
- should_update_font = style->SetFontDescription(description);
+ style->SetFontDescription(description);
break;
}
}
@@ -209,9 +208,6 @@ void LayoutTextCombine::UpdateFontStyleForCombinedText() {
scale_x_ = 1.0f;
}
}
-
- if (should_update_font)
- style->GetFont().Update(font_selector);
}
} // namespace blink