Index: third_party/WebKit/Source/core/css/resolver/StyleResolverState.cpp |
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolverState.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolverState.cpp |
index 4a8044be075cfabf31d6b1ebe7617fc2a8b64b3f..761d4673df44b862e593b5abb26c0ec635f52423 100644 |
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolverState.cpp |
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolverState.cpp |
@@ -26,6 +26,7 @@ |
#include "core/dom/Node.h" |
#include "core/dom/NodeComputedStyle.h" |
#include "core/frame/FrameHost.h" |
+#include "core/layout/api/LayoutViewItem.h" |
namespace blink { |
@@ -59,6 +60,13 @@ StyleResolverState::~StyleResolverState() |
m_animationUpdate.clear(); |
} |
+void StyleResolverState::setStyle(PassRefPtr<ComputedStyle> style) |
+{ |
+ // FIXME: Improve RAII of StyleResolverState to remove this function. |
+ m_style = style; |
+ m_cssToLengthConversionData = CSSToLengthConversionData(m_style.get(), rootElementStyle(), document().layoutViewItem(), m_style->effectiveZoom()); |
+} |
+ |
CSSToLengthConversionData StyleResolverState::fontSizeConversionData() const |
{ |
float em = parentStyle()->specifiedFontSize(); |