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

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: Rebase 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
Index: Source/core/css/CSSToLengthConversionData.h
diff --git a/Source/core/css/CSSToLengthConversionData.h b/Source/core/css/CSSToLengthConversionData.h
index 6b81ce993b90d3a58beb9a423fd9005b184c4e37..0be5f42bfed5efe8537d2e86d5b9cd5bfdc398d4 100644
--- a/Source/core/css/CSSToLengthConversionData.h
+++ b/Source/core/css/CSSToLengthConversionData.h
@@ -38,17 +38,27 @@ namespace WebCore {
class RenderStyle;
class RenderView;
+class MediaValues;
class CSSToLengthConversionData {
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);
CSSToLengthConversionData(const RenderStyle* currStyle, const RenderStyle* rootStyle, float viewportWidth, float viewportHeight, float zoom, bool computingFontSize = false);
+ CSSToLengthConversionData(const MediaValues*, float zoom, bool computingFontSize = false);
const RenderStyle& style() const { return *m_style; }
const RenderStyle* rootStyle() const { return m_rootStyle; }
float zoom() const;
- bool computingFontSize() const { return m_computingFontSize; }
+ bool computingFontSize() const;
+ double fontSpecifiedSize() const;
+ double fontComputedSize() const;
+ double rootFontSpecifiedSize() const;
+ double rootFontComputedSize() const;
+ bool hasXHeight() const;
+ double xHeight() const;
+ double zeroWidth() const;
+ bool hasRoot() const { return !!m_rootStyle; }
// Accessing these marks the style as having viewport units
double viewportWidthPercent() const;
@@ -67,6 +77,7 @@ public:
private:
const RenderStyle* m_style;
const RenderStyle* m_rootStyle;
+ const MediaValues* m_mediaValues; // Can't be a RefPtr since it would create a dependency cycle.
eseidel 2014/04/08 16:51:28 Could you elaborate more on the cycle?
esprehn 2014/04/08 17:40:39 CSSLengthToConversionData should only be created o
float m_viewportWidth;
float m_viewportHeight;
float m_zoom;

Powered by Google App Engine
This is Rietveld 408576698