SL bot is hitting SHOULD NEVER BE REACHED in WebCore::valueForLength() on many tests
https://bugs.webkit.org/show_bug.cgi?id=82390
Patch by Joe Thomas <joethomas@motorola.com> on 2012-03-28
Reviewed by Simon Fraser.
This is an attempt to fix the MAC SL/Lion Bot issue as this issue is not reproducible locally.
The assertion happened when length type is Undefined in valueForLength() function but the assertion for Undefined length type
in RenderBox::computeLogicalWidthInRegionUsing which calls the above said function did not get hit.
This patch passes Length structure as const reference to Length calculation functions which avoids the call to the copy-constructor.
And it ensures that the Length structure is not getting modified during copy-construction.
* css/LengthFunctions.cpp:
(WebCore::minimumValueForLength):
(WebCore::valueForLength):
(WebCore::floatValueForLength):
* css/LengthFunctions.h:
(WebCore):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112472
268f45cc-cd09-0410-ab3c-
d52691b4dbfc