tapir-dream / compatibility-detector

Automatically exported from code.google.com/p/compatibility-detector
Apache License 2.0
2 stars 5 forks source link

Add the getRealComputedStyle functions #135

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The getComputedStyle method cannot get the real computed value of the width or 
height property, so the shrink_to_fit_percentage_child detector used a tricky 
way to get the real computed value of the said properties.
Setting an element's 'display' property to 'none' and restoring it will cause 
the correlative elements to repaint very slowly. So We decide to create an 
internal function to traverse all elements in document tree to get the real 
computed value by hiding the BODY element and then restoring it, and add a 
function called getRealComputedStyle under chrome_comp object to retrieve these 
values of the specified element.

The chrome_comp.getComputedStyle function cannot get the style of pseudo 
elements, so add the second parameter "pseudo".

http://codereview.appspot.com/3943041/

Original issue reported on code.google.com by luyua...@beyondsoft.com on 11 Jan 2011 at 2:13