Bug 256759 - [testcase] [CSS 2.1 Conformance] Background-repeat: repeat-x seems incorrectly rendered
Summary: [testcase] [CSS 2.1 Conformance] Background-repeat: repeat-x seems incorrectl...
Status: CONFIRMED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 4.5.5
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords: reproducible, testcase
Depends on:
Blocks:
 
Reported: 2010-11-13 01:39 UTC by Gérard Talbot (no longer involved)
Modified: 2011-03-24 20:25 UTC (History)
2 users (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) 2010-11-13 01:39:58 UTC
Version:           unspecified (using KDE 4.5.3) 
OS:                Linux

Reduced testcase
================

http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/background-repeat-repeat-x.html

As far as I can figure this out, repeat-x is inaccurately rendered in that testcase. I believe that testcase can not be reduced furthermore... but I could be wrong on this issue.

Secondary testcase (from CSS 2.1 test suite, RC3):
http://test.csswg.org/suites/css2.1/20101027/html4/background-attachment-006.htm
(border-top should not display any red; border-top should display silver dots with teal interspersed)

Reproducible: Always

Steps to Reproduce:
Load provided reduced testcase


Actual Results:  
There is a wide red rectangle.

Expected Results:  
There should be a wide bright green rectangle.

IE8, Firefox 3.6.12, Opera 10.63, Chrome 7.0.517.44 and Safari 5.0.2 pass this test and also passes the 
http://test.csswg.org/suites/css2.1/20101027/html4/background-attachment-006.htm
testcase.

My application and system:
- Konqueror 4.5.3, 
- Qt 4.7.0, 
- Linux 2.6.35-22-generic-pae, 
- i686 (32bits) 

regards, Gérard
Comment 1 Samuel Brack 2011-01-01 18:21:51 UTC
I can confirm this in 4.5.4.
Comment 2 Maksim Orlovich 2011-01-02 16:31:16 UTC
It's sort of related to repeating --- it basically seems like stuff in the non-repeated direction doesn't get clipped to the right thing --- when the background-origin is positive, it gets bounded by the padding box[1], and in the negative case... well, I am still trying to figure out what exactly it does then.

[1] The following CSS makes that case a bit clearer to see:
  <style type="text/css">
  div#outer
  {
  border: 1px solid blue;
  }

  div#inner
  {
  background-image: url("lime_color.png");
  background-position: 0px 5px; 
  background-repeat: repeat-x;
  border-top: transparent solid 100px;
  border-bottom: transparent solid 100px;
  width: 400px;
  height:10px;
  }
  </style>
Comment 3 Gérard Talbot (no longer involved) 2011-01-02 19:53:33 UTC
Maksim,

Updated: http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/background-repeat-repeat-x.html

New: http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/background-repeat-repeat-x-2.html (inspired by your [1] code but a bit modified)

best wishes for the new year, Gérard
Comment 4 Gérard Talbot (no longer involved) 2011-01-24 00:41:36 UTC
Maksim,

I have updated a bit
http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/background-repeat-repeat-x-2.html

Code is now:

  div#outer
  {
  border: blue solid 1px;
  width: 400px;
  }

  div#inner
  {
  background-image: url("../../GRAPHICS/PNG/lime_color.png");
  /* lime_color.png is a 100px wide by 100px tall image square */
  background-position: 0px 0px; 
  background-repeat: repeat-x;
  border-top: transparent solid 100px;
  border-bottom: transparent solid 100px;
  height: 1px;
  }

  <div id="outer">
    <div id="inner"></div>
  </div>

lime_color.png should be x-repeated 4 times and it should be viewable, visible through the transparent border-bottom.

regards, Gérard
Comment 5 Gérard Talbot (no longer involved) 2011-01-24 00:47:31 UTC
! Better (for the testcase) is:

border-bottom: transparent solid 99px;

so that border-bottom (99px) + height (1px) == background-image's height (lime_color.png has a 100px height).

Gérard
Comment 6 Gérard Talbot (no longer involved) 2011-01-24 04:52:59 UTC
Furthermore better (minimized) testcase:

http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/background-repeat-repeat-x-3.html

  div
  {
  background-image: url("../../GRAPHICS/PNG/lime_color.png");
  /* lime_color.png is a 100px wide by 100px tall image square */
  background-position: 0px 0px;
  background-repeat: repeat-x;
  border-bottom: transparent solid 100px;
  }
  </style>

  <p>Test passes if there is a bright green rectangle across the page.</p>

  <div></div>

Gérard
Comment 7 Gérard Talbot (no longer involved) 2011-01-24 19:30:57 UTC
2 other testcases:

http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/background-repeat-repeat-x-4.html

With a (white) dotted border-bottom, the background-image should shine through between white dots. 
The second line shows a lime dotted border-bottom creating a reversed color scheme, like a chess board or reversi board.

http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/background-repeat-repeat-4.html
is the exact same testcase but this time with background-repeat set to repeat (not repeat-x) and Konqueror 4.5.5 handles such testcase as expected.

This bug is, I believe, a valid bug because
{
"background" refers to the background of the content, padding and border areas.
}
http://www.w3.org/TR/CSS21/colors.html#background
so even though background-position sets an initial (x, y) coordinates within the padding box, that does not mean that the background-color and background-image are not supposed to be under border areas (border-box).

regards, Gérard
Comment 8 c_a 2011-03-24 20:03:44 UTC
I see something similar on the following pages

http://dixit.sourceforge.net/en/
or
http://dixit.sourceforge.net/en/shots.html
Comment 9 c_a 2011-03-24 20:13:11 UTC
Interesting, the rendering is wrong ONLY IF one page is opened in
the browser. Once the second tab is added, the rendering is done
correctly in the first tab!!!!
Comment 10 c_a 2011-03-24 20:19:02 UTC
Forgot to add:

Comments #8 and #9 happen for Konqueror 4.5.5 (KDE 4.5.5) on Fedora 14 KDE.