Title: [112336] trunk/Source/WebCore
- Revision
- 112336
- Author
- [email protected]
- Date
- 2012-03-27 17:12:30 -0700 (Tue, 27 Mar 2012)
Log Message
Add assertions to valueForLength() and RenderBox::computeLogicalWidthInRegionUsing() to help with debugging.
https://bugs.webkit.org/show_bug.cgi?id=82393
Reviewed by Eric Seidel.
No new tests / adding assetions only.
* css/LengthFunctions.cpp:
(WebCore::valueForLength):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (112335 => 112336)
--- trunk/Source/WebCore/ChangeLog 2012-03-28 00:05:13 UTC (rev 112335)
+++ trunk/Source/WebCore/ChangeLog 2012-03-28 00:12:30 UTC (rev 112336)
@@ -1,3 +1,17 @@
+2012-03-27 Luke Macpherson <[email protected]>
+
+ Add assertions to valueForLength() and RenderBox::computeLogicalWidthInRegionUsing() to help with debugging.
+ https://bugs.webkit.org/show_bug.cgi?id=82393
+
+ Reviewed by Eric Seidel.
+
+ No new tests / adding assetions only.
+
+ * css/LengthFunctions.cpp:
+ (WebCore::valueForLength):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
+
2012-03-27 Tony Chang <[email protected]>
use the correct size when computing flex-pack space
Modified: trunk/Source/WebCore/css/LengthFunctions.cpp (112335 => 112336)
--- trunk/Source/WebCore/css/LengthFunctions.cpp 2012-03-28 00:05:13 UTC (rev 112335)
+++ trunk/Source/WebCore/css/LengthFunctions.cpp 2012-03-28 00:12:30 UTC (rev 112336)
@@ -80,9 +80,13 @@
return minimumValueForLength(length, maximumValue, renderView, roundPercentages);
case Auto:
return maximumValue;
+ // multiple assertions are used below to provide more useful debug output.
case Relative:
+ ASSERT_NOT_REACHED();
case Intrinsic:
+ ASSERT_NOT_REACHED();
case MinIntrinsic:
+ ASSERT_NOT_REACHED();
case Undefined:
ASSERT_NOT_REACHED();
return 0;
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (112335 => 112336)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2012-03-28 00:05:13 UTC (rev 112335)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2012-03-28 00:12:30 UTC (rev 112336)
@@ -1845,6 +1845,8 @@
else
logicalWidth = styleToUse->logicalMaxWidth();
+ ASSERT(!logicalWidth.isUndefined());
+
if (logicalWidth.isIntrinsicOrAuto()) {
RenderView* renderView = view();
LayoutUnit marginStart = minimumValueForLength(styleToUse->marginStart(), availableLogicalWidth, renderView);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes