Bug #13367
openCorrect image rendering fallback
0%
Description
Consider the case where an image is rendered:
WPainter painter(device);
WPainter::Image image(path, width, height);
painter.drawImage(0.0, 0.0, image);
This can do one of two things depending on the environment.
- JS is available. Then the image is drawn on the client's side using
WPaintedWidget
's features. - JS is not available. The image is then loaded on the server and the blob data is pushed to the client.
However, the issue arises from the path
variable. This variable can be interpreted in two ways. In the first case, one expects a path relative to the docroot. The image is loaded statically by the browser.
In the second case, this would need to be a path that the application can work with. If the path is not known to the application, this will result in different behaviour. This is the case if the docroot != application working directory
. This is often the case.
This means the automatic fallback for images does NOT function in case that --docroot .
is not specified.
The proposed solution (under consideration) is to add a class that can map exposed files/resources to files on the filesystem of the server, linking them together. That way each implementation knows what path to choose.
Updated by Romain Mardulyn 8 days ago
- Status changed from New to InProgress
- Assignee set to Romain Mardulyn