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

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

Issue 705783002: Decouple font unit conversion in computeLengthDouble from RenderStyle. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Forgot to remove ASSERT(rootStyle). 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/StyleResolver.cpp ('k') | Source/core/css/resolver/StyleResolverState.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 5665c86c15c2331ba4f5a0ef10dc2e241c9e2465..c7ed24ff6977888fbf7a4c90b587b0c580936e76 100644
--- a/Source/core/css/resolver/StyleResolverState.h
+++ b/Source/core/css/resolver/StyleResolverState.h
@@ -62,8 +62,9 @@ public:
void setStyle(PassRefPtr<RenderStyle> style)
{
+ // FIXME: Improve RAII of StyleResolverState to remove this function.
m_style = style;
- m_cssToLengthConversionData.setStyle(m_style.get());
+ m_cssToLengthConversionData = CSSToLengthConversionData(m_style.get(), rootElementStyle(), document().renderView(), m_style->effectiveZoom());
m_fontBuilder.setStyle(m_style.get());
}
const RenderStyle* style() const { return m_style.get(); }
@@ -72,6 +73,9 @@ public:
const CSSToLengthConversionData& cssToLengthConversionData() const { return m_cssToLengthConversionData; }
+ void setConversionFontSizes(const CSSToLengthConversionData::FontSizes& fontSizes) { m_cssToLengthConversionData.setFontSizes(fontSizes); }
+ void setConversionZoom(float zoom) { m_cssToLengthConversionData.setZoom(zoom); }
+
void setAnimationUpdate(PassOwnPtrWillBeRawPtr<CSSAnimationUpdate>);
const CSSAnimationUpdate* animationUpdate() { return m_animationUpdate.get(); }
PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> takeAnimationUpdate();
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/css/resolver/StyleResolverState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698