Index: third_party/WebKit/Source/core/css/MediaValuesCached.cpp |
diff --git a/third_party/WebKit/Source/core/css/MediaValuesCached.cpp b/third_party/WebKit/Source/core/css/MediaValuesCached.cpp |
index c7cc9e072dfa23fbb864c55eb63cc267e9440f26..604177d4fc76c2b81818d90c32f1e384397bfd99 100644 |
--- a/third_party/WebKit/Source/core/css/MediaValuesCached.cpp |
+++ b/third_party/WebKit/Source/core/css/MediaValuesCached.cpp |
@@ -9,9 +9,29 @@ |
#include "core/frame/LocalFrame.h" |
#include "core/layout/LayoutObject.h" |
#include "core/layout/api/LayoutViewItem.h" |
+#include "platform/graphics/ColorSpace.h" |
namespace blink { |
+MediaValuesCached::MediaValuesCachedData::MediaValuesCachedData() |
+ : viewportWidth(0), |
+ viewportHeight(0), |
+ deviceWidth(0), |
+ deviceHeight(0), |
+ devicePixelRatio(1.0), |
+ colorBitsPerComponent(24), |
+ monochromeBitsPerComponent(0), |
+ primaryPointerType(PointerTypeNone), |
+ availablePointerTypes(PointerTypeNone), |
+ primaryHoverType(HoverTypeNone), |
+ availableHoverTypes(HoverTypeNone), |
+ defaultFontSize(16), |
+ threeDEnabled(false), |
+ strictMode(true), |
+ displayMode(WebDisplayModeBrowser), |
+ displayShape(DisplayShapeRect), |
+ colorGamut(ColorSpaceGamut::Unknown) {} |
+ |
MediaValuesCached::MediaValuesCachedData::MediaValuesCachedData( |
Document& document) |
: MediaValuesCached::MediaValuesCachedData() { |
@@ -44,6 +64,7 @@ MediaValuesCached::MediaValuesCachedData::MediaValuesCachedData( |
displayMode = MediaValues::calculateDisplayMode(frame); |
mediaType = MediaValues::calculateMediaType(frame); |
displayShape = MediaValues::calculateDisplayShape(frame); |
+ colorGamut = MediaValues::calculateColorGamut(frame); |
} |
} |
@@ -159,4 +180,8 @@ DisplayShape MediaValuesCached::displayShape() const { |
return m_data.displayShape; |
} |
+ColorSpaceGamut MediaValuesCached::colorGamut() const { |
+ return m_data.colorGamut; |
+} |
+ |
} // namespace blink |