<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[284279] branches/safari-612-branch/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/284279">284279</a></dd>
<dt>Author</dt> <dd>repstein@apple.com</dd>
<dt>Date</dt> <dd>2021-10-15 15:37:24 -0700 (Fri, 15 Oct 2021)</dd>
</dl>
<h3>Log Message</h3>
<pre>Cherry-pick <a href="http://trac.webkit.org/projects/webkit/changeset/283572">r283572</a>. rdar://problem/83953133
Web Inspector: Show color space for canvases in the Graphics tab on the overview cards
https://bugs.webkit.org/show_bug.cgi?id=231205
Reviewed by Devin Rousso.
Source/JavaScriptCore:
Use an enum instead of strings for color space values sent to the frontend.
* inspector/protocol/Canvas.json:
* inspector/scripts/codegen/generator.py:
Source/WebCore:
Use an enum instead of strings for color space values sent to the frontend.
* inspector/InspectorCanvas.cpp:
(WebCore::buildObjectForCanvasContextAttributes):
Source/WebInspectorUI:
For canvas context's with a color space attribute, show the color space next to the context type in the header
of each context card in the Graphics tab.
* UserInterface/Models/Canvas.js:
(WI.Canvas.displayNameForColorSpace):
* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView.prototype.initialLayout):
* UserInterface/Views/CanvasOverviewContentView.css:
(.content-view.canvas-overview > .content-view.canvas > header > .titles > :matches(.subtitle, .color-space),):
(.content-view.canvas-overview > .content-view.canvas > header .color-space::before):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283572 268f45cc-cd09-0410-ab3c-d52691b4dbfc</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari612branchSourceJavaScriptCoreChangeLog">branches/safari-612-branch/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchessafari612branchSourceJavaScriptCoreinspectorprotocolCanvasjson">branches/safari-612-branch/Source/JavaScriptCore/inspector/protocol/Canvas.json</a></li>
<li><a href="#branchessafari612branchSourceJavaScriptCoreinspectorscriptscodegengeneratorpy">branches/safari-612-branch/Source/JavaScriptCore/inspector/scripts/codegen/generator.py</a></li>
<li><a href="#branchessafari612branchSourceWebCoreChangeLog">branches/safari-612-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari612branchSourceWebCoreinspectorInspectorCanvascpp">branches/safari-612-branch/Source/WebCore/inspector/InspectorCanvas.cpp</a></li>
<li><a href="#branchessafari612branchSourceWebInspectorUIChangeLog">branches/safari-612-branch/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#branchessafari612branchSourceWebInspectorUIUserInterfaceModelsCanvasjs">branches/safari-612-branch/Source/WebInspectorUI/UserInterface/Models/Canvas.js</a></li>
<li><a href="#branchessafari612branchSourceWebInspectorUIUserInterfaceViewsCanvasContentViewjs">branches/safari-612-branch/Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js</a></li>
<li><a href="#branchessafari612branchSourceWebInspectorUIUserInterfaceViewsCanvasOverviewContentViewcss">branches/safari-612-branch/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.css</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari612branchSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/JavaScriptCore/ChangeLog (284278 => 284279)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/JavaScriptCore/ChangeLog 2021-10-15 22:36:55 UTC (rev 284278)
+++ branches/safari-612-branch/Source/JavaScriptCore/ChangeLog 2021-10-15 22:37:24 UTC (rev 284279)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2021-10-15 Russell Epstein <repstein@apple.com>
+
+ Cherry-pick r283572. rdar://problem/83953133
+
+ Web Inspector: Show color space for canvases in the Graphics tab on the overview cards
+ https://bugs.webkit.org/show_bug.cgi?id=231205
+
+ Reviewed by Devin Rousso.
+
+ Source/JavaScriptCore:
+
+ Use an enum instead of strings for color space values sent to the frontend.
+
+ * inspector/protocol/Canvas.json:
+ * inspector/scripts/codegen/generator.py:
+
+ Source/WebCore:
+
+ Use an enum instead of strings for color space values sent to the frontend.
+
+ * inspector/InspectorCanvas.cpp:
+ (WebCore::buildObjectForCanvasContextAttributes):
+
+ Source/WebInspectorUI:
+
+ For canvas context's with a color space attribute, show the color space next to the context type in the header
+ of each context card in the Graphics tab.
+
+ * UserInterface/Models/Canvas.js:
+ (WI.Canvas.displayNameForColorSpace):
+ * UserInterface/Views/CanvasContentView.js:
+ (WI.CanvasContentView.prototype.initialLayout):
+ * UserInterface/Views/CanvasOverviewContentView.css:
+ (.content-view.canvas-overview > .content-view.canvas > header > .titles > :matches(.subtitle, .color-space),):
+ (.content-view.canvas-overview > .content-view.canvas > header .color-space::before):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-10-05 Patrick Angle <pangle@apple.com>
+
+ Web Inspector: Show color space for canvases in the Graphics tab on the overview cards
+ https://bugs.webkit.org/show_bug.cgi?id=231205
+
+ Reviewed by Devin Rousso.
+
+ Use an enum instead of strings for color space values sent to the frontend.
+
+ * inspector/protocol/Canvas.json:
+ * inspector/scripts/codegen/generator.py:
+
</ins><span class="cx"> 2021-08-26 Yusuke Suzuki <ysuzuki@apple.com>
</span><span class="cx">
</span><span class="cx"> Intl.DateTimeFormat incorrectly parses patterns with 'h' literal
</span></span></pre></div>
<a id="branchessafari612branchSourceJavaScriptCoreinspectorprotocolCanvasjson"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/JavaScriptCore/inspector/protocol/Canvas.json (284278 => 284279)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/JavaScriptCore/inspector/protocol/Canvas.json 2021-10-15 22:36:55 UTC (rev 284278)
+++ branches/safari-612-branch/Source/JavaScriptCore/inspector/protocol/Canvas.json 2021-10-15 22:37:24 UTC (rev 284279)
</span><span class="lines">@@ -16,6 +16,11 @@
</span><span class="cx"> "description": "Unique shader program identifier."
</span><span class="cx"> },
</span><span class="cx"> {
</span><ins>+ "id": "ColorSpace",
+ "type": "string",
+ "enum": ["srgb", "display-p3"]
+ },
+ {
</ins><span class="cx"> "id": "ContextType",
</span><span class="cx"> "type": "string",
</span><span class="cx"> "enum": ["canvas-2d", "bitmaprenderer", "webgl", "webgl2"],
</span><span class="lines">@@ -39,6 +44,8 @@
</span><span class="cx"> "description": "Drawing surface attributes.",
</span><span class="cx"> "properties": [
</span><span class="cx"> { "name": "alpha", "type": "boolean", "optional": true, "description": "WebGL, WebGL2, ImageBitmapRenderingContext" },
</span><ins>+ { "name": "colorSpace", "$ref": "ColorSpace", "optional": true, "description": "2D" },
+ { "name": "desynchronized", "type": "boolean", "optional": true, "description": "2D" },
</ins><span class="cx"> { "name": "depth", "type": "boolean", "optional": true, "description": "WebGL, WebGL2" },
</span><span class="cx"> { "name": "stencil", "type": "boolean", "optional": true, "description": "WebGL, WebGL2" },
</span><span class="cx"> { "name": "antialias", "type": "boolean", "optional": true, "description": "WebGL, WebGL2" },
</span></span></pre></div>
<a id="branchessafari612branchSourceJavaScriptCoreinspectorscriptscodegengeneratorpy"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/JavaScriptCore/inspector/scripts/codegen/generator.py (284278 => 284279)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/JavaScriptCore/inspector/scripts/codegen/generator.py 2021-10-15 22:36:55 UTC (rev 284278)
+++ branches/safari-612-branch/Source/JavaScriptCore/inspector/scripts/codegen/generator.py 2021-10-15 22:37:24 UTC (rev 284279)
</span><span class="lines">@@ -42,7 +42,8 @@
</span><span class="cx"> def ucfirst(str):
</span><span class="cx"> return str[:1].upper() + str[1:]
</span><span class="cx">
</span><del>-_ALWAYS_SPECIALCASED_ENUM_VALUE_SUBSTRINGS = set(['2D', 'API', 'CSS', 'DOM', 'HTML', 'JIT', 'XHR', 'XML', 'IOS', 'MacOS', 'JavaScript', 'ServiceWorker'])
</del><ins>+
+_ALWAYS_SPECIALCASED_ENUM_VALUE_SUBSTRINGS = set(['2D', 'API', 'CSS', 'DOM', 'HTML', 'JIT', 'SRGB', 'XHR', 'XML', 'IOS', 'MacOS', 'JavaScript', 'ServiceWorker'])
</ins><span class="cx"> _ALWAYS_SPECIALCASED_ENUM_VALUE_LOOKUP_TABLE = dict([(s.upper(), s) for s in _ALWAYS_SPECIALCASED_ENUM_VALUE_SUBSTRINGS])
</span><span class="cx">
</span><span class="cx"> _ENUM_IDENTIFIER_RENAME_MAP = {
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/ChangeLog (284278 => 284279)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/ChangeLog 2021-10-15 22:36:55 UTC (rev 284278)
+++ branches/safari-612-branch/Source/WebCore/ChangeLog 2021-10-15 22:37:24 UTC (rev 284279)
</span><span class="lines">@@ -1,5 +1,55 @@
</span><span class="cx"> 2021-10-15 Russell Epstein <repstein@apple.com>
</span><span class="cx">
</span><ins>+ Cherry-pick r283572. rdar://problem/83953133
+
+ Web Inspector: Show color space for canvases in the Graphics tab on the overview cards
+ https://bugs.webkit.org/show_bug.cgi?id=231205
+
+ Reviewed by Devin Rousso.
+
+ Source/JavaScriptCore:
+
+ Use an enum instead of strings for color space values sent to the frontend.
+
+ * inspector/protocol/Canvas.json:
+ * inspector/scripts/codegen/generator.py:
+
+ Source/WebCore:
+
+ Use an enum instead of strings for color space values sent to the frontend.
+
+ * inspector/InspectorCanvas.cpp:
+ (WebCore::buildObjectForCanvasContextAttributes):
+
+ Source/WebInspectorUI:
+
+ For canvas context's with a color space attribute, show the color space next to the context type in the header
+ of each context card in the Graphics tab.
+
+ * UserInterface/Models/Canvas.js:
+ (WI.Canvas.displayNameForColorSpace):
+ * UserInterface/Views/CanvasContentView.js:
+ (WI.CanvasContentView.prototype.initialLayout):
+ * UserInterface/Views/CanvasOverviewContentView.css:
+ (.content-view.canvas-overview > .content-view.canvas > header > .titles > :matches(.subtitle, .color-space),):
+ (.content-view.canvas-overview > .content-view.canvas > header .color-space::before):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-10-05 Patrick Angle <pangle@apple.com>
+
+ Web Inspector: Show color space for canvases in the Graphics tab on the overview cards
+ https://bugs.webkit.org/show_bug.cgi?id=231205
+
+ Reviewed by Devin Rousso.
+
+ Use an enum instead of strings for color space values sent to the frontend.
+
+ * inspector/InspectorCanvas.cpp:
+ (WebCore::buildObjectForCanvasContextAttributes):
+
+2021-10-15 Russell Epstein <repstein@apple.com>
+
</ins><span class="cx"> Cherry-pick r283033. rdar://problem/83953190
</span><span class="cx">
</span><span class="cx"> [IOS 15] Video track does not get unmuted in case of tab was inactive less than ~500 ms
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCoreinspectorInspectorCanvascpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/inspector/InspectorCanvas.cpp (284278 => 284279)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/inspector/InspectorCanvas.cpp 2021-10-15 22:36:55 UTC (rev 284278)
+++ branches/safari-612-branch/Source/WebCore/inspector/InspectorCanvas.cpp 2021-10-15 22:37:24 UTC (rev 284279)
</span><span class="lines">@@ -813,6 +813,67 @@
</span><span class="cx"> return m_frameCount && m_framesCaptured >= m_frameCount.value();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static RefPtr<Inspector::Protocol::Canvas::ContextAttributes> buildObjectForCanvasContextAttributes(CanvasRenderingContext& context)
+{
+ if (is<CanvasRenderingContext2D>(context)) {
+ auto attributes = downcast<CanvasRenderingContext2D>(context).getContextAttributes();
+ auto contextAttributesPayload = Inspector::Protocol::Canvas::ContextAttributes::create()
+ .release();
+ switch (attributes.colorSpace) {
+ case PredefinedColorSpace::SRGB:
+ contextAttributesPayload->setColorSpace(Protocol::Canvas::ColorSpace::SRGB);
+ break;
+
+#if ENABLE(PREDEFINED_COLOR_SPACE_DISPLAY_P3)
+ case PredefinedColorSpace::DisplayP3:
+ contextAttributesPayload->setColorSpace(Protocol::Canvas::ColorSpace::DisplayP3);
+ break;
+#endif
+ }
+ contextAttributesPayload->setDesynchronized(attributes.desynchronized);
+ return contextAttributesPayload;
+ }
+
+ if (is<ImageBitmapRenderingContext>(context)) {
+ auto contextAttributesPayload = Inspector::Protocol::Canvas::ContextAttributes::create()
+ .release();
+ contextAttributesPayload->setAlpha(downcast<ImageBitmapRenderingContext>(context).hasAlpha());
+ return contextAttributesPayload;
+ }
+
+#if ENABLE(WEBGL)
+ if (is<WebGLRenderingContextBase>(context)) {
+ const auto& attributes = downcast<WebGLRenderingContextBase>(context).getContextAttributes();
+ if (!attributes)
+ return nullptr;
+
+ auto contextAttributesPayload = Inspector::Protocol::Canvas::ContextAttributes::create()
+ .release();
+ contextAttributesPayload->setAlpha(attributes->alpha);
+ contextAttributesPayload->setDepth(attributes->depth);
+ contextAttributesPayload->setStencil(attributes->stencil);
+ contextAttributesPayload->setAntialias(attributes->antialias);
+ contextAttributesPayload->setPremultipliedAlpha(attributes->premultipliedAlpha);
+ contextAttributesPayload->setPreserveDrawingBuffer(attributes->preserveDrawingBuffer);
+ switch (attributes->powerPreference) {
+ case WebGLPowerPreference::Default:
+ contextAttributesPayload->setPowerPreference("default"_s);
+ break;
+ case WebGLPowerPreference::LowPower:
+ contextAttributesPayload->setPowerPreference("low-power"_s);
+ break;
+ case WebGLPowerPreference::HighPerformance:
+ contextAttributesPayload->setPowerPreference("high-performance"_s);
+ break;
+ }
+ contextAttributesPayload->setFailIfMajorPerformanceCaveat(attributes->failIfMajorPerformanceCaveat);
+ return contextAttributesPayload;
+ }
+#endif // ENABLE(WEBGL)
+
+ return nullptr;
+}
+
</ins><span class="cx"> Ref<Protocol::Canvas::Canvas> InspectorCanvas::buildObjectForCanvas(bool captureBacktrace)
</span><span class="cx"> {
</span><span class="cx"> using ContextTypeType = std::optional<Protocol::Canvas::ContextType>;
</span></span></pre></div>
<a id="branchessafari612branchSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebInspectorUI/ChangeLog (284278 => 284279)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebInspectorUI/ChangeLog 2021-10-15 22:36:55 UTC (rev 284278)
+++ branches/safari-612-branch/Source/WebInspectorUI/ChangeLog 2021-10-15 22:37:24 UTC (rev 284279)
</span><span class="lines">@@ -1,3 +1,59 @@
</span><ins>+2021-10-15 Russell Epstein <repstein@apple.com>
+
+ Cherry-pick r283572. rdar://problem/83953133
+
+ Web Inspector: Show color space for canvases in the Graphics tab on the overview cards
+ https://bugs.webkit.org/show_bug.cgi?id=231205
+
+ Reviewed by Devin Rousso.
+
+ Source/JavaScriptCore:
+
+ Use an enum instead of strings for color space values sent to the frontend.
+
+ * inspector/protocol/Canvas.json:
+ * inspector/scripts/codegen/generator.py:
+
+ Source/WebCore:
+
+ Use an enum instead of strings for color space values sent to the frontend.
+
+ * inspector/InspectorCanvas.cpp:
+ (WebCore::buildObjectForCanvasContextAttributes):
+
+ Source/WebInspectorUI:
+
+ For canvas context's with a color space attribute, show the color space next to the context type in the header
+ of each context card in the Graphics tab.
+
+ * UserInterface/Models/Canvas.js:
+ (WI.Canvas.displayNameForColorSpace):
+ * UserInterface/Views/CanvasContentView.js:
+ (WI.CanvasContentView.prototype.initialLayout):
+ * UserInterface/Views/CanvasOverviewContentView.css:
+ (.content-view.canvas-overview > .content-view.canvas > header > .titles > :matches(.subtitle, .color-space),):
+ (.content-view.canvas-overview > .content-view.canvas > header .color-space::before):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-10-05 Patrick Angle <pangle@apple.com>
+
+ Web Inspector: Show color space for canvases in the Graphics tab on the overview cards
+ https://bugs.webkit.org/show_bug.cgi?id=231205
+
+ Reviewed by Devin Rousso.
+
+ For canvas context's with a color space attribute, show the color space next to the context type in the header
+ of each context card in the Graphics tab.
+
+ * UserInterface/Models/Canvas.js:
+ (WI.Canvas.displayNameForColorSpace):
+ * UserInterface/Views/CanvasContentView.js:
+ (WI.CanvasContentView.prototype.initialLayout):
+ * UserInterface/Views/CanvasOverviewContentView.css:
+ (.content-view.canvas-overview > .content-view.canvas > header > .titles > :matches(.subtitle, .color-space),):
+ (.content-view.canvas-overview > .content-view.canvas > header .color-space::before):
+
</ins><span class="cx"> 2021-10-07 Alan Coon <alancoon@apple.com>
</span><span class="cx">
</span><span class="cx"> Cherry-pick r282616. rdar://problem/83955758
</span></span></pre></div>
<a id="branchessafari612branchSourceWebInspectorUIUserInterfaceModelsCanvasjs"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebInspectorUI/UserInterface/Models/Canvas.js (284278 => 284279)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebInspectorUI/UserInterface/Models/Canvas.js 2021-10-15 22:36:55 UTC (rev 284278)
+++ branches/safari-612-branch/Source/WebInspectorUI/UserInterface/Models/Canvas.js 2021-10-15 22:37:24 UTC (rev 284279)
</span><span class="lines">@@ -112,6 +112,19 @@
</span><span class="cx"> return null;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ static displayNameForColorSpace(colorSpace)
+ {
+ switch(colorSpace) {
+ case WI.Canvas.ColorSpace.SRGB:
+ return WI.unlocalizedString("sRGB");
+ case WI.Canvas.ColorSpace.DisplayP3:
+ return WI.unlocalizedString("Display P3");
+ }
+
+ console.assert(false, "Unknown canvas color space", colorSpace);
+ return null;
+ }
+
</ins><span class="cx"> static resetUniqueDisplayNameNumbers()
</span><span class="cx"> {
</span><span class="cx"> Canvas._nextContextUniqueDisplayNameNumber = 1;
</span><span class="lines">@@ -454,6 +467,11 @@
</span><span class="cx"> WebMetal: "webmetal",
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+WI.Canvas.ColorSpace = {
+ SRGB: "srgb",
+ DisplayP3: "display-p3",
+};
+
</ins><span class="cx"> WI.Canvas.RecordingState = {
</span><span class="cx"> Inactive: "canvas-recording-state-inactive",
</span><span class="cx"> ActiveFrontend: "canvas-recording-state-active-frontend",
</span></span></pre></div>
<a id="branchessafari612branchSourceWebInspectorUIUserInterfaceViewsCanvasContentViewjs"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js (284278 => 284279)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js 2021-10-15 22:36:55 UTC (rev 284278)
+++ branches/safari-612-branch/Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js 2021-10-15 22:37:24 UTC (rev 284279)
</span><span class="lines">@@ -105,6 +105,12 @@
</span><span class="cx"> subtitle.className = "subtitle";
</span><span class="cx"> subtitle.textContent = WI.Canvas.displayNameForContextType(this.representedObject.contextType);
</span><span class="cx">
</span><ins>+ if (this.representedObject.contextAttributes.colorSpace) {
+ let subtitle = titles.appendChild(document.createElement("span"));
+ subtitle.className = "color-space";
+ subtitle.textContent = "(" + WI.Canvas.displayNameForColorSpace(this.representedObject.contextAttributes.colorSpace) + ")";
+ }
+
</ins><span class="cx"> let navigationBar = new WI.NavigationBar;
</span><span class="cx">
</span><span class="cx"> if (this.representedObject.contextType === WI.Canvas.ContextType.Canvas2D || this.representedObject.contextType === WI.Canvas.ContextType.BitmapRenderer || this.representedObject.contextType === WI.Canvas.ContextType.WebGL || this.representedObject.contextType === WI.Canvas.ContextType.WebGL2) {
</span></span></pre></div>
<a id="branchessafari612branchSourceWebInspectorUIUserInterfaceViewsCanvasOverviewContentViewcss"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.css (284278 => 284279)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.css 2021-10-15 22:36:55 UTC (rev 284278)
+++ branches/safari-612-branch/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.css 2021-10-15 22:37:24 UTC (rev 284279)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> color: var(--text-color-gray-dark);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.content-view.canvas-overview > .content-view.canvas > header > .titles > .subtitle,
</del><ins>+.content-view.canvas-overview > .content-view.canvas > header > .titles > :matches(.subtitle, .color-space),
</ins><span class="cx"> .content-view.canvas-overview > .content-view.canvas > footer .memory-cost {
</span><span class="cx"> color: var(--text-color-gray-medium);
</span><span class="cx"> }
</span><span class="lines">@@ -85,6 +85,10 @@
</span><span class="cx"> content: "\00A0\2014\00A0"; /* — */;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.content-view.canvas-overview > .content-view.canvas > header .color-space::before {
+ content: "\00A0"; /* */;
+}
+
</ins><span class="cx"> .content-view.canvas-overview > .content-view.canvas.recording-active > header > .titles > .title {
</span><span class="cx"> color: white;
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>