[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Patch (Re: KHTML and jQuery)
From:       Harri Porten <porten () froglogic ! com>
Date:       2008-10-12 20:44:31
Message-ID: Pine.LNX.4.64.0810122230480.25238 () pudel ! froglogic ! com
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic