Title: [109940] branches/subpixellayout/Source/WebCore
- Revision
- 109940
- Author
- [email protected]
- Date
- 2012-03-06 11:44:53 -0800 (Tue, 06 Mar 2012)
Log Message
Add size_t version of AppUnit::operator/ on branch.
Modified Paths
Diff
Modified: branches/subpixellayout/Source/WebCore/platform/FractionalLayoutUnit.h (109939 => 109940)
--- branches/subpixellayout/Source/WebCore/platform/FractionalLayoutUnit.h 2012-03-06 19:33:07 UTC (rev 109939)
+++ branches/subpixellayout/Source/WebCore/platform/FractionalLayoutUnit.h 2012-03-06 19:44:53 UTC (rev 109940)
@@ -383,6 +383,12 @@
return a / FractionalLayoutUnit(b);
}
+
+inline FractionalLayoutUnit operator/(const FractionalLayoutUnit& a, size_t b)
+{
+ return a / FractionalLayoutUnit(b);
+}
+
inline float operator/(const float a, const FractionalLayoutUnit& b)
{
return a / b.toFloat();
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderFlexibleBox.cpp (109939 => 109940)
--- branches/subpixellayout/Source/WebCore/rendering/RenderFlexibleBox.cpp 2012-03-06 19:33:07 UTC (rev 109939)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderFlexibleBox.cpp 2012-03-06 19:44:53 UTC (rev 109940)
@@ -661,7 +661,7 @@
if (flexPack == PackCenter)
return availableFreeSpace / 2;
if (flexPack == PackDistribute && numberOfChildren)
- return availableFreeSpace / static_cast<unsigned int>(2 * numberOfChildren);
+ return availableFreeSpace / (2 * numberOfChildren);
} else if (availableFreeSpace < 0) {
if (flexPack == PackCenter || flexPack == PackDistribute)
return availableFreeSpace / 2;
@@ -673,9 +673,9 @@
{
if (availableFreeSpace > 0 && numberOfChildren > 1) {
if (flexPack == PackJustify)
- return availableFreeSpace / static_cast<unsigned int>(numberOfChildren - 1);
+ return availableFreeSpace / (numberOfChildren - 1);
if (flexPack == PackDistribute)
- return availableFreeSpace / static_cast<unsigned int>(numberOfChildren);
+ return availableFreeSpace / numberOfChildren;
}
return 0;
}
Modified: branches/subpixellayout/Source/WebCore/rendering/RootInlineBox.cpp (109939 => 109940)
--- branches/subpixellayout/Source/WebCore/rendering/RootInlineBox.cpp 2012-03-06 19:33:07 UTC (rev 109939)
+++ branches/subpixellayout/Source/WebCore/rendering/RootInlineBox.cpp 2012-03-06 19:44:53 UTC (rev 109940)
@@ -359,7 +359,6 @@
LayoutUnit lineGridFontAscent = lineGrid->style()->fontMetrics().ascent(baselineType());
LayoutUnit lineGridFontHeight = lineGridBox->logicalHeight();
LayoutUnit firstTextTop = lineGridBlockOffset + lineGridBox->logicalTop();
- fprintf(stderr, "firstTextTop %0.2f\n", firstTextTop.toFloat());
LayoutUnit firstLineTopWithLeading = lineGridBlockOffset + lineGridBox->lineTopWithLeading();
LayoutUnit firstBaselinePosition = firstTextTop + lineGridFontAscent;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes