Bug 15720 - [Transforms] Pixel cracks in scaled border-image
Summary: [Transforms] Pixel cracks in scaled border-image
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 39500 (view as bug list)
Depends on: 40151
Blocks: 15670
  Show dependency treegraph
 
Reported: 2007-10-26 23:11 PDT by mitz
Modified: 2013-11-07 16:42 PST (History)
13 users (show)

See Also:


Attachments
Test case (893 bytes, text/html)
2007-10-26 23:12 PDT, mitz
no flags Details
Propose patch (10.95 KB, patch)
2010-05-24 13:29 PDT, Damian Kaleta
no flags Details | Formatted Diff | Diff
Propose patch (10.96 KB, patch)
2010-05-24 13:46 PDT, Damian Kaleta
bdakin: review-
Details | Formatted Diff | Diff
Proposed patch. (13.74 KB, patch)
2010-05-28 15:32 PDT, Damian Kaleta
eric: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2007-10-26 23:11:44 PDT
Applying non-power-of-2 scaling to a box with border-image results in gross misalignment of the pieces of the border. In the attached test case, move the slider to see the effect.
Comment 1 mitz 2007-10-26 23:12:18 PDT
Created attachment 16896 [details]
Test case
Comment 2 mitz 2010-05-21 15:06:54 PDT
*** Bug 39500 has been marked as a duplicate of this bug. ***
Comment 3 mitz 2010-05-21 15:07:34 PDT
<rdar://problem/7994266>
Comment 4 Damian Kaleta 2010-05-24 13:29:24 PDT
Created attachment 56917 [details]
Propose patch
Comment 5 WebKit Review Bot 2010-05-24 13:31:30 PDT
Attachment 56917 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
WebCore/ChangeLog:6:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Damian Kaleta 2010-05-24 13:46:34 PDT
Created attachment 56920 [details]
Propose patch

Fixes tab typo.
Comment 7 Beth Dakin 2010-05-24 13:55:53 PDT
Comment on attachment 56920 [details]
Propose patch

I don't like the idea of GraphicsContext having two new implementations of drawTiledImage() that are copies of the existing implementations except that they take FloatRects instead of IntRects. That is a lot of code duplication, which is something we try to avoid. The GraphicsContext::drawImage() functions do a better job of sharing code. I suggest taking a look at them and devising a way to share as much code as possible.

Also, right now we only call roundToDevicePixels() from graphics-centric code…in other words, this would be the first patch where we called into that function directly from the render tree. I wonder if that is a separation that we want to maintain or not. It might be worth considering having drawTiledImage() call roundToDevicePixels() on the FloatRect rather than doing that at the call sites. 

I would be interested to see if Hyatt, Dan, or Darin has an opinion too :-)
Comment 8 Damian Kaleta 2010-05-28 15:32:20 PDT
Created attachment 57389 [details]
Proposed patch.
Comment 9 Beth Dakin 2010-06-01 13:01:29 PDT
Comment on attachment 57389 [details]
Proposed patch.

r=me
Comment 10 WebKit Review Bot 2010-06-03 16:41:16 PDT
http://trac.webkit.org/changeset/60642 might have broken GTK Linux 32-bit Release
Comment 11 James Robinson 2010-06-03 17:27:42 PDT
Hi.  This changed the rendering of fast/borders/border-image-rotate-transform.html on the chromium bots and I think it may be a regression.  Here's the expected rendering:

http://trac.webkit.org/export/60645/trunk/LayoutTests/platform/mac/fast/borders/border-image-rotate-transform-expected.png

and here's what we are getting:

http://build.chromium.org/buildbot/layout_test_results/webkit-rel-mac-webkit-org/results/layout-test-results/fast/borders/border-image-rotate-transform-actual.png

The B B B and R R R borders are at a different offset after the patch.  If this is intended, could you update the platform/mac expected results?
Comment 12 mitz 2010-06-03 17:32:32 PDT
(In reply to comment #11)
> Hi.  This changed the rendering of fast/borders/border-image-rotate-transform.html on the chromium bots and I think it may be a regression.

It’s a regression.
Comment 13 James Robinson 2010-06-03 18:01:42 PDT
Thanks for looking at it.  Given that it's a rendering regression I'm inclined to roll it out.
Comment 14 James Robinson 2010-06-03 18:32:34 PDT
rolled out: http://trac.webkit.org/changeset/60649
Comment 15 Eric Seidel (no email) 2010-06-03 21:02:11 PDT
Borked the gtk.
Comment 16 Eric Seidel (no email) 2010-06-03 21:56:22 PDT
(I was mistaken with my Gtk comment.)
Comment 17 Eric Seidel (no email) 2010-06-24 16:30:14 PDT
Comment on attachment 57389 [details]
Proposed patch.

nm.  Should be r-'d since it was rolled out.
Comment 18 Mike Taylor 2011-11-17 11:05:52 PST
I believe I'm running into this bug with -webkit-transform:translate(-50%, -50%) on a div with border-image in r100547. Removing the transform gets rid of the "crack" and blurriness. Same in Chrome Canary too.

see http://miketaylr.com/post/338660f5.png
Comment 19 Radar WebKit Bug Importer 2013-11-07 16:42:48 PST
<rdar://problem/15419921>