REGRESSION (r180582): background-attachment: local; does not scroll the background...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Jul 2015 04:29:25 +0000 (04:29 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Jul 2015 04:29:25 +0000 (04:29 +0000)
commit7f1fc52bfb324d228c2e8634eb16b27d4e440577
tree66a36df4b7eff0a1f8b87996d2dfdf82b20835bb
parentc38fc7ba2c73dd5c0e67d7a66202f6930fc84320
REGRESSION (r180582): background-attachment: local; does not scroll the background image when scrolling the the element's contents
https://bugs.webkit.org/show_bug.cgi?id=146623

Reviewed by Zalan Bujtas.

Source/WebCore:

r180582 erroneously asserted that m_destOrigin in BackgroundImageGeometry was unused.
However, it is needed to compute the correct phase when the destination rect is
altered by clipping.

Test: fast/backgrounds/background-attachment-local.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderBoxModelObject.h:
(WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
(WebCore::BackgroundImageGeometry::relativePhase):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawMaskForRenderer):

LayoutTests:

Ref test for background-attachment: local.

* fast/backgrounds/background-attachment-local-expected.html: Added.
* fast/backgrounds/background-attachment-local.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/backgrounds/background-attachment-local-expected.html [new file with mode: 0644]
LayoutTests/fast/backgrounds/background-attachment-local.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderBoxModelObject.h
Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp