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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 714163002: Remove RenderStyle member from FontBuilder. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Ensure font is created before taking animation snapshot. Created 6 years, 1 month 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/css/resolver/FontBuilderTest.cpp ('k') | Source/core/css/resolver/StyleResolverState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 188af0c6807666f8c0d9b6547a31a7768018f082..0653bfea65b06eed3458a1ac19773f5d26ff93db 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -716,6 +716,7 @@ PassRefPtrWillBeRawPtr<AnimatableValue> StyleResolver::createAnimatableValueSnap
PassRefPtrWillBeRawPtr<AnimatableValue> StyleResolver::createAnimatableValueSnapshot(StyleResolverState& state, CSSPropertyID property, CSSValue& value)
{
StyleBuilder::applyProperty(property, state, &value);
+ state.fontBuilder().createFont(state.document().styleEngine()->fontSelector(), state.style(), state.parentStyle());
dglazkov 2014/11/20 19:22:14 Let's ask animation folks? :) Mike, who would be
return CSSAnimatableValueFactory::create(property, *state.style());
}
@@ -922,9 +923,8 @@ PassRefPtr<RenderStyle> StyleResolver::defaultStyleForElement()
{
RefPtr<RenderStyle> style = RenderStyle::create();
FontBuilder fontBuilder(document());
- fontBuilder.setStyle(style.get());
fontBuilder.setInitial(style->effectiveZoom());
- style->font().update(document().styleEngine()->fontSelector());
+ fontBuilder.createFont(document().styleEngine()->fontSelector(), style.get(), nullptr);
return style.release();
}
@@ -940,7 +940,7 @@ PassRefPtr<RenderStyle> StyleResolver::styleForText(Text* textNode)
void StyleResolver::updateFont(StyleResolverState& state)
{
- state.fontBuilder().createFont(document().styleEngine()->fontSelector(), state.parentStyle(), state.style());
+ state.fontBuilder().createFont(document().styleEngine()->fontSelector(), state.style(), state.parentStyle());
state.setConversionFontSizes(CSSToLengthConversionData::FontSizes(state.style(), state.rootElementStyle()));
state.setConversionZoom(state.style()->effectiveZoom());
}
@@ -1442,6 +1442,8 @@ void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc
// Unfortunately the link status is treated like an inherited property. We need to explicitly restore it.
state.style()->setInsideLink(linkStatus);
+ state.fontBuilder().setFontDescription(state.style()->fontDescription());
+
updateFont(state);
return;
« no previous file with comments | « Source/core/css/resolver/FontBuilderTest.cpp ('k') | Source/core/css/resolver/StyleResolverState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698