Bug 210544 - TextureMapper renders video element with "object-fit: cover" incorrectly
Summary: TextureMapper renders video element with "object-fit: cover" incorrectly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-15 05:47 PDT by Tomoki Imai
Modified: 2020-04-21 02:33 PDT (History)
14 users (show)

See Also:


Attachments
patch (9.21 KB, patch)
2020-04-15 05:50 PDT, Tomoki Imai
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomoki Imai 2020-04-15 05:47:29 PDT
WebKitGTK with AC mode renders compositing/video/video-object-fit.html incorrectly.
The video layer spill outside of the box when "object-fit:cover" is specified.

We need to propagate GraphicsLayer::contentsClippingRect (see bug 52103) to TextureMapper.
Comment 1 Tomoki Imai 2020-04-15 05:50:28 PDT
Created attachment 396522 [details]
patch
Comment 2 Tomoki Imai 2020-04-15 05:55:45 PDT
Unfortunately compositing/video/video-object-fit.html is disabled due to bug 177536  and bug 163528.
It might be better to re-enabled it again if possible.
Comment 3 Tomoki Imai 2020-04-15 23:55:19 PDT
I tried to enable compositing/video/video-object-fit.html test in GTK, it doesn't crash for several run-webkit-tests.
But instead of crash, I see some text diff failure.
Where does "(anchor 0.00 0.00)" come from?

--- /app/webkit/WebKitBuild/Release/layout-test-results/compositing/video/video-object-fit-expected.txt
+++ /app/webkit/WebKitBuild/Release/layout-test-results/compositing/video/video-object-fit-actual.txt
@@ -1,5 +1,6 @@
-   
+        
 (GraphicsLayer
+  (anchor 0.00 0.00)
   (bounds 785.00 775.00)
   (children 1
     (GraphicsLayer
Comment 4 Zan Dobersek 2020-04-16 00:00:56 PDT
(In reply to Tomoki Imai from comment #3)
> I tried to enable compositing/video/video-object-fit.html test in GTK, it
> doesn't crash for several run-webkit-tests.
> But instead of crash, I see some text diff failure.
> Where does "(anchor 0.00 0.00)" come from?
> 
> ---
> /app/webkit/WebKitBuild/Release/layout-test-results/compositing/video/video-
> object-fit-expected.txt
> +++
> /app/webkit/WebKitBuild/Release/layout-test-results/compositing/video/video-
> object-fit-actual.txt
> @@ -1,5 +1,6 @@
> -   
> +        
>  (GraphicsLayer
> +  (anchor 0.00 0.00)
>    (bounds 785.00 775.00)
>    (children 1
>      (GraphicsLayer

It's just an extra parameter that's reported for the GraphicsLayer state, compared to the current -expected.txt baseline. It's not incorrect, but the -expected.txt file will require rebaselining.
Comment 5 Zan Dobersek 2020-04-16 00:01:40 PDT
Comment on attachment 396522 [details]
patch

Please do the rebaselining of the relevant test in a follow-up patch.
Comment 6 EWS 2020-04-16 00:11:46 PDT
Committed r260174: <https://trac.webkit.org/changeset/260174>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 396522 [details].
Comment 7 Tomoki Imai 2020-04-16 00:24:44 PDT
Thanks for your review!
I will try to re-enable compositing/video/video-object-fit.html and re-baselining in bug 177536 or bug 163528