mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 848421. Part 1. Handle having no frame for the body element when determining the image filter to use for drawing the page background. r=roc
Just use nsCSSRendering::FindBackground like we do everywhere else for finding the background, it handles this case correctly. Although this function is used for other images besides backgrounds, when it is called on a canvas frame it can only be for a background image.
This commit is contained in:
parent
50e11d2f0a
commit
9142082cd4
@ -3771,10 +3771,14 @@ GraphicsFilter
|
||||
nsLayoutUtils::GetGraphicsFilterForFrame(nsIFrame* aForFrame)
|
||||
{
|
||||
GraphicsFilter defaultFilter = gfxPattern::FILTER_GOOD;
|
||||
nsIFrame *frame = nsCSSRendering::IsCanvasFrame(aForFrame) ?
|
||||
nsCSSRendering::FindBackgroundStyleFrame(aForFrame) : aForFrame;
|
||||
nsStyleContext *sc;
|
||||
if (nsCSSRendering::IsCanvasFrame(aForFrame)) {
|
||||
nsCSSRendering::FindBackground(aForFrame->PresContext(), aForFrame, &sc);
|
||||
} else {
|
||||
sc = aForFrame->StyleContext();
|
||||
}
|
||||
|
||||
switch (frame->StyleSVG()->mImageRendering) {
|
||||
switch (sc->StyleSVG()->mImageRendering) {
|
||||
case NS_STYLE_IMAGE_RENDERING_OPTIMIZESPEED:
|
||||
return gfxPattern::FILTER_FAST;
|
||||
case NS_STYLE_IMAGE_RENDERING_OPTIMIZEQUALITY:
|
||||
|
Loading…
Reference in New Issue
Block a user