<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Add support for wide gamut for ShareableBitmap for image popovers"
   href="https://bugs.webkit.org/show_bug.cgi?id=164001#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Add support for wide gamut for ShareableBitmap for image popovers"
   href="https://bugs.webkit.org/show_bug.cgi?id=164001">bug 164001</a>
              from <span class="vcard"><a class="email" href="mailto:thorton&#64;apple.com" title="Tim Horton &lt;thorton&#64;apple.com&gt;"> <span class="fn">Tim Horton</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=292867&amp;action=diff" name="attach_292867" title="Patch">attachment 292867</a> <a href="attachment.cgi?id=292867&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=292867&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=292867&amp;action=review</a>

<span class="quote">&gt; Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:101
&gt; +    // Don't worry about extended colors on windows</span >

This is not a &quot;don't worry&quot;, this is a &quot;if it doesn't have support, fall back to device&quot;. I also think it should probably fall back to sRGB, not device (if we have sRGB support but not extended, this one should use sRGB, not &quot;device&quot;).

<span class="quote">&gt; Source/WebKit2/Shared/ShareableBitmap.cpp:41
&gt; +        if (screenSupportsExtendedColor())</span >

What Simon said before: this shouldn't depend on the screen. If wants extended color, it gets extended color.

<span class="quote">&gt; Source/WebKit2/Shared/ShareableBitmap.h:130
&gt; +    // FIXME: make sure this is ok, this seems to be windows thing, maybe??</span >

Get rid of the comment and solve it one way or the other :) Take a peek at ShareableBitmapCairo:

return Checked&lt;unsigned, RecordOverflow&gt;(cairo_format_stride_for_width(cairoFormat, size.width())) * size.height();

So I think you're OK.

<span class="quote">&gt; Source/WebKit2/Shared/cg/ShareableBitmapCG.cpp:67
&gt; +    if ((m_flags &amp; ShareableBitmap::SupportsExtendedColor) &amp;&amp; (screenSupportsExtendedColor()))</span >

No need for the parens around the function call at the end.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>