long7181226 / compatibility-detector

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

Add the getRealComputedStyle functions #138

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Add the getRealComputedStyle functions

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

Original issue reported on code.google.com by luyua...@beyondsoft.com on 25 Jan 2011 at 9:39

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".

Original comment by luyua...@beyondsoft.com on 25 Jan 2011 at 9:46

GoogleCodeExporter commented 9 years ago
http://codereview.appspot.com/4008047/

Original comment by luyua...@beyondsoft.com on 25 Jan 2011 at 9:46