Skip to content

Commit

Permalink
Fix build before merge.
Browse files Browse the repository at this point in the history
prepare for removal of Stirng::format
  • Loading branch information
pulkomandy committed Mar 2, 2019
1 parent 5b1ce4b commit d1d9c29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
14 changes: 1 addition & 13 deletions Source/WebCore/platform/graphics/haiku/FontPlatformDataHaiku.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,7 @@ FontPlatformData FontPlatformData::cloneWithSize(const FontPlatformData& source,

unsigned FontPlatformData::hash() const
{
if (isHashTableDeletedValue())
return 1;
String hashString = description();
return StringHasher::hashMemory<sizeof(hashString.length())>(hashString.utf8().data());
return PtrHash<BFont*>::hash(m_font.get());
}


Expand All @@ -170,15 +167,6 @@ bool FontPlatformData::isFixedPitch() const
return m_font->Spacing() == B_FIXED_SPACING;
}

String FontPlatformData::description() const
{
font_family fontFamily;
font_style fontStyle;
m_font->GetFamilyAndStyle(&fontFamily, &fontStyle);
return String(fontFamily) + "/" + String(fontStyle)
+ String::format("/%.1f/%d&%d", m_size, m_syntheticBold, m_syntheticOblique);
}

void
FontPlatformData::SetFallBackSerifFont(const BString& font)
{
Expand Down
3 changes: 1 addition & 2 deletions Source/WebCore/platform/graphics/haiku/ImageBufferHaiku.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,7 @@ String ImageBuffer::toDataURL(const String& mimeType, Optional<double> quality,
Vector<char> encodedBuffer;
base64Encode(binaryBuffer, encodedBuffer);

return String::format("data:%s;base64,%.*s", mimeType.utf8().data(),
(int)encodedBuffer.size(), encodedBuffer.data());
return "data:" + mimeType + ";base64;" + encodedBuffer;
}


Expand Down

0 comments on commit d1d9c29

Please sign in to comment.