| Index: Source/core/rendering/RenderObject.cpp
|
| diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
|
| index 9e96c62fc87aacd6c15321481e24bd16b9e02627..e5e485f2d7489c680686665c201a32d9583f992d 100644
|
| --- a/Source/core/rendering/RenderObject.cpp
|
| +++ b/Source/core/rendering/RenderObject.cpp
|
| @@ -2027,11 +2027,20 @@ void RenderObject::styleWillChange(StyleDifference diff, const RenderStyle* newS
|
| s_affectsParentBlock = false;
|
|
|
| if (view()->frameView()) {
|
| - bool newStyleSlowScroll = newStyle && newStyle->hasFixedBackgroundImage();
|
| - bool oldStyleSlowScroll = m_style && m_style->hasFixedBackgroundImage();
|
| + bool shouldBlitOnFixedBackgroundImage = false;
|
| +#if ENABLE(FAST_MOBILE_SCROLLING)
|
| + // On low-powered/mobile devices, preventing blitting on a scroll can cause noticeable delays
|
| + // when scrolling a page with a fixed background image. As an optimization, assuming there are
|
| + // no fixed positoned elements on the page, we can acclerate scrolling (via blitting) if we
|
| + // ignore the CSS property "background-attachment: fixed".
|
| + shouldBlitOnFixedBackgroundImage = true;
|
| +#endif
|
| +
|
| + bool newStyleSlowScroll = newStyle && !shouldBlitOnFixedBackgroundImage && newStyle->hasFixedBackgroundImage();
|
| + bool oldStyleSlowScroll = m_style && !shouldBlitOnFixedBackgroundImage && m_style->hasFixedBackgroundImage();
|
|
|
| bool drawsRootBackground = isRoot() || (isBody() && !rendererHasBackground(document().documentElement()->renderer()));
|
| - if (drawsRootBackground) {
|
| + if (drawsRootBackground && !shouldBlitOnFixedBackgroundImage) {
|
| if (view()->compositor()->supportsFixedRootBackgroundCompositing()) {
|
| if (newStyleSlowScroll && newStyle->hasEntirelyFixedBackground())
|
| newStyleSlowScroll = false;
|
|
|