Title: [114954] branches/subpixellayout/Source/WebCore
- Revision
- 114954
- Author
- le...@chromium.org
- Date
- 2012-04-23 15:30:06 -0700 (Mon, 23 Apr 2012)
Log Message
Cleaning up LayoutUnit usage for maximalOutlineSize. Removing hacky RenderTreeAsText changes that are no longer necessary. Removing a static_cast in CSSPrimitiveValue that wasn't necessary.
Modified Paths
Diff
Modified: branches/subpixellayout/Source/WebCore/css/CSSPrimitiveValue.cpp (114953 => 114954)
--- branches/subpixellayout/Source/WebCore/css/CSSPrimitiveValue.cpp 2012-04-23 22:07:55 UTC (rev 114953)
+++ branches/subpixellayout/Source/WebCore/css/CSSPrimitiveValue.cpp 2012-04-23 22:30:06 UTC (rev 114954)
@@ -819,7 +819,7 @@
text = formatNumber(m_value.num) + "rem";
break;
case CSS_PX:
- text = formatNumber(static_cast<int>(m_value.num)) + "px";
+ text = formatNumber(m_value.num) + "px";
break;
case CSS_CM:
text = formatNumber(m_value.num) + "cm";
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderObject.cpp (114953 => 114954)
--- branches/subpixellayout/Source/WebCore/rendering/RenderObject.cpp 2012-04-23 22:07:55 UTC (rev 114953)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderObject.cpp 2012-04-23 22:30:06 UTC (rev 114954)
@@ -1760,7 +1760,7 @@
// We need to ensure that view->maximalOutlineSize() is valid for any repaints that happen
// during styleDidChange (it's used by clippedOverflowRectForRepaint()).
- if (m_style->outlineWidth() > 0 && static_cast<int>(m_style->outlineSize()) > maximalOutlineSize(PaintPhaseOutline))
+ if (m_style->outlineWidth() > 0 && m_style->outlineSize() > maximalOutlineSize(PaintPhaseOutline))
toRenderView(document()->renderer())->setMaximalOutlineSize(m_style->outlineSize());
styleDidChange(diff, oldStyle.get());
@@ -2677,7 +2677,7 @@
return !document()->inPageCache() && !document()->view()->isOffscreen();
}
-LayoutUnit RenderObject::maximalOutlineSize(PaintPhase p) const
+int RenderObject::maximalOutlineSize(PaintPhase p) const
{
if (p != PaintPhaseOutline && p != PaintPhaseSelfOutline && p != PaintPhaseChildOutlines)
return 0;
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderObject.h (114953 => 114954)
--- branches/subpixellayout/Source/WebCore/rendering/RenderObject.h 2012-04-23 22:07:55 UTC (rev 114953)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderObject.h 2012-04-23 22:30:06 UTC (rev 114954)
@@ -753,7 +753,7 @@
bool hasReflection() const { return m_bitfields.hasReflection(); }
// Applied as a "slop" to dirty rect checks during the outline painting phase's dirty-rect checks.
- LayoutUnit maximalOutlineSize(PaintPhase) const;
+ int maximalOutlineSize(PaintPhase) const;
enum SelectionState {
SelectionNone, // The object is not selected.
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderTreeAsText.cpp (114953 => 114954)
--- branches/subpixellayout/Source/WebCore/rendering/RenderTreeAsText.cpp 2012-04-23 22:07:55 UTC (rev 114953)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderTreeAsText.cpp 2012-04-23 22:30:06 UTC (rev 114954)
@@ -276,13 +276,8 @@
r.move(0, -toRenderTableCell(o.containingBlock())->intrinsicPaddingBefore());
// FIXME: Convert layout test results to report sub-pixel values, in the meantime using enclosingIntRect
- // for consistency with old results. This doesn't apply to tables, which are still laid out on integer bounds.
- if (o.isTable() || o.isTableCell() || o.isTableCol() || o.isTableRow() || o.isTableSection())
- r = IntRect(r);
- else if (o.isImage())
- r = pixelSnappedIntRect(r);
- else
- r = enclosingIntRect(r);
+ // for consistency with old results.
+ r = enclosingIntRect(r);
ts << " " << r;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes