In compositing mode, rendering artifacts have been detected on the repaint of elements on subpixel position. We suspect a problem on rounding computing sequences, this bug is reproducible on WebKit GTK and WPE. This bug is not reproducible with compositing mode disabled. AncestorGraphicsLayer 1st frame DirtyRect 2nd frame --------------- 24px --------------- 24px -------------- - 24.359375px - - 24px - - no painted --------------- 48.359375px --------------- 48px (Force compositing mode) ------------- 48px -------------- 48px - 24.359375px - - 25px - --> Need display this rect - 24px - --> - 25px - --------------- 72.7187 --------------- 73px ------------- -------------- BUG: one pixels line no repainted - 24.359375px - - 24px - - no painted - --------------- --------------- -------------- Source files for logs: <WebCore/platform/graphics/LayoutRect.h::snapRectToDevicePixels()> <WebCore/rendering/RenderLayerBacking.cpp::setContentsNeedDisplayInRect()> <WebCore/platform/graphics/nicosia/NicosiaPaintingEngineBasic.cpp::paint()> <WebCore/platform/graphics/cairo/CairoOperations.cpp::fillRectWithColor()> Dump logs with the previous HTML test: ***************************** 1st frame processing ************************************ ************** Update tiles in backingStore for GraphicsLayer ****************** setContentsNeedDisplayInRect LayoutRect before: x(48.000000) y(24.000000) w(59.000000) h(24.359375) snapRectToDevicePixels result after: x(48.000000) y(24.000000) width(59.000000) height(24.000000) outlineBoundsForRepaint container before: x(0.000000) y(0.000000) w(59.000000) h(24.359375) snapRectToDevicePixels result after: x(0.000000) y(0.000000) w(59.000000) h(24.000000) setContentsNeedDisplayInRect LayoutRect before: x(48.000000) y(48.359375) w(59.000000) h(24.359375) snapRectToDevicePixels result after: x(48.000000) y(48.000000) width(59.000000) height(25.000000) outlineBoundsForRepaint container before: x(0.000000) y(0.000000) w(59.000000) h(24.359375) snapRectToDevicePixels result after: x(0.000000) y(0.000000) w(59.000000) h(24) ?????? setContentsNeedDisplayInRect LayoutRecti before: x(48.000000) y(72.718750) w(59.000000) h(24.359375) snapRectToDevicePixels result after: x(48.000000) y(73.000000) width(59.000000) height(24.000000) outlineBoundsForRepaint container before: x(0.000000) y(0.000000) w(59.000000) h(24.359375) snapRectToDevicePixels result after: x(0.000000) y(0.000000) w(59.000000) h(24.000000) ******************************************************************************** ************ Paint Web contents ****************************************** ********* paint() --> fillRectWithColor() ************** cairo paint fill (Color::transparent) x(0.000000) y(0.000000) width(59.000000) height(25.000000) cairo paint fill contents x(0.000000) y(0.000000) width(58.000000) height(24.000000) ********* paint() --> fillRectWithColor() ************** new targetRect with size : width(59px) height(25px) cairo paint fill (Color::transparent) x(0.000000) y(0.000000) width(59.000000) height(25.000000) ------------> TO BE NOTED: this rect that should be updated in the second frame is filled with 25px of height <------------ cairo paint fill contents x(0.000000) y(0.000000) width(58.000000) height(25.000000) ********* paint() --> fillRectWithColor() ************** cairo paint fill (Color::transparent) x(0.000000) y(0.000000) width(59.000000) height(26.000000) cairo paint fill contents x(0.000000) y(1.000000) width(58.000000) height(24.000000) ************************************* end of frame ******************************************** ********************* 2nd frame processing in compositing mode ******************* ************** Update tile in backingStore for GraphicsLayer ****************** setContentsNeedDisplayInRect LayoutRect x(0.000000) y(0.000000) w(59.000000) h(24.359375) snapRectToDevicePixels result: x(0.000000) y(0.000000) width(59.000000) height(24.000000) ????? The layout position (0.0 , 0.0) is not the same with the previous frame(48.0 , 48.359375) Results with the two origins and a layout height of 24.359375px : for position(0.0 , 0.0) we get 0.0 + 24.359375 = int(24)px of height for position(48.0 , 48.359375) we get 48.359375 ==> 0.359375 + 24.359375 = 24,71875 = int(25)px of height We can see that for the same dirtyRect we get differents height. The calculation is done before moving by subpixels offset, perhaps we should take this for the rounding ? ******************************************************************************* ************ Paint Web contents ****************************************** ********* paint() --> fillRectWithColor() ************** cairo paint fill (Color::transparent) x(0.000000) y(0.000000) width(59.000000) height(24.000000) ????? -------> TO BE NOTED: this rect is now filled with only 24px of height why ?? cairo paint fill contents x(0.000000) y(0.000000) width(58.000000) height(25.000000) ********************* end of frame ******************************************************
Created attachment 356955 [details] Patch
Comment on attachment 356955 [details] Patch Attachment 356955 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/10337275 New failing tests: compositing/repaint-element-on-subpixel-position.html
Created attachment 356956 [details] Archive of layout-test-results from ews100 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 356955 [details] Patch Attachment 356955 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/10337290 New failing tests: compositing/repaint-element-on-subpixel-position.html
Created attachment 356957 [details] Archive of layout-test-results from ews107 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Comment on attachment 356955 [details] Patch Attachment 356955 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/10337359 New failing tests: compositing/repaint-element-on-subpixel-position.html
Created attachment 356958 [details] Archive of layout-test-results from ews114 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 356955 [details] Patch Attachment 356955 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/10337362 New failing tests: compositing/repaint-element-on-subpixel-position.html
Created attachment 356959 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Created attachment 357048 [details] Patch
Comment on attachment 357048 [details] Patch Attachment 357048 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/10353820 New failing tests: compositing/repaint-element-on-subpixel-position.html
Created attachment 357050 [details] Archive of layout-test-results from ews101 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 357048 [details] Patch Attachment 357048 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/10353827 New failing tests: compositing/repaint-element-on-subpixel-position.html
Created attachment 357051 [details] Archive of layout-test-results from ews105 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Comment on attachment 357048 [details] Patch Attachment 357048 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/10353881 New failing tests: compositing/repaint-element-on-subpixel-position.html
Created attachment 357056 [details] Archive of layout-test-results from ews112 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 357048 [details] Patch Attachment 357048 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/10353897 New failing tests: compositing/repaint-element-on-subpixel-position.html
Created attachment 357057 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Created attachment 357121 [details] Patch
Comment on attachment 357121 [details] Patch Attachment 357121 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/10367344 New failing tests: compositing/repaint-element-on-subpixel-position.html
Created attachment 357124 [details] Archive of layout-test-results from ews105 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Created attachment 357127 [details] Patch
Comment on attachment 357127 [details] Patch Attachment 357127 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/10368348 New failing tests: compositing/repaint-element-on-subpixel-position.html
Created attachment 357132 [details] Archive of layout-test-results from ews100 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 357127 [details] Patch Attachment 357127 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/10368384 New failing tests: compositing/repaint-element-on-subpixel-position.html
Created attachment 357134 [details] Archive of layout-test-results from ews106 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
What are you trying to do with this patch? Also please obsolete old attachments and comments. This bug is really noisy.
We had multiple issues to build a reference image that was suitable for the Mac test runners as well. The GTK test runner always output images in the 800x600 resolution, with no alpha channel. In the first iteration, the test case gave on Mac a test result in the 1600x1200 resolution, so the test had to be updated to give a 800x600 output on Mac too, by avoid using a 100% size on the body. Then there was an issue with the alpha channel, because the reference image was generated with the GTK test runner, which never adds an alpha channel in the PNG image if there is no transparent pixel (this is the behavior of the PNG writer in the cairo library). But the Mac test runner appears to always add an alpha channel, so the images did not match. We had to tweak a local build of the cairo library to always generate an alpha channel. This is all to add a test case because we noticed a rounding mismatch between the layout and painting when accelerated compositing is used. We would appreciate a feedback regarding the behavior on the Mac port. Is the issue reproduced as well?
Comment on attachment 357127 [details] Patch Attachment 357127 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/10368724 New failing tests: compositing/repaint-element-on-subpixel-position.html
Created attachment 357138 [details] Archive of layout-test-results from ews112 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 357127 [details] Patch Attachment 357127 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/10373285 New failing tests: compositing/repaint-element-on-subpixel-position.html
Created attachment 357180 [details] Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Created attachment 357566 [details] Patch
Well it's great to see the test passing on every EWS, but since the patch doesn't include any fix, that means the test must not be testing the bug you've identified, correct?
Hi (In reply to Catanzaro from comment #34) > Well it's great to see the test passing on every EWS, but since the patch > doesn't include any fix, that means the test must not be testing the bug > you've identified, correct? Hi Michael, Thanks for you feedback, I understand your remarks but tests are running without --pixel-tests argument which does not reproduce the problem. I has another remark, when I run tests with --pixel-tests, tests don't pass with GTK and WPE but work fine on MAC. Can you try with this layout test and tell me if you observe the same behavior ? I'm waiting for you feedback, thank you !
Hm OK, we actually don't run pixel tests normally, but I suppose it never hurts to have a new test, and can be useful to show when this is fixed.
Created attachment 358887 [details] Patch
Comment on attachment 358887 [details] Patch Attachment 358887 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/10708463 New failing tests: compositing/repaint/repaint-element-on-subpixel-position.html
Created attachment 358888 [details] Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 358887 [details] Patch Attachment 358887 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/10714781 New failing tests: compositing/repaint/repaint-element-on-subpixel-position.html
Created attachment 358914 [details] Archive of layout-test-results from ews100 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-highsierra Platform: Mac OS X 10.13.6
Comment on attachment 358887 [details] Patch Attachment 358887 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/10714879 New failing tests: compositing/repaint/repaint-element-on-subpixel-position.html
Created attachment 358918 [details] Archive of layout-test-results from ews107 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 358887 [details] Patch Attachment 358887 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/10717277 New failing tests: compositing/repaint/repaint-element-on-subpixel-position.html
Created attachment 358947 [details] Archive of layout-test-results from ews116 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-highsierra Platform: Mac OS X 10.13.6
Created attachment 359367 [details] Patch
Comment on attachment 359367 [details] Patch Attachment 359367 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/10783444 New failing tests: compositing/repaint/repaint-element-on-subpixel-position.html
Created attachment 359370 [details] Archive of layout-test-results from ews100 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-highsierra Platform: Mac OS X 10.13.6
Created attachment 359371 [details] Patch
Comment on attachment 359371 [details] Patch Attachment 359371 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/10783813 New failing tests: compositing/repaint/repaint-element-on-subpixel-position.html
Created attachment 359372 [details] Archive of layout-test-results from ews101 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-highsierra Platform: Mac OS X 10.13.6
Comment on attachment 359371 [details] Patch Attachment 359371 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/10783839 New failing tests: compositing/repaint/repaint-element-on-subpixel-position.html
Created attachment 359373 [details] Archive of layout-test-results from ews106 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 359371 [details] Patch Attachment 359371 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/10783877 New failing tests: compositing/repaint/repaint-element-on-subpixel-position.html
Created attachment 359377 [details] Archive of layout-test-results from ews114 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-highsierra Platform: Mac OS X 10.13.6
Comment on attachment 359371 [details] Patch Attachment 359371 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/10783892 New failing tests: compositing/repaint/repaint-element-on-subpixel-position.html
Created attachment 359378 [details] Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Created attachment 359456 [details] Patch
Attachment 359456 [details] did not pass style-queue: ERROR: Source/WebCore/rendering/RenderLayerBacking.cpp:816: Should have a space between // and comment [whitespace/comments] [4] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 359458 [details] Patch
Created attachment 359488 [details] Patch
Comment on attachment 359488 [details] Patch Attachment 359488 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/10799386 New failing tests: compositing/repaint/repaint-element-on-subpixel-position.html
Comment on attachment 359488 [details] Patch Attachment 359488 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/10801989 New failing tests: compositing/repaint/repaint-element-on-subpixel-position.html
Created attachment 359552 [details] Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Created attachment 363081 [details] Patch