Bug 208869
| Summary: | [WPE] Two inline-image-box tests have been failing since added in r256773 | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Diego Pino <dpino> |
| Component: | New Bugs | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Diego Pino
Pull request: https://github.com/WebKit/WebKit/pull/50172
Diego Pino
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).