RESOLVED FIXED 23203
Multiple background properties are not retrievable via DOM method getComputedStyle
https://bugs.webkit.org/show_bug.cgi?id=23203
Summary Multiple background properties are not retrievable via DOM method getComputed...
Faruk Ates
Reported 2009-01-08 18:29:15 PST
Any element that has multiple backgrounds specified on it will not return any but the first background image's properties via DOM methods, though it does correctly return the background color (of which there can be only one anyway). See URL for the testcase. Testcase also shows the odd return value for the alpha property in rgba(); that bug is already filed here: https://bugs.webkit.org/show_bug.cgi?id=23202
Attachments
Patch (25.14 KB, patch)
2010-11-01 12:51 PDT, Simon Fraser (smfr)
hyatt: review+
Faruk Ates
Comment 1 2009-03-23 17:04:51 PDT
Just to elaborate on this radar, the CSS 3 spec says that the Computed Value for multiple background images should be: "as specified, but with URIs made absolute" Source: http://www.w3.org/TR/css3-background/#the-background-image
Faruk Ates
Comment 2 2009-03-24 16:57:37 PDT
New discovery: when setting multiple background images via el.style.cssText and retrieving them directly via el.style.backgroundImage, the value is correct: all images are listed with absolute paths, as per the spec. So this is just not working in getComputedStyle, only. I've adjusted the Summary.
NovakP
Comment 3 2010-10-31 09:11:11 PDT
Hi, any progress on this bug? This still doesn't work in WebKit two years after reporting.
Simon Fraser (smfr)
Comment 4 2010-11-01 08:46:25 PDT
*** Bug 44853 has been marked as a duplicate of this bug. ***
Simon Fraser (smfr)
Comment 5 2010-11-01 08:46:41 PDT
I started working on a patch for this.
Simon Fraser (smfr)
Comment 6 2010-11-01 12:51:36 PDT
Dave Hyatt
Comment 7 2010-11-01 12:54:22 PDT
Comment on attachment 72543 [details] Patch r=me, but do something about "size.size." heh.
Simon Fraser (smfr)
Comment 8 2010-11-01 13:40:17 PDT
WebKit Review Bot
Comment 9 2010-11-01 14:07:01 PDT
http://trac.webkit.org/changeset/71049 might have broken Qt Linux Release The following tests are not passing: fast/backgrounds/multiple-backgrounds-computed-style.html
Alexey Proskuryakov
Comment 10 2010-11-05 23:39:31 PDT
+++ trunk/LayoutTests/fast/backgrounds/script-tests/TEMPLATE.html 2010-11-01 20:39:48 UTC (rev 71049) This is evil. Splitting tests into .html and .js only adds indirection and wastes time for the person investigating failures. Please see e.g. <http://trac.webkit.org/browser/trunk/LayoutTests/fast/speech/input-text-language-tag.html> for what I think is a better pattern for script tests.
Eric Seidel (no email)
Comment 11 2010-11-05 23:42:34 PDT
Evil might be a strong word. It's been a historically recommended pattern. I think someone should write a document on good layout test design, but I think using the existing script-test pattern doesn't count as "evil". :)
Simon Fraser (smfr)
Comment 12 2010-11-06 11:55:26 PDT
I don't really care if the JS in in the test file or a separate file, but I was just following (possibly outdated) convention.
Alexey Proskuryakov
Comment 13 2010-11-06 12:31:21 PDT
I don't think this was ever a common convention for tests outside fast/js, but it certainly did have vocal proponents.
Note You need to log in before you can comment on or make changes to this bug.