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

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

Issue 242883002: Remove MediaValues' dependency on RenderStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use MediaValuesCached in HTMLImageElement 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/MediaValues.h
diff --git a/Source/core/css/MediaValues.h b/Source/core/css/MediaValues.h
index 60ac92840d56cc6bd2046ba4efa56fb671ad6546..f864eb23412067325cd8ad59b3148135e25a3f9f 100644
--- a/Source/core/css/MediaValues.h
+++ b/Source/core/css/MediaValues.h
@@ -12,7 +12,6 @@
namespace WebCore {
class Document;
-class RenderStyle;
class CSSPrimitiveValue;
class MediaValues : public RefCounted<MediaValues> {
@@ -34,6 +33,7 @@ public:
virtual PassRefPtr<MediaValues> copy() const = 0;
virtual bool isSafeToSendToAnotherThread() const = 0;
+ static bool computeLength(double value, unsigned short type, unsigned defaultFontSize, unsigned viewportWidth, unsigned viewportHeight, int& result);
virtual bool computeLength(double value, unsigned short type, int& result) const = 0;
virtual int viewportWidth() const = 0;
@@ -63,16 +63,11 @@ protected:
float calculateDevicePixelRatio(LocalFrame*) const;
int calculateColorBitsPerComponent(LocalFrame*) const;
int calculateMonochromeBitsPerComponent(LocalFrame*) const;
- int calculateDefaultFontSize(RenderStyle*) const;
- int calculateComputedFontSize(RenderStyle*) const;
- bool calculateHasXHeight(RenderStyle*) const;
- double calculateXHeight(RenderStyle*) const;
- double calculateZeroWidth(RenderStyle*) const;
+ int calculateDefaultFontSize(LocalFrame*) const;
bool calculateScanMediaType(LocalFrame*) const;
bool calculateScreenMediaType(LocalFrame*) const;
bool calculatePrintMediaType(LocalFrame*) const;
bool calculateThreeDEnabled(LocalFrame*) const;
- float calculateEffectiveZoom(RenderStyle*) const;
MediaValues::PointerDeviceType calculateLeastCapablePrimaryPointerDeviceType(LocalFrame*) const;
};

Powered by Google App Engine
This is Rietveld 408576698