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

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

Issue 1679703002: Revert of Create MediaValuesCached and TokenPreloadScanner on the parser thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TRV_MediaValuesCached
Patch Set: Created 4 years, 10 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: third_party/WebKit/Source/core/css/MediaValuesCached.h
diff --git a/third_party/WebKit/Source/core/css/MediaValuesCached.h b/third_party/WebKit/Source/core/css/MediaValuesCached.h
index 50b1a5a90588c4bab4f30ea109f0dd703313df13..53c6734a7fb23610a3cb4011fc59b33f4709dac5 100644
--- a/third_party/WebKit/Source/core/css/MediaValuesCached.h
+++ b/third_party/WebKit/Source/core/css/MediaValuesCached.h
@@ -12,7 +12,7 @@
class CORE_EXPORT MediaValuesCached final : public MediaValues {
public:
- struct MediaValuesCachedData final {
+ struct MediaValuesCachedData {
DISALLOW_NEW();
// Members variables must be thread safe, since they're copied to the parser thread
double viewportWidth;
@@ -50,35 +50,14 @@
, displayMode(WebDisplayModeBrowser)
{
}
-
- explicit MediaValuesCachedData(Document&);
-
- MediaValuesCachedData deepCopy() const
- {
- MediaValuesCachedData data;
- data.viewportWidth = viewportWidth;
- data.viewportHeight = viewportHeight;
- data.deviceWidth = deviceWidth;
- data.deviceHeight = deviceHeight;
- data.devicePixelRatio = devicePixelRatio;
- data.colorBitsPerComponent = colorBitsPerComponent;
- data.monochromeBitsPerComponent = monochromeBitsPerComponent;
- data.primaryPointerType = primaryPointerType;
- data.availablePointerTypes = availablePointerTypes;
- data.primaryHoverType = primaryHoverType;
- data.availableHoverTypes = availableHoverTypes;
- data.defaultFontSize = defaultFontSize;
- data.threeDEnabled = threeDEnabled;
- data.strictMode = strictMode;
- data.mediaType = mediaType.isolatedCopy();
- data.displayMode = displayMode;
- return data;
- }
};
static PassRefPtrWillBeRawPtr<MediaValuesCached> create();
- static PassRefPtrWillBeRawPtr<MediaValuesCached> create(const MediaValuesCachedData&);
+ static PassRefPtrWillBeRawPtr<MediaValuesCached> create(Document&);
+ static PassRefPtrWillBeRawPtr<MediaValuesCached> create(LocalFrame*);
+ static PassRefPtrWillBeRawPtr<MediaValuesCached> create(MediaValuesCachedData&);
PassRefPtrWillBeRawPtr<MediaValues> copy() const override;
+ bool isSafeToSendToAnotherThread() const;
bool computeLength(double value, CSSPrimitiveValue::UnitType, int& result) const override;
bool computeLength(double value, CSSPrimitiveValue::UnitType, double& result) const override;
@@ -111,11 +90,6 @@
MediaValuesCachedData m_data;
};
-template<> struct CrossThreadCopierBase<false, false, false, MediaValuesCached::MediaValuesCachedData> {
- typedef MediaValuesCached::MediaValuesCachedData Type;
- static Type copy(const MediaValuesCached::MediaValuesCachedData& data) { return data.deepCopy(); }
-};
-
} // namespace blink
#endif // MediaValuesCached_h
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaValues.cpp ('k') | third_party/WebKit/Source/core/css/MediaValuesCached.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698