Title: [109935] branches/subpixellayout/Source/WebCore/rendering

Diff

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp (109934 => 109935)


--- branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp	2012-03-06 18:35:13 UTC (rev 109934)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp	2012-03-06 19:01:51 UTC (rev 109935)
@@ -5823,7 +5823,7 @@
         bool ignoreBaseline = (layer() && (layer()->marquee() || (direction == HorizontalLine ? (layer()->verticalScrollbar() || layer()->scrollYOffset() != 0)
             : (layer()->horizontalScrollbar() || layer()->scrollXOffset() != 0)))) || (isWritingModeRoot() && !isRubyRun());
         
-        int baselinePos = ignoreBaseline ? LayoutUnit(-1) : lastLineBoxBaseline();
+        int baselinePos = ignoreBaseline ? -1 : lastLineBoxBaseline();
         
         int bottomOfContent = direction == HorizontalLine ? borderTop() + paddingTop() + contentHeight() : borderRight() + paddingRight() + contentWidth();
         if (baselinePos != -1 && baselinePos <= bottomOfContent)
@@ -5836,7 +5836,7 @@
     return fontMetrics.ascent(baselineType) + (lineHeight(firstLine, direction, linePositionMode) - fontMetrics.height()) / 2;
 }
 
-LayoutUnit RenderBlock::firstLineBoxBaseline() const
+int RenderBlock::firstLineBoxBaseline() const
 {
     if (!isBlockFlow() || (isWritingModeRoot() && !isRubyRun()))
         return -1;
@@ -5860,7 +5860,7 @@
     return -1;
 }
 
-LayoutUnit RenderBlock::lastLineBoxBaseline() const
+int RenderBlock::lastLineBoxBaseline() const
 {
     if (!isBlockFlow() || (isWritingModeRoot() && !isRubyRun()))
         return -1;

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderBlock.h (109934 => 109935)


--- branches/subpixellayout/Source/WebCore/rendering/RenderBlock.h	2012-03-06 18:35:13 UTC (rev 109934)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderBlock.h	2012-03-06 19:01:51 UTC (rev 109935)
@@ -439,8 +439,8 @@
 
     virtual void computePreferredLogicalWidths();
 
-    virtual LayoutUnit firstLineBoxBaseline() const;
-    virtual LayoutUnit lastLineBoxBaseline() const;
+    virtual int firstLineBoxBaseline() const;
+    virtual int lastLineBoxBaseline() const;
 
     virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&);
 

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderBox.h (109934 => 109935)


--- branches/subpixellayout/Source/WebCore/rendering/RenderBox.h	2012-03-06 18:35:13 UTC (rev 109934)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderBox.h	2012-03-06 19:01:51 UTC (rev 109935)
@@ -407,8 +407,8 @@
     
     RenderLayer* enclosingFloatPaintingLayer() const;
     
-    virtual LayoutUnit firstLineBoxBaseline() const { return -1; }
-    virtual LayoutUnit lastLineBoxBaseline() const { return -1; }
+    virtual int firstLineBoxBaseline() const { return -1; }
+    virtual int lastLineBoxBaseline() const { return -1; }
 
     bool shrinkToAvoidFloats() const;
     virtual bool avoidsFloats() const;

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (109934 => 109935)


--- branches/subpixellayout/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp	2012-03-06 18:35:13 UTC (rev 109934)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp	2012-03-06 19:01:51 UTC (rev 109935)
@@ -442,7 +442,6 @@
                 continue;
             }
 
-
             // We need to see if this child's height has changed, since we make block elements
             // fill the height of a containing box by default.
             // Now do a layout.
@@ -460,9 +459,10 @@
             xPos += child->marginLeft();
             LayoutUnit childY = yPos;
             switch (style()->boxAlign()) {
-                case BCENTER:
-                    childY += child->marginTop() + max<LayoutUnit>(0, (contentHeight() - (child->height() + child->marginTop() + child->marginBottom())) / 2);
+                case BCENTER: {
+                    childY += child->marginTop() + max<int>(0, (contentHeight() - (child->height() + child->marginTop() + child->marginBottom())) / 2);
                     break;
+                }
                 case BBASELINE: {
                     LayoutUnit ascent = child->firstLineBoxBaseline();
                     if (ascent == -1)

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderTable.cpp (109934 => 109935)


--- branches/subpixellayout/Source/WebCore/rendering/RenderTable.cpp	2012-03-06 18:35:13 UTC (rev 109934)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderTable.cpp	2012-03-06 19:01:51 UTC (rev 109935)
@@ -1207,7 +1207,7 @@
 {
 }
 
-LayoutUnit RenderTable::firstLineBoxBaseline() const
+int RenderTable::firstLineBoxBaseline() const
 {
     if (isWritingModeRoot())
         return -1;

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderTable.h (109934 => 109935)


--- branches/subpixellayout/Source/WebCore/rendering/RenderTable.h	2012-03-06 18:35:13 UTC (rev 109934)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderTable.h	2012-03-06 19:01:51 UTC (rev 109935)
@@ -231,7 +231,7 @@
     virtual void computePreferredLogicalWidths();
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
     
-    virtual LayoutUnit firstLineBoxBaseline() const;
+    virtual int firstLineBoxBaseline() const;
 
     virtual RenderBlock* firstLineBlock() const;
     virtual void updateFirstLetter();

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderTableSection.cpp (109934 => 109935)


--- branches/subpixellayout/Source/WebCore/rendering/RenderTableSection.cpp	2012-03-06 18:35:13 UTC (rev 109934)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderTableSection.cpp	2012-03-06 19:01:51 UTC (rev 109935)
@@ -898,12 +898,12 @@
     m_outerBorderEnd = calcOuterBorderEnd();
 }
 
-LayoutUnit RenderTableSection::firstLineBoxBaseline() const
+int RenderTableSection::firstLineBoxBaseline() const
 {
     if (!m_grid.size())
         return -1;
 
-    LayoutUnit firstLineBaseline = m_grid[0].baseline;
+    int firstLineBaseline = m_grid[0].baseline;
     if (firstLineBaseline)
         return firstLineBaseline + m_rowPos[0];
 
@@ -913,7 +913,7 @@
         const CellStruct& cs = firstRow.at(i);
         const RenderTableCell* cell = cs.primaryCell();
         if (cell)
-            firstLineBaseline = max(firstLineBaseline, cell->logicalTop() + cell->paddingBefore() + cell->borderBefore() + cell->contentLogicalHeight());
+            firstLineBaseline = max<int>(firstLineBaseline, cell->logicalTop() + cell->paddingBefore() + cell->borderBefore() + cell->contentLogicalHeight());
     }
 
     return firstLineBaseline;

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderTableSection.h (109934 => 109935)


--- branches/subpixellayout/Source/WebCore/rendering/RenderTableSection.h	2012-03-06 18:35:13 UTC (rev 109934)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderTableSection.h	2012-03-06 19:01:51 UTC (rev 109935)
@@ -67,7 +67,7 @@
 
     virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0);
 
-    virtual LayoutUnit firstLineBoxBaseline() const;
+    virtual int firstLineBoxBaseline() const;
 
     void addCell(RenderTableCell*, RenderTableRow* row);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to