<?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>25458</bug_id>
          
          <creation_ts>2009-04-28 14:58:58 -0700</creation_ts>
          <short_desc>Restore alignment to device pixel boundaries.</short_desc>
          <delta_ts>2022-09-04 13:31:33 -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>Images</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Carson">dacarson</reporter>
          <assigned_to name="David Carson">dacarson</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>hyatt</cc>
    
    <cc>mitz</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>socket.h</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>119172</commentid>
    <comment_count>0</comment_count>
    <who name="David Carson">dacarson</who>
    <bug_when>2009-04-28 14:58:58 -0700</bug_when>
    <thetext>It seems that the calls to roundToDevicePixel() were dropped in http://trac.webkit.org/changeset/34210 
This results in blurry images when zoomed out as the images are not aligned to pixel boundaries. 
I spoke with the author of r34210 change and he said that it caused some regression of images. After some investigation, the regression seems to be because of the srcRect being aligned as well as the destination rect.
 I would like to restore this feature.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119175</commentid>
    <comment_count>1</comment_count>
      <attachid>29864</attachid>
    <who name="David Carson">dacarson</who>
    <bug_when>2009-04-28 15:02:43 -0700</bug_when>
    <thetext>Created attachment 29864
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119177</commentid>
    <comment_count>2</comment_count>
    <who name="David Carson">dacarson</who>
    <bug_when>2009-04-28 15:03:40 -0700</bug_when>
    <thetext>Ran DRT and there was no regressions on my platform.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119197</commentid>
    <comment_count>3</comment_count>
      <attachid>29864</attachid>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2009-04-28 16:10:55 -0700</bug_when>
    <thetext>Comment on attachment 29864
patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119241</commentid>
    <comment_count>4</comment_count>
    <who name="David Carson">dacarson</who>
    <bug_when>2009-04-28 18:00:38 -0700</bug_when>
    <thetext>Didn&apos;t run pixel tests.
When I run those, these tests have an issue:
svg/W3C-SVG-1.1/render-groups-03-t.svg	expected image	image diffs	0.16%
svg/carto.net/scrollbar.svg	expected image	image diffs	0.15%
svg/custom/focus-ring.svg	expected image	image diffs	0.19%
svg/custom/image-small-width-height.svg	expected image	image diffs	0.33%

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119244</commentid>
    <comment_count>5</comment_count>
    <who name="David Carson">dacarson</who>
    <bug_when>2009-04-28 18:21:22 -0700</bug_when>
    <thetext>With the test case:
svg/custom/focus-ring.svg
The focus ring is now in the correct place!
With the test case:
svg/custom/image-small-width-height.svg
There was slight blurriness where the blue bar meets the green checker pattern. The line is now much sharper.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119265</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2009-04-28 21:39:18 -0700</bug_when>
    <thetext>This pixel test seems to have regressed with this patch:  fast/repaint/fixed.html
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119266</commentid>
    <comment_count>7</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2009-04-28 21:49:45 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; This pixel test seems to have regressed with this patch: 
&gt; fast/repaint/fixed.html

Mitz informs me this is:  https://bugs.webkit.org/show_bug.cgi?id=25269

Since the test is already broken, I will check in new results with this patch.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119271</commentid>
    <comment_count>8</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2009-04-28 22:52:59 -0700</bug_when>
    <thetext>$ git svn dcommit
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	LayoutTests/ChangeLog
	M	LayoutTests/platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.checksum
	M	LayoutTests/platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.png
	M	LayoutTests/platform/mac/svg/custom/focus-ring-expected.checksum
	M	LayoutTests/platform/mac/svg/custom/focus-ring-expected.png
	M	LayoutTests/platform/mac/svg/custom/image-small-width-height-expected.checksum
	M	LayoutTests/platform/mac/svg/custom/image-small-width-height-expected.png
	M	WebCore/ChangeLog
	M	WebCore/platform/graphics/cg/ImageCG.cpp
Committed r42987

http://trac.webkit.org/changeset/42987
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119424</commentid>
    <comment_count>9</comment_count>
    <who name="">mitz</who>
    <bug_when>2009-04-29 21:42:00 -0700</bug_when>
    <thetext>This change caused bug 25476.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119491</commentid>
    <comment_count>10</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2009-04-30 11:29:01 -0700</bug_when>
    <thetext>Reopening as this change was backed out for Bug 25476.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120131</commentid>
    <comment_count>11</comment_count>
      <attachid>29864</attachid>
    <who name="David Levin">levin</who>
    <bug_when>2009-05-06 12:56:45 -0700</bug_when>
    <thetext>Comment on attachment 29864
patch

Clearing r+ to move out of commit queue (and since the change was backed out due to some failed test).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896038</commentid>
    <comment_count>12</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-03 10:23:09 -0700</bug_when>
    <thetext>The patch was trying to add this and now we have it in Webkit Source:

https://github.com/WebKit/WebKit/blob/61e05e09838b2da199e3bf1afe7a6120eee9cb4d/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp#L337

But it is for iOS only. Is something else needed or we can mark this as &quot;RESOLVED CONFIGURATION CHANGED&quot;? Thanks!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>29864</attachid>
            <date>2009-04-28 15:02:43 -0700</date>
            <delta_ts>2010-06-10 17:07:47 -0700</delta_ts>
            <desc>patch</desc>
            <filename>reinstateAlignment.txt</filename>
            <type>text/plain</type>
            <size>1394</size>
            <attacher name="David Carson">dacarson</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA0Mjk2NCkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTUgQEAKKzIwMDktMDQtMjggIERhdmlkIENhcnNvbiAgPGRhY2Fyc29uQGFwcGxl
LmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBS
ZXN0b3JlIGFsaWdubWVudCB0byBkZXZpY2UgcGl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