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

Unified Diff: Source/core/css/CSSToLengthConversionData.h

Issue 227043007: CSS Length calculation with MediaValues (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@sizes_parser3
Patch Set: Fix debug compile issue Created 6 years, 8 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/CSSPrimitiveValue.cpp ('k') | Source/core/css/CSSToLengthConversionData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSToLengthConversionData.h
diff --git a/Source/core/css/CSSToLengthConversionData.h b/Source/core/css/CSSToLengthConversionData.h
index 6b81ce993b90d3a58beb9a423fd9005b184c4e37..204304693bd11c6c70450d21f3c0e7db0964e673 100644
--- a/Source/core/css/CSSToLengthConversionData.h
+++ b/Source/core/css/CSSToLengthConversionData.h
@@ -31,6 +31,7 @@
#ifndef CSSToLengthConversionData_h
#define CSSToLengthConversionData_h
+#include "core/css/CSSLengthData.h"
#include "wtf/Assertions.h"
#include "wtf/Noncopyable.h"
@@ -39,7 +40,7 @@ namespace WebCore {
class RenderStyle;
class RenderView;
-class CSSToLengthConversionData {
+class CSSToLengthConversionData: public CSSLengthData {
public:
CSSToLengthConversionData(const RenderStyle* currStyle, const RenderStyle* rootStyle, const RenderView*, float zoom, bool computingFontSize = false);
CSSToLengthConversionData(const RenderStyle* currStyle, const RenderStyle* rootStyle, const RenderView*, bool computingFontSize = false);
@@ -47,14 +48,22 @@ public:
const RenderStyle& style() const { return *m_style; }
const RenderStyle* rootStyle() const { return m_rootStyle; }
- float zoom() const;
- bool computingFontSize() const { return m_computingFontSize; }
+ virtual float zoom() const;
+ virtual bool computingFontSize() const;
+ virtual double fontSpecifiedSize() const;
+ virtual double fontComputedSize() const;
+ virtual double rootFontSpecifiedSize() const;
+ virtual double rootFontComputedSize() const;
+ virtual bool hasXHeight() const;
+ virtual double xHeight() const;
+ virtual double zeroWidth() const;
+ virtual bool hasRoot() const { return !!m_rootStyle; }
// Accessing these marks the style as having viewport units
- double viewportWidthPercent() const;
- double viewportHeightPercent() const;
- double viewportMinPercent() const;
- double viewportMaxPercent() const;
+ virtual double viewportWidthPercent() const;
+ virtual double viewportHeightPercent() const;
+ virtual double viewportMinPercent() const;
+ virtual double viewportMaxPercent() const;
void setStyle(const RenderStyle* style) { m_style = style; }
void setRootStyle(const RenderStyle* rootStyle) { m_rootStyle = rootStyle; }
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.cpp ('k') | Source/core/css/CSSToLengthConversionData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698