Bug 19770

Summary: Background-position declaration involves requirements when at least one value is not a keyword
Product: WebKit Reporter: Gérard Talbot <browserbugs2>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, bfulgham, mitz, oliver, rniwa, simon.fraser, zalan
Priority: P2    
Version: 525.x (Safari 3.1)   
Hardware: PC   
OS: Windows XP   
URL: http://www.gtalbot.org/BrowserBugsSection/MSIE8Bugs/background-position-test1.html

Description Gérard Talbot 2008-06-25 11:30:37 PDT
CSS 2.1, section 14.2.1 background-position 
http://www.w3.org/TR/CSS21/colors.html#propdef-background-position
states
"If at least one value is not a keyword, then the first value represents the horizontal position and the second represents the vertical position."

The order of the 2 values in the declaration for background-position matters decisively when at least one value is not a keyword. The W3C CSS validator will report a parsing error when the correct order is not respected.

Steps to reproduce
------------------
1a) Load provided URL
1b) Load http://www.gtalbot.org/BrowserBugsSection/MSIE8Bugs/background-position-test2.html

Expected results
----------------
1a) A green box with a background-image saying "Your browser PASSED this test"
1b) The white box inside the green box is located at top left corner

Actual results in Safari 3.1.2 build 525.21
-------------------------------------------
1a) A red box with a background-image saying "Your browser FAILED this test"
1b) The white box inside the green box is located at bottom right corner

Additional info, references, notes:
-----------------------------------
The W3C CSS validator will report
1a) "values are not recognized" due to mismatched values
1b) "[values] are incompatible" due to mismatched values

2-
https://bugzilla.mozilla.org/show_bug.cgi?id=422790

http://samples.msdn.microsoft.com/csstestpages/Chapter_14/background-position-042.htm
http://samples.msdn.microsoft.com/csstestpages/Chapter_14/background-position-045.htm
http://samples.msdn.microsoft.com/csstestpages/Chapter_14/background-position-046.htm

Those tests are invalid. (Already mentioned on public-css-testsuite.)
{        <meta name="assert" content="Verify bottom is valid declaration for first input of background-position." />
}

same goes for:
background-position: bottom 50%;
background-position: 50% left;
background-position: 50% right;

I searched for a duplicate and did not find any.
Comment 1 Gérard Talbot 2008-07-05 16:43:14 PDT
http://www.hixie.ch/tests/adhoc/css/background/position/002.html
Safari 3.1.2 build 525.21 and Safari 4.0 build 526.11 fail 12 tests out of 50.
Exactly the same tests are failed in both versions.

http://www.hixie.ch/tests/adhoc/css/background/position/003.html
Safari 3.1.2 build 525.21 and Safari 4.0 build 526.11 fail 13 tests out of 50.
Exactly the same tests are failed in both versions.

Firefox 3.0 build 2008052906 and Opera 9.51 build 10081 pass all 50 tests of each of both webpages.
Comment 2 Oliver Hunt 2008-08-22 15:15:10 PDT
Possibly worth looking at http://bugs.kde.org/show_bug.cgi?id=169612
Comment 3 Gérard Talbot 2020-01-06 18:46:59 PST
Is this bug fixed? 

I ask because I do not have and can not use the latest Safari 13.x.

For whatever it's worth, Epiphany Technological Preview 3.34.0-32-g514d1bfb6 (WebKitGTK 2.26.1) passes both

http://www.gtalbot.org/BrowserBugsSection/MSIE8Bugs/background-position-test1.html

and

http://www.gtalbot.org/BrowserBugsSection/MSIE8Bugs/background-position-test2.html
Comment 4 Ahmad Saleem 2022-08-06 19:28:43 PDT
I am unable to reproduce this bug based on test cases from Comment 03 and in both - Safari 15.6 matches with other browsers (Chrome Canary 106 and Firefox Nightly 105). As for the test cases mentioned in Comment 01, there are some failures:

In 002 test case > Safari 15.6 fails in one case (13th from the last) and all other browser fail on the same.

In 003 test case - all browsers pass all tests.

I am going to mark this as "RESOLVED CONFIGURATION CHANGED" since it is passed along the way and now all browsers match with each other.

Please reopen, if I did incorrect testing. Thanks!