@@ -926,51 +926,8 @@ bot.dom.getClientRect = function(elem) {
926
926
rect . top -= doc . documentElement . clientTop + doc . body . clientTop ;
927
927
}
928
928
929
- // On Gecko < 12, getBoundingClientRect does not account for CSS transforms.
930
- // TODO: Remove this when we drop support for FF3.6 and FF10.
931
- if ( goog . userAgent . GECKO && ! bot . userAgent . isEngineVersion ( 12 ) ) {
932
- transformLegacyFirefoxClientRect ( elem ) ;
933
- }
934
-
935
929
return rect ;
936
930
}
937
-
938
- function transformLegacyFirefoxClientRect ( container ) {
939
- var win = goog . dom . getWindow ( goog . dom . getOwnerDocument ( container ) ) ;
940
- var transform = win . getComputedStyle ( container , null ) [ 'MozTransform' ] ;
941
- var matches = transform . match ( bot . dom . CSS_TRANSFORM_MATRIX_REGEX_ ) ;
942
-
943
- if ( matches ) {
944
- var a = parseFloat ( matches [ 1 ] ) , b = parseFloat ( matches [ 2 ] ) ,
945
- c = parseFloat ( matches [ 3 ] ) , d = parseFloat ( matches [ 4 ] ) ,
946
- x = parseFloat ( matches [ 5 ] ) , y = parseFloat ( matches [ 6 ] ) ;
947
- var right = rect . left + rect . width , bottom = rect . top + rect . height ;
948
- var leftXa = rect . left * a , rightXa = right * a ,
949
- leftXb = rect . left * b , rightXb = right * b ,
950
- topXc = rect . top * c , bottomXc = bottom * c ,
951
- topXd = rect . top * d , bottomXd = bottom * d ;
952
- var topLeftX = leftXa + topXc + x ,
953
- topLeftY = leftXb + topXd + y ,
954
- topRightX = rightXa + topXc + x ,
955
- topRightY = rightXb + topXd + y ,
956
- bottomLeftX = leftXa + bottomXc + x ,
957
- bottomLeftY = leftXb + bottomXd + y ,
958
- bottomRightX = rightXa + bottomXc + x ,
959
- bottomRightY = rightXb + bottomXd + y ;
960
- rect . left = Math . min ( topLeftX , topRightX , bottomLeftX , bottomRightX ) ;
961
- rect . top = Math . min ( topLeftY , topRightY , bottomLeftY , bottomRightY ) ;
962
- var newRight = Math . max ( topLeftX , topRightX , bottomLeftX , bottomRightX ) ;
963
- var newBottom = Math . max ( topLeftY , topRightY , bottomLeftY , bottomRightY ) ;
964
- rect . width = newRight - rect . left ;
965
- rect . height = newBottom - rect . top ;
966
- }
967
-
968
- // The computed transform style not not take into account parent transforms.
969
- var parentContainer = bot . dom . getParentElement ( container ) ;
970
- if ( parentContainer ) {
971
- transformLegacyFirefoxClientRect ( parentContainer ) ;
972
- }
973
- }
974
931
} ;
975
932
976
933
0 commit comments