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

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

Issue 242883002: Remove MediaValues' dependency on RenderStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modified minimal recalc tests to represent reduced recalc. 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/MediaValuesCached.h
diff --git a/Source/core/css/MediaValuesCached.h b/Source/core/css/MediaValuesCached.h
index 095bea76e8bbd0f9b717fd7dc983223e2706605b..390511ca30c8e9b21126ab0672c407c27a44a8bc 100644
--- a/Source/core/css/MediaValuesCached.h
+++ b/Source/core/css/MediaValuesCached.h
@@ -22,16 +22,34 @@ public:
int monochromeBitsPerComponent;
PointerDeviceType pointer;
int defaultFontSize;
- int computedFontSize;
bool threeDEnabled;
bool scanMediaType;
bool screenMediaType;
bool printMediaType;
bool strictMode;
+
+ MediaValuesCachedData()
+ : viewportWidth(0)
+ , viewportHeight(0)
+ , deviceWidth(0)
+ , deviceHeight(0)
+ , devicePixelRatio(1.0)
+ , colorBitsPerComponent(24)
+ , monochromeBitsPerComponent(0)
+ , pointer(UnknownPointer)
+ , defaultFontSize(16)
+ , threeDEnabled(false)
+ , scanMediaType(false)
+ , screenMediaType(true)
+ , printMediaType(false)
+ , strictMode(true)
+ {
+ }
};
+ static PassRefPtr<MediaValues> create();
static PassRefPtr<MediaValues> create(Document&);
- static PassRefPtr<MediaValues> create(LocalFrame*, RenderStyle*);
+ static PassRefPtr<MediaValues> create(LocalFrame*);
static PassRefPtr<MediaValues> create(MediaValuesCachedData&);
virtual PassRefPtr<MediaValues> copy() const OVERRIDE;
virtual bool isSafeToSendToAnotherThread() const OVERRIDE;
@@ -54,7 +72,8 @@ public:
virtual bool hasValues() const OVERRIDE;
protected:
- MediaValuesCached(LocalFrame*, RenderStyle*);
+ MediaValuesCached();
+ MediaValuesCached(LocalFrame*);
MediaValuesCached(const MediaValuesCachedData&);
MediaValuesCachedData m_data;

Powered by Google App Engine
This is Rietveld 408576698