Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(725)

Unified Diff: Source/core/dom/Document.cpp

Issue 712333004: Create the document font using normal FontBuilder calls. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Recreate patch on new master. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Document.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 6c8c3aae5c874c6039aa4a6e7b2a8d5f1ff8b98b..c5c7c5404e97cc91b0daa5345241113b3a577d24 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1623,11 +1623,13 @@ void Document::updateDistributionForNodeIfNeeded(Node* node)
root->recalcDistribution();
}
-void Document::setupFontBuilder(RenderStyle* documentStyle)
+void Document::createFont(RenderStyle* documentStyle)
{
FontBuilder fontBuilder(*this);
- RefPtrWillBeRawPtr<CSSFontSelector> selector = m_styleEngine->fontSelector();
- fontBuilder.createFontForDocument(selector, documentStyle);
+ fontBuilder.setScript(documentStyle->locale());
+ fontBuilder.setFamilyDescription(FontBuilder::initialFamilyDescription());
+ fontBuilder.setSize(FontBuilder::initialSize());
+ fontBuilder.createFont(m_styleEngine->fontSelector(), documentStyle);
}
void Document::inheritHtmlAndBodyElementStyles(StyleRecalcChange change)
@@ -1707,7 +1709,7 @@ void Document::inheritHtmlAndBodyElementStyles(StyleRecalcChange change)
newStyle->setOverflowY(overflowY);
newStyle->setScrollBlocksOn(scrollBlocksOn);
renderView()->setStyle(newStyle);
- setupFontBuilder(newStyle.get());
+ createFont(newStyle.get());
}
if (body) {
« no previous file with comments | « Source/core/dom/Document.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698