| Index: Source/core/css/CSSToLengthConversionData.h
|
| diff --git a/Source/core/css/CSSToLengthConversionData.h b/Source/core/css/CSSToLengthConversionData.h
|
| index 975be5f212204717a2f5cbd80fc673695973677c..dffb91690ed90d23278e42dd8792c29cd4e491b1 100644
|
| --- a/Source/core/css/CSSToLengthConversionData.h
|
| +++ b/Source/core/css/CSSToLengthConversionData.h
|
| @@ -37,21 +37,24 @@
|
| namespace WebCore {
|
|
|
| class RenderStyle;
|
| +class RenderView;
|
|
|
| class CSSToLengthConversionData {
|
| public:
|
| - CSSToLengthConversionData(const RenderStyle* style, const RenderStyle* rootStyle, float zoom, bool computingFontSize = false)
|
| + CSSToLengthConversionData(const RenderStyle* style, const RenderStyle* rootStyle, const RenderView* renderView, float zoom, bool computingFontSize = false)
|
| : m_style(style)
|
| , m_rootStyle(rootStyle)
|
| + , m_renderView(renderView)
|
| , m_zoom(zoom)
|
| , m_useEffectiveZoom(false)
|
| , m_computingFontSize(computingFontSize)
|
| {
|
| ASSERT(zoom > 0);
|
| }
|
| - CSSToLengthConversionData(const RenderStyle* style, const RenderStyle* rootStyle, bool computingFontSize = false)
|
| + CSSToLengthConversionData(const RenderStyle* style, const RenderStyle* rootStyle, const RenderView* renderView, bool computingFontSize = false)
|
| : m_style(style)
|
| , m_rootStyle(rootStyle)
|
| + , m_renderView(renderView)
|
| , m_useEffectiveZoom(true)
|
| , m_computingFontSize(computingFontSize)
|
| {
|
| @@ -61,17 +64,24 @@ public:
|
| float zoom() const;
|
| bool computingFontSize() const { return m_computingFontSize; }
|
|
|
| + // Accessing these marks the style as having viewport units
|
| + double viewportWidthPercent() const;
|
| + double viewportHeightPercent() const;
|
| + double viewportMinPercent() const;
|
| + double viewportMaxPercent() const;
|
| +
|
| void setStyle(const RenderStyle* style) { m_style = style; }
|
| void setRootStyle(const RenderStyle* rootStyle) { m_rootStyle = rootStyle; }
|
|
|
| CSSToLengthConversionData copyWithAdjustedZoom(float newZoom) const
|
| {
|
| - return CSSToLengthConversionData(m_style, m_rootStyle, newZoom, m_computingFontSize);
|
| + return CSSToLengthConversionData(m_style, m_rootStyle, m_renderView, newZoom, m_computingFontSize);
|
| }
|
|
|
| private:
|
| const RenderStyle* m_style;
|
| const RenderStyle* m_rootStyle;
|
| + const RenderView* m_renderView;
|
| float m_zoom;
|
| bool m_useEffectiveZoom;
|
| bool m_computingFontSize;
|
|
|