Bug 185631 - [testcase] background-attachment: scroll incorrect
Summary: [testcase] background-attachment: scroll incorrect
Status: VERIFIED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: 4.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL: http://www.hixie.ch/tests/adhoc/css/b...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-26 18:32 UTC by Gérard Talbot (no longer involved)
Modified: 2009-05-21 06:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gérard Talbot (no longer involved) 2009-02-26 18:32:50 UTC
Self-explanatory testcase:

http://www.hixie.ch/tests/adhoc/css/background/block/001.html

Additional testcases:
http://www.hixie.ch/tests/adhoc/css/background/block/002.html
http://www.hixie.ch/tests/adhoc/css/background/block/003.html

Steps to reproduce:
Just scroll up|down the element

Expected results:
There should be 4 unbroken pictures of 2 cats visible at all times and those 4 pictures of the 2 cats should not move.

Actual results in Konqueror 4.1.2 (Kubuntu 8.10) and Konqueror 4.2.0 (MS-Windows):
Those 4 pictures of the 2 cats move.

This, I believe, may be a regression introduced by bug 169608.

Reference:
CSS 2.1, section 14.2.1 background-attachment
http://www.w3.org/TR/CSS21/colors.html#propdef-background-attachment
"
If an element has a scrolling mechanism (see 'overflow'), a 'fixed' background doesn't move with the element, and a 'scroll' background doesn't move with the scrolling mechanism.
"

Notes: Internet Explorer 8 RC1, Firefox 3.0.6, Opera 9.63, Safari 3.2.2 all pass this test.

Regards, Gérard
Comment 1 Germain Garand 2009-03-05 16:25:24 UTC
this is due to emulation of MSIE 6/7 behaviour for background-attachment.
MSIE8 has stopped doing this, I'm told, so we may go forward.

will fix by implementing CSS 3's background-attachment: local.
Comment 2 Germain Garand 2009-03-14 05:35:18 UTC
SVN commit 939169 by ggarand:

support CSS3's background-attachment: local
cf. http://www.w3.org/TR/css3-background/#background-attachment

Scrolling the background with the element content is actually the
behaviour we were using for background-attachment: scroll, in order to
emulate MSIE6/7, but that was a violation of CSS 2.1 (#185631),
so fix that too.

(also fix bogus borderTop addition in isPointInScrollbar, noticed while
playing with thick bordered background-attachment testcases)

BUG: 185631


 M  +8 -2      css/css_renderstyledeclarationimpl.cpp  
 M  +1 -1      css/cssparser.cpp  
 M  +6 -3      css/cssstyleselector.cpp  
 M  +344 -341  css/cssvalues.c  
 M  +233 -232  css/cssvalues.h  
 M  +5 -2      css/cssvalues.in  
 M  +1 -1      rendering/render_block.cpp  
 M  +2 -2      rendering/render_box.cpp  
 M  +1 -1      rendering/render_canvas.cpp  
 M  +10 -6     rendering/render_style.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=939169
Comment 3 Germain Garand 2009-03-14 23:42:27 UTC
SVN commit 939470 by ggarand:

automatically merged revision 939169:
support CSS3's background-attachment: local
cf. http://www.w3.org/TR/css3-background/#background-attachment

Scrolling the background with the element content is actually the
behaviour we were using for background-attachment: scroll, in order to
emulate MSIE6/7, but that was a violation of CSS 2.1 (#185631),
so fix that too.

(also fix bogus borderTop addition in isPointInScrollbar, noticed while
playing with thick bordered background-attachment testcases)

BUG: 185631

 M  +8 -2      css/css_renderstyledeclarationimpl.cpp  
 M  +1 -1      css/cssparser.cpp  
 M  +6 -3      css/cssstyleselector.cpp  
 M  +344 -341  css/cssvalues.c  
 M  +233 -232  css/cssvalues.h  
 M  +5 -2      css/cssvalues.in  
 M  +1 -1      rendering/render_block.cpp  
 M  +2 -2      rendering/render_box.cpp  
 M  +1 -1      rendering/render_canvas.cpp  
 M  +10 -6     rendering/render_style.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=939470
Comment 4 Gérard Talbot (no longer involved) 2009-05-21 06:43:14 UTC
I get expected results in Konqueror 4.2.3 under Kubuntu 9.04 (Linux 2.6.28-11-generic)

Marking as VERIFIED