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

Unified Diff: third_party/WebKit/Source/core/css/MediaValues.cpp

Issue 2652313004: Implement color-gamut media query (Closed)
Patch Set: fix windows build Created 3 years, 11 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/MediaValues.cpp
diff --git a/third_party/WebKit/Source/core/css/MediaValues.cpp b/third_party/WebKit/Source/core/css/MediaValues.cpp
index 75e9f8d3b70e58b23c35baf354cf538d75eb2c81..5ac7d79dd15ab58142089660a983b56a99f56557 100644
--- a/third_party/WebKit/Source/core/css/MediaValues.cpp
+++ b/third_party/WebKit/Source/core/css/MediaValues.cpp
@@ -20,6 +20,7 @@
#include "core/page/ChromeClient.h"
#include "core/page/Page.h"
#include "core/style/ComputedStyle.h"
+#include "platform/graphics/ColorSpace.h"
#include "public/platform/WebScreenInfo.h"
namespace blink {
@@ -145,6 +146,12 @@ DisplayShape MediaValues::calculateDisplayShape(LocalFrame* frame) {
return frame->host()->chromeClient().screenInfo().displayShape;
}
+ColorSpaceGamut MediaValues::calculateColorGamut(LocalFrame* frame) {
+ DCHECK(frame && frame->host());
+ return ColorSpaceUtilities::getColorSpaceGamut(
+ frame->host()->chromeClient().screenInfo());
+}
+
bool MediaValues::computeLengthImpl(double value,
CSSPrimitiveValue::UnitType type,
unsigned defaultFontSize,

Powered by Google App Engine
This is Rietveld 408576698