Bug 129859

Summary: Subpixel rendering: Transform origin is miscalculated when RenderLayer's offsetfromRenderer has device pixel fraction value.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, esprehn+autocc, glenn, kondapallykalyan, rniwa, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 129961    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2
none
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion
none
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2
none
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion
none
Patch
none
Patch none

zalan
Reported 2014-03-06 20:35:57 PST
Miscalculated transform origin produces off by one rendering errors for transforms like rotate.
Attachments
Patch (5.85 KB, patch)
2014-03-08 18:33 PST, zalan
no flags
Patch (9.20 KB, patch)
2014-03-09 17:04 PDT, zalan
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 (493.61 KB, application/zip)
2014-03-09 18:10 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion (523.76 KB, application/zip)
2014-03-09 18:32 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2 (495.35 KB, application/zip)
2014-03-09 19:05 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion (522.97 KB, application/zip)
2014-03-09 19:34 PDT, Build Bot
no flags
Patch (14.22 KB, patch)
2014-03-11 20:44 PDT, zalan
no flags
Patch (14.99 KB, patch)
2014-03-18 20:14 PDT, zalan
no flags
zalan
Comment 1 2014-03-08 16:44:36 PST
This patch requires to be able to test hidpi compositing layers. bug 129961
zalan
Comment 2 2014-03-08 18:33:11 PST
Simon Fraser (smfr)
Comment 3 2014-03-08 19:41:42 PST
Comment on attachment 226244 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=226244&action=review > Source/WebCore/rendering/RenderLayerBacking.cpp:845 > + LayoutRect layerBounds(LayoutPoint(roundedForPainting(offsetFromParent, deviceScaleFactor)), borderBox.size()); It's a bit odd that the origin is device-pixel snapped, but the size is not. Does this work for large boxes where a percentage transform-origin could be visibly affected by the exact size?
zalan
Comment 4 2014-03-08 19:43:05 PST
(In reply to comment #3) > (From update of attachment 226244 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=226244&action=review > > > Source/WebCore/rendering/RenderLayerBacking.cpp:845 > > + LayoutRect layerBounds(LayoutPoint(roundedForPainting(offsetFromParent, deviceScaleFactor)), borderBox.size()); > > It's a bit odd that the origin is device-pixel snapped, but the size is not. Does this work for large boxes where a percentage transform-origin could be visibly affected by the exact size? Good catch. It is most likely incorrect.
zalan
Comment 5 2014-03-09 17:04:39 PDT
zalan
Comment 6 2014-03-09 17:04:55 PDT
Comment on attachment 226262 [details] Patch EWSing
Build Bot
Comment 7 2014-03-09 18:10:22 PDT
Comment on attachment 226262 [details] Patch Attachment 226262 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/6043000496979968 New failing tests: compositing/columns/composited-columns.html compositing/repaint/resize-repaint.html compositing/visibility/visibility-image-layers-dynamic.html compositing/repaint/invalidations-on-composited-layers.html compositing/geometry/limit-layer-bounds-opacity-transition.html
Build Bot
Comment 8 2014-03-09 18:10:25 PDT
Created attachment 226263 [details] Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-10 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Build Bot
Comment 9 2014-03-09 18:32:14 PDT
Comment on attachment 226262 [details] Patch Attachment 226262 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/4645108901216256 New failing tests: compositing/columns/composited-columns.html compositing/repaint/resize-repaint.html compositing/visibility/visibility-image-layers-dynamic.html compositing/repaint/invalidations-on-composited-layers.html compositing/geometry/limit-layer-bounds-opacity-transition.html
Build Bot
Comment 10 2014-03-09 18:32:17 PDT
Created attachment 226264 [details] Archive of layout-test-results from webkit-ews-03 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-03 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Build Bot
Comment 11 2014-03-09 19:05:01 PDT
Comment on attachment 226262 [details] Patch Attachment 226262 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/6612167415562240 New failing tests: compositing/columns/composited-columns.html compositing/repaint/resize-repaint.html compositing/visibility/visibility-image-layers-dynamic.html compositing/repaint/invalidations-on-composited-layers.html compositing/geometry/limit-layer-bounds-opacity-transition.html
Build Bot
Comment 12 2014-03-09 19:05:05 PDT
Created attachment 226265 [details] Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-11 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Build Bot
Comment 13 2014-03-09 19:34:02 PDT
Comment on attachment 226262 [details] Patch Attachment 226262 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/6541343404851200 New failing tests: compositing/columns/composited-columns.html compositing/repaint/resize-repaint.html compositing/visibility/visibility-image-layers-dynamic.html compositing/repaint/invalidations-on-composited-layers.html compositing/geometry/limit-layer-bounds-opacity-transition.html
Build Bot
Comment 14 2014-03-09 19:34:05 PDT
Created attachment 226271 [details] Archive of layout-test-results from webkit-ews-07 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-07 Port: mac-mountainlion Platform: Mac OS X 10.8.5
zalan
Comment 15 2014-03-11 20:44:33 PDT
Simon Fraser (smfr)
Comment 16 2014-03-11 21:00:14 PDT
Comment on attachment 226469 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=226469&action=review > LayoutTests/platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt:114 > + (anchor 0.50 0.50) Are these just slightly different from 0.5? Maybe we need to print more precision. > Source/WebCore/rendering/RenderLayerBacking.cpp:848 > + FloatPoint3D anchor(enclosingRelativeCompositingBounds.width() != 0.0f ? ((layerOffset.x() - enclosingRelativeCompositingBounds.x()) + transformOrigin.x()) > + / enclosingRelativeCompositingBounds.width() : 0.5f, enclosingRelativeCompositingBounds.height() != 0.0f ? ((layerOffset.y() - enclosingRelativeCompositingBounds.y()) 0.0f -> 0, 0.5f -> 0.5
zalan
Comment 17 2014-03-18 20:14:52 PDT
zalan
Comment 18 2014-03-18 20:15:40 PDT
Comment on attachment 227150 [details] Patch EWS testing.
zalan
Comment 19 2014-03-18 20:22:50 PDT
(In reply to comment #16) > (From update of attachment 226469 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=226469&action=review > > > LayoutTests/platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt:114 > > + (anchor 0.50 0.50) > > Are these just slightly different from 0.5? Maybe we need to print more precision. bug 130442 > > > Source/WebCore/rendering/RenderLayerBacking.cpp:848 > > + FloatPoint3D anchor(enclosingRelativeCompositingBounds.width() != 0.0f ? ((layerOffset.x() - enclosingRelativeCompositingBounds.x()) + transformOrigin.x()) > > + / enclosingRelativeCompositingBounds.width() : 0.5f, enclosingRelativeCompositingBounds.height() != 0.0f ? ((layerOffset.y() - enclosingRelativeCompositingBounds.y()) > > 0.0f -> 0, 0.5f -> 0.5 done.
WebKit Commit Bot
Comment 20 2014-03-19 07:26:02 PDT
Comment on attachment 227150 [details] Patch Clearing flags on attachment: 227150 Committed r165892: <http://trac.webkit.org/changeset/165892>
WebKit Commit Bot
Comment 21 2014-03-19 07:26:07 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.