SL bot is hitting SHOULD NEVER BE REACHED in WebCore::valueForLength() on many tests
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Mar 2012 23:41:42 +0000 (23:41 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Mar 2012 23:41:42 +0000 (23:41 +0000)
commita6211527c9088290acf3d0e39f7a9b7cffdcfcfe
tree4815b812a9f41bb95ff3decac02e35331c9ff558
parent550c0c1cb3102245cd53f2c142b521f15e5a165f
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
Source/WebCore/ChangeLog
Source/WebCore/css/LengthFunctions.cpp
Source/WebCore/css/LengthFunctions.h