Patch (Re: KHTML and jQuery)
Harri Porten
porten at froglogic.com
Sun Oct 12 21:44:31 BST 2008
Hi!
On Mon, 6 Oct 2008, Luciano Montanaro wrote:
> Tests completed in 72240 milliseconds.
> 61 tests of 1271 failed.
I investigated the first failure I got and reduced it to the following:
<div id="main" style="display: none;">
<div id="foo">Foo</div>
</div>
<script>
var x = document.getElementById('foo');
var s = document.defaultView.getComputedStyle(x, null);
alert("visibility: " + s.getPropertyValue("visibility"));
</script>
KHTML returns an empty string because the inner div has no render object
associated to it (not needed). Maksim pointed me to the computedStyle()
function that we already have which can be used instead of querying the
style from the render object. There are a dozen places that still use the
"renderer" pointer which I do not want to touch in one go without writing
a test of each invidual one. So I ask for permission to apply this lame
patch
http://www.froglogic.com/~porten/computed.diff
which moves the NULL pointer check down to place where we'd otherwise have
a crash. Most of the style properties work this way though and the number
of failures is down to 25.
Harri.
P.S. KDE bug report is http://bugs.kde.org/show_bug.cgi?id=149723
More information about the kfm-devel
mailing list