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

Unified Diff: Source/core/css/resolver/StyleResolverState.h

Issue 715633006: Remove FontDescriptionChangeScope, and let FontBuilder partially apply values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: IsSetFlag -> PropertySetFlag. 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/css/resolver/StyleResolver.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolverState.h
diff --git a/Source/core/css/resolver/StyleResolverState.h b/Source/core/css/resolver/StyleResolverState.h
index 148696222720d12c6d7001849e9083406c1b88bc..f6826d19ef32def781ed63a6848bf83bfcf74293 100644
--- a/Source/core/css/resolver/StyleResolverState.h
+++ b/Source/core/css/resolver/StyleResolverState.h
@@ -66,7 +66,6 @@ public:
// FIXME: Improve RAII of StyleResolverState to remove this function.
m_style = style;
m_cssToLengthConversionData = CSSToLengthConversionData(m_style.get(), rootElementStyle(), document().renderView(), m_style->effectiveZoom());
- m_fontBuilder.setFontDescription(m_style->fontDescription());
}
const RenderStyle* style() const { return m_style.get(); }
RenderStyle* style() { return m_style.get(); }
@@ -127,10 +126,27 @@ public:
// want to design a better wrapper around RenderStyle for tracking these mutations
// and separate it from StyleResolverState.
const FontDescription& parentFontDescription() { return m_parentStyle->fontDescription(); }
- void setZoom(float f) { m_fontBuilder.didChangeFontParameters(m_style->setZoom(f)); }
- void setEffectiveZoom(float f) { m_fontBuilder.didChangeFontParameters(m_style->setEffectiveZoom(f)); }
- void setWritingMode(WritingMode writingMode) { m_fontBuilder.didChangeFontParameters(m_style->setWritingMode(writingMode)); }
- void setTextOrientation(TextOrientation textOrientation) { m_fontBuilder.didChangeFontParameters(m_style->setTextOrientation(textOrientation)); }
+
+ void setZoom(float f)
+ {
+ if (m_style->setZoom(f))
+ m_fontBuilder.didChangeEffectiveZoom();
+ }
+ void setEffectiveZoom(float f)
+ {
+ if (m_style->setEffectiveZoom(f))
+ m_fontBuilder.didChangeEffectiveZoom();
+ }
+ void setWritingMode(WritingMode writingMode)
+ {
+ if (m_style->setWritingMode(writingMode))
+ m_fontBuilder.didChangeWritingMode();
+ }
+ void setTextOrientation(TextOrientation textOrientation)
+ {
+ if (m_style->setTextOrientation(textOrientation))
+ m_fontBuilder.didChangeTextOrientation();
+ }
private:
ElementResolveContext m_elementContext;
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698