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

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

Issue 715633006: Remove FontDescriptionChangeScope, and let FontBuilder partially apply values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix size/family ordering. Created 6 years 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
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index cdb307c31809a4780d51822e552546e10b21e54f..ea62f14af866fac0149145697b54faea0917c69f 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -705,7 +705,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());
+ state.fontBuilder().createFont(state.document().styleEngine()->fontSelector(), state.style());
return CSSAnimatableValueFactory::create(property, *state.style());
}
@@ -908,7 +908,7 @@ PassRefPtr<RenderStyle> StyleResolver::defaultStyleForElement()
RefPtr<RenderStyle> style = RenderStyle::create();
FontBuilder fontBuilder(document());
fontBuilder.setInitial(style->effectiveZoom());
- fontBuilder.createFont(document().styleEngine()->fontSelector(), style.get(), nullptr);
+ fontBuilder.createFont(document().styleEngine()->fontSelector(), style.get());
return style.release();
}
@@ -924,7 +924,7 @@ PassRefPtr<RenderStyle> StyleResolver::styleForText(Text* textNode)
void StyleResolver::updateFont(StyleResolverState& state)
{
- state.fontBuilder().createFont(document().styleEngine()->fontSelector(), state.style(), state.parentStyle());
+ state.fontBuilder().createFont(document().styleEngine()->fontSelector(), state.style());
state.setConversionFontSizes(CSSToLengthConversionData::FontSizes(state.style(), state.rootElementStyle()));
state.setConversionZoom(state.style()->effectiveZoom());
}
@@ -1438,8 +1438,6 @@ 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;
@@ -1467,7 +1465,7 @@ void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc
}
if (cachedMatchedProperties && cachedMatchedProperties->renderStyle->effectiveZoom() != state.style()->effectiveZoom()) {
- state.fontBuilder().setFontDirty(true);
+ state.fontBuilder().didChangeEffectiveZoom(true);
applyInheritedOnly = false;
}

Powered by Google App Engine
This is Rietveld 408576698