зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
4fe5f93b2b
Коммит
488def7910
|
@ -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:
|
||||
|
|
Загрузка…
Ссылка в новой задаче