Changeset 112472 in webkit
- Timestamp:
- Mar 28, 2012 4:41:42 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r112454 r112472 1 2012-03-28 Joe Thomas <joethomas@motorola.com> 2 3 SL bot is hitting SHOULD NEVER BE REACHED in WebCore::valueForLength() on many tests 4 https://bugs.webkit.org/show_bug.cgi?id=82390 5 6 Reviewed by Simon Fraser. 7 8 This is an attempt to fix the MAC SL/Lion Bot issue as this issue is not reproducible locally. 9 The assertion happened when length type is Undefined in valueForLength() function but the assertion for Undefined length type 10 in RenderBox::computeLogicalWidthInRegionUsing which calls the above said function did not get hit. 11 12 This patch passes Length structure as const reference to Length calculation functions which avoids the call to the copy-constructor. 13 And it ensures that the Length structure is not getting modified during copy-construction. 14 15 * css/LengthFunctions.cpp: 16 (WebCore::minimumValueForLength): 17 (WebCore::valueForLength): 18 (WebCore::floatValueForLength): 19 * css/LengthFunctions.h: 20 (WebCore): 21 1 22 2012-03-28 Gavin Barraclough <barraclough@apple.com> 2 23 -
trunk/Source/WebCore/css/LengthFunctions.cpp
r112336 r112472 30 30 namespace WebCore { 31 31 32 int minimumValueForLength( Lengthlength, int maximumValue, RenderView* renderView, bool roundPercentages)32 int minimumValueForLength(const Length& length, int maximumValue, RenderView* renderView, bool roundPercentages) 33 33 { 34 34 switch (length.type()) { … … 69 69 } 70 70 71 int valueForLength( Lengthlength, int maximumValue, RenderView* renderView, bool roundPercentages)71 int valueForLength(const Length& length, int maximumValue, RenderView* renderView, bool roundPercentages) 72 72 { 73 73 switch (length.type()) { … … 97 97 98 98 // FIXME: when subpixel layout is supported this copy of floatValueForLength() can be removed. See bug 71143. 99 float floatValueForLength( Lengthlength, int maximumValue, RenderView* renderView)99 float floatValueForLength(const Length& length, int maximumValue, RenderView* renderView) 100 100 { 101 101 switch (length.type()) { … … 133 133 } 134 134 135 float floatValueForLength( Lengthlength, float maximumValue, RenderView* renderView)135 float floatValueForLength(const Length& length, float maximumValue, RenderView* renderView) 136 136 { 137 137 switch (length.type()) { -
trunk/Source/WebCore/css/LengthFunctions.h
r112301 r112472 30 30 struct Length; 31 31 32 int minimumValueForLength( Length, int maximumValue, RenderView* = 0, bool roundPercentages = false);33 int valueForLength( Length, int maximumValue, RenderView* = 0, bool roundPercentages = false);34 float floatValueForLength( Length, int maximumValue, RenderView* = 0);35 float floatValueForLength( Length, float maximumValue, RenderView* = 0);32 int minimumValueForLength(const Length&, int maximumValue, RenderView* = 0, bool roundPercentages = false); 33 int valueForLength(const Length&, int maximumValue, RenderView* = 0, bool roundPercentages = false); 34 float floatValueForLength(const Length&, int maximumValue, RenderView* = 0); 35 float floatValueForLength(const Length&, float maximumValue, RenderView* = 0); 36 36 37 37 } // namespace WebCore
Note: See TracChangeset
for help on using the changeset viewer.