Bug 208869

Summary: [WPE] Two inline-image-box tests have been failing since added in r256773
Product: WebKit Reporter: Diego Pino <dpino>
Component: New BugsAssignee: Diego Pino <dpino>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=306105

Diego Pino
Reported 2020-03-10 10:04:55 PDT
The following tests have been failing since added in r256773: fast/images/inline-image-box-with-no-alt-should-collapse-no-quirks.html [ Failure ] fast/images/inline-image-box-with-no-alt-should-collapse-quirks.html [ Failure ] Diff: --- /home/dpino/workspace/webkit-wpe/layout-test-results/retries/fast/images/inline-image-box-with-no-alt-should-collapse-quirks-expected.txt +++ /home/dpino/workspace/webkit-wpe/layout-test-results/retries/fast/images/inline-image-box-with-no-alt-should-collapse-quirks-actual.txt @@ -1,10 +1,10 @@ QUIRKS mode. 1. 'alt' attribute is not set (image box should not collapse): - 20px 20px + 4px 4px 2. 'alt' attribute is set to a non-empty value (image box should not collapse): - 20px 20px 20px 20px + 4px 4px 4px 4px 3. 'alt' attribute is set to empty value (image box should collapse): 0px 0px --- /home/dpino/workspace/webkit-wpe/layout-test-results/retries/fast/images/inline-image-box-with-no-alt-should-collapse-no-quirks-expected.txt +++ /home/dpino/workspace/webkit-wpe/layout-test-results/retries/fast/images/inline-image-box-with-no-alt-should-collapse-no-quirks-actual.txt @@ -1,10 +1,10 @@ STANDARDS mode. 1. 'alt' attribute is not set (image box should not collapse): - 20px 20px + 4px 4px 2. 'alt' attribute is set to a non-empty value (image box should not collapse): - 20px 20px 20px 20px + 4px 4px 4px 4px 3. 'alt' attribute is set to empty value (image box should collapse): 0px 0px
Attachments
Diego Pino
Comment 1 2025-09-02 06:28:48 PDT
Diego Pino
Comment 2 2025-09-02 06:39:07 PDT
These two tests were failing because they differed in the image size, compared to the generic baseline (which was use by all WebKit ports). The reason why the image sizes differed was that at some point 'RenderImage' tried to load the file 'missingImage', which is an image resource bundled into some WebKit ports (for instance, in the case of WebKitGTK that image is bundled as a gresource file). In the case of WPE, there are not image resources bundled so an empty bitmap was returned instead: https://searchfox.org/wubkat/source/Source/WebCore/platform/graphics/ImageAdapter.cpp#40 That's why the image sizes were different. It turns out that the code featured in 'ImageAdapterGtk.cpp' that loads an image resource from a gresource file can be reused for WPE, since it only depends on GLIB functions. So, adding a specific 'ImageAdapterWPE.cpp' file that can load image resources from a gresource file, plus adding those image resources into the already existing gresource file that is bundled into WPE, solves this bug (probably this change will make other tests pass too).
Note You need to log in before you can comment on or make changes to this bug.