<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>114331</bug_id>
          
          <creation_ts>2013-04-09 21:54:12 -0700</creation_ts>
          <short_desc>WebView color management differs from Safari</short_desc>
          <delta_ts>2013-08-26 15:48:15 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.8</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jonathan Hammer">jonathan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>benjamin</cc>
    
    <cc>cbiesinger</cc>
    
    <cc>jonathan</cc>
    
    <cc>mitz</cc>
    
    <cc>mmaerean</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>thorton</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>872587</commentid>
    <comment_count>0</comment_count>
    <who name="Jonathan Hammer">jonathan</who>
    <bug_when>2013-04-09 21:54:12 -0700</bug_when>
    <thetext>CSS colors appear to render in a different color space when the HTML document is loaded in Safari versus loaded in a WebView (from the Obj-C WebKit.framework).

Specifically, the document at http://ethreesoftware.com/misc/colortest.html has a background-color of rgb(70, 130, 180). When Safari renders the document and a screenshot is taken (PNG tagged with the current display profile), sampling the background pixels in Photoshop yields the correct rgb(70, 130, 180) values. If you load the exact same document inside of a WebView, take a screenshot, and sample the background pixels, the colors are instead rgb(58, 128, 182). Example screenshot at http://ethreesoftware.com/misc/webview-left-safari-right.png.

Not sure what might be going on here. Is the WebView not using NSDeviceRGBColorSpace but Safari is? Is there some kind of OpenGL surface interaction that&apos;s going on? The above results seem consistent no matter what application I test with (i.e. WebViews in Apple Mail, in third-party apps like Coda, and in reduced test-case apps consisting of just a window and a WebView—all render the &quot;wrong&quot; color).

OS X 10.8.3 (12D78), Safari 6.0.3 (8536.28.10)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>872593</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Hammer">jonathan</who>
    <bug_when>2013-04-09 21:58:55 -0700</bug_when>
    <thetext>Forgot to mention that this is WebKit version 536.28.10</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>872601</commentid>
    <comment_count>2</comment_count>
    <who name="">mitz</who>
    <bug_when>2013-04-09 22:31:35 -0700</bug_when>
    <thetext>&lt;rdar://problem/12263557&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>872605</commentid>
    <comment_count>3</comment_count>
      <attachid>197209</attachid>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2013-04-09 22:46:47 -0700</bug_when>
    <thetext>Created attachment 197209
Original test page.

Original test page attached.

Jonathan: for info, Radar is the internal bug tracker of Apple.
The link above and the keyword &quot;InRadar&quot; indicate this issue is now also being tracked by Apple.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>872615</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2013-04-09 23:04:29 -0700</bug_when>
    <thetext>Probably related to the fact that Safari is rendering via CoreAnimation.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>197209</attachid>
            <date>2013-04-09 22:46:47 -0700</date>
            <delta_ts>2013-04-09 22:46:47 -0700</delta_ts>
            <desc>Original test page.</desc>
            <filename>colortest.html</filename>
            <type>text/html</type>
            <size>176</size>
            <attacher name="Benjamin Poulain">benjamin</attacher>
            
              <data encoding="base64">PGh0bWw+PGhlYWQ+PC9oZWFkPjxib2R5IGNvbnRlbnRlZGl0YWJsZT0idHJ1ZSIgc3R5bGU9ImZv
bnQtZmFtaWx5OiBIZWx2ZXRpY2EsIHNhbnMtc2VyaWY7IGZvbnQtc2l6ZTogMTJweDsgYmFja2dy
b3VuZC1jb2xvcjogcmdiKDcwLCAxMzAsIDE4MCkgIWltcG9ydGFudDsiPkNvbG9yPC9ib2R5Pjwv
aHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>