summaryrefslogtreecommitdiff
path: root/chromium/content/child/browser_font_resource_trusted.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-04-05 17:15:33 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-04-11 07:47:18 +0000
commit7324afb043a0b1e623d8e8eb906cdc53bdeb4685 (patch)
treea3fe2d74ea9c9e142c390dac4ca0e219382ace46 /chromium/content/child/browser_font_resource_trusted.cc
parent6a4cabb866f66d4128a97cdc6d9d08ce074f1247 (diff)
downloadqtwebengine-chromium-7324afb043a0b1e623d8e8eb906cdc53bdeb4685.tar.gz
BASELINE: Update Chromium to 58.0.3029.54
Change-Id: I67f57065a7afdc8e4614adb5c0230281428df4d1 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'chromium/content/child/browser_font_resource_trusted.cc')
-rw-r--r--chromium/content/child/browser_font_resource_trusted.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/chromium/content/child/browser_font_resource_trusted.cc b/chromium/content/child/browser_font_resource_trusted.cc
index e6fbfc43824..9c9480b51a3 100644
--- a/chromium/content/child/browser_font_resource_trusted.cc
+++ b/chromium/content/child/browser_font_resource_trusted.cc
@@ -71,7 +71,8 @@ class TextRunCollection {
if (run.override_direction) {
// Skip autodetection.
num_runs_ = 1;
- override_run_ = WebTextRun(text_, PP_ToBool(run.rtl), true);
+ override_run_ = WebTextRun(blink::WebString::fromUTF16(text_),
+ PP_ToBool(run.rtl), true);
} else {
bidi_ = ubidi_open();
UErrorCode uerror = U_ZERO_ERROR;
@@ -95,7 +96,8 @@ class TextRunCollection {
DCHECK(index < num_runs_);
if (bidi_) {
bool run_rtl = !!ubidi_getVisualRun(bidi_, index, run_start, run_len);
- return WebTextRun(base::string16(&text_[*run_start], *run_len),
+ return WebTextRun(blink::WebString::fromUTF16(
+ base::string16(&text_[*run_start], *run_len)),
run_rtl, true);
}
@@ -128,9 +130,8 @@ bool PPTextRunToWebTextRun(const PP_BrowserFont_Trusted_TextRun& text,
if (!text_string)
return false;
- *run = WebTextRun(base::UTF8ToUTF16(text_string->value()),
- PP_ToBool(text.rtl),
- PP_ToBool(text.override_direction));
+ *run = WebTextRun(blink::WebString::fromUTF8(text_string->value()),
+ PP_ToBool(text.rtl), PP_ToBool(text.override_direction));
return true;
}
@@ -198,7 +199,7 @@ WebFontDescription PPFontDescToWebFontDesc(
// Use the exact font.
resolved_family = base::UTF8ToUTF16(face_name->value());
}
- result.family = resolved_family;
+ result.family = blink::WebString::fromUTF16(resolved_family);
result.genericFamily = PP_FAMILY_TO_WEB_FAMILY(font.family);
@@ -278,8 +279,7 @@ PP_Bool BrowserFontResource_Trusted::Describe(
// While converting the other way in PPFontDescToWebFontDesc we validated
// that the enums can be casted.
WebFontDescription web_desc = font_->getFontDescription();
- description->face = StringVar::StringToPPVar(base::UTF16ToUTF8(
- base::StringPiece16(web_desc.family)));
+ description->face = StringVar::StringToPPVar(web_desc.family.utf8());
description->family =
static_cast<PP_BrowserFont_Trusted_Family>(web_desc.genericFamily);
description->size = static_cast<uint32_t>(web_desc.size);
@@ -426,8 +426,7 @@ void BrowserFontResource_Trusted::DrawTextToCanvas(
if (!clip) {
// Use entire canvas. SkCanvas doesn't have a size on it, so we just use
// the current clip bounds.
- SkRect skclip;
- destination->getClipBounds(&skclip);
+ SkRect skclip = destination->getLocalClipBounds();
web_clip = WebRect(skclip.fLeft, skclip.fTop, skclip.fRight - skclip.fLeft,
skclip.fBottom - skclip.fTop);
} else {