Changeset 90869 in webkit


Ignore:
Timestamp:
Jul 12, 2011 5:04:01 PM (13 years ago)
Author:
eae@chromium.org
Message:

Switch InlineFlowBox to to new layout types
https://bugs.webkit.org/show_bug.cgi?id=64399

Reviewed by Eric Seidel.

First step in moving floats over to the new layout abstraction.

No new tests, no new functionality.

  • rendering/InlineBox.cpp:

(WebCore::InlineBox::logicalHeight):

  • rendering/InlineBox.h:

(WebCore::InlineBox::logicalTop):
(WebCore::InlineBox::logicalBottom):
(WebCore::InlineBox::setLogicalTop):

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
(WebCore::InlineFlowBox::computeLogicalBoxHeights):
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
(WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
(WebCore::InlineFlowBox::addTextBoxVisualOverflow):
(WebCore::InlineFlowBox::addReplacedChildOverflow):
(WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded):
(WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
(WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):

  • rendering/InlineFlowBox.h:
  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::logicalRightSelectionGap):

  • rendering/RenderBlock.h:
  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::alignBoxesInBlockDirection):
(WebCore::RootInlineBox::lineSelectionGap):
(WebCore::RootInlineBox::ascentAndDescentForBox):
(WebCore::RootInlineBox::verticalPositionForBox):

  • rendering/RootInlineBox.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::getShadowExtent):
(WebCore::RenderStyle::getShadowHorizontalExtent):
(WebCore::RenderStyle::getShadowVerticalExtent):

  • rendering/style/RenderStyle.h:

(WebCore::InheritedFlags::getTextShadowExtent):
(WebCore::InheritedFlags::getTextShadowHorizontalExtent):
(WebCore::InheritedFlags::getTextShadowVerticalExtent):
(WebCore::InheritedFlags::getTextShadowInlineDirectionExtent):
(WebCore::InheritedFlags::getTextShadowBlockDirectionExtent):
(WebCore::InheritedFlags::getBoxShadowExtent):
(WebCore::InheritedFlags::getBoxShadowHorizontalExtent):
(WebCore::InheritedFlags::getBoxShadowVerticalExtent):
(WebCore::InheritedFlags::getBoxShadowInlineDirectionExtent):
(WebCore::InheritedFlags::getBoxShadowBlockDirectionExtent):
(WebCore::InheritedFlags::getShadowInlineDirectionExtent):
(WebCore::InheritedFlags::getShadowBlockDirectionExtent):

  • rendering/style/ShadowData.cpp:

(WebCore::calculateShadowExtent):
(WebCore::ShadowData::adjustRectForShadow):

  • rendering/style/ShadowData.h:

(WebCore::ShadowData::ShadowData):
(WebCore::ShadowData::x):
(WebCore::ShadowData::y):

Location:
trunk/Source/WebCore
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r90868 r90869  
     12011-07-12  Emil A Eklund  <eae@chromium.org>
     2
     3        Switch InlineFlowBox to to new layout types
     4        https://bugs.webkit.org/show_bug.cgi?id=64399
     5
     6        Reviewed by Eric Seidel.
     7
     8        First step in moving floats over to the new layout abstraction.
     9
     10        No new tests, no new functionality.
     11
     12        * rendering/InlineBox.cpp:
     13        (WebCore::InlineBox::logicalHeight):
     14        * rendering/InlineBox.h:
     15        (WebCore::InlineBox::logicalTop):
     16        (WebCore::InlineBox::logicalBottom):
     17        (WebCore::InlineBox::setLogicalTop):
     18        * rendering/InlineFlowBox.cpp:
     19        (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
     20        (WebCore::InlineFlowBox::computeLogicalBoxHeights):
     21        (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
     22        (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
     23        (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
     24        (WebCore::InlineFlowBox::addReplacedChildOverflow):
     25        (WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded):
     26        (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
     27        (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
     28        * rendering/InlineFlowBox.h:
     29        * rendering/RenderBlock.cpp:
     30        (WebCore::RenderBlock::logicalRightSelectionGap):
     31        * rendering/RenderBlock.h:
     32        * rendering/RootInlineBox.cpp:
     33        (WebCore::RootInlineBox::alignBoxesInBlockDirection):
     34        (WebCore::RootInlineBox::lineSelectionGap):
     35        (WebCore::RootInlineBox::ascentAndDescentForBox):
     36        (WebCore::RootInlineBox::verticalPositionForBox):
     37        * rendering/RootInlineBox.h:
     38        * rendering/style/RenderStyle.cpp:
     39        (WebCore::RenderStyle::getShadowExtent):
     40        (WebCore::RenderStyle::getShadowHorizontalExtent):
     41        (WebCore::RenderStyle::getShadowVerticalExtent):
     42        * rendering/style/RenderStyle.h:
     43        (WebCore::InheritedFlags::getTextShadowExtent):
     44        (WebCore::InheritedFlags::getTextShadowHorizontalExtent):
     45        (WebCore::InheritedFlags::getTextShadowVerticalExtent):
     46        (WebCore::InheritedFlags::getTextShadowInlineDirectionExtent):
     47        (WebCore::InheritedFlags::getTextShadowBlockDirectionExtent):
     48        (WebCore::InheritedFlags::getBoxShadowExtent):
     49        (WebCore::InheritedFlags::getBoxShadowHorizontalExtent):
     50        (WebCore::InheritedFlags::getBoxShadowVerticalExtent):
     51        (WebCore::InheritedFlags::getBoxShadowInlineDirectionExtent):
     52        (WebCore::InheritedFlags::getBoxShadowBlockDirectionExtent):
     53        (WebCore::InheritedFlags::getShadowInlineDirectionExtent):
     54        (WebCore::InheritedFlags::getShadowBlockDirectionExtent):
     55        * rendering/style/ShadowData.cpp:
     56        (WebCore::calculateShadowExtent):
     57        (WebCore::ShadowData::adjustRectForShadow):
     58        * rendering/style/ShadowData.h:
     59        (WebCore::ShadowData::ShadowData):
     60        (WebCore::ShadowData::x):
     61        (WebCore::ShadowData::y):
     62
    1632011-07-12  Kenichi Ishibashi  <bashi@chromium.org>
    264
  • trunk/Source/WebCore/rendering/InlineBox.cpp

    r90791 r90869  
    125125#endif
    126126
    127 int InlineBox::logicalHeight() const
     127LayoutUnit InlineBox::logicalHeight() const
    128128{
    129129#if ENABLE(SVG)
     
    140140    RenderBoxModelObject* flowObject = boxModelObject();
    141141    const FontMetrics& fontMetrics = renderer()->style(m_firstLine)->fontMetrics();
    142     int result = fontMetrics.height();
     142    LayoutUnit result = fontMetrics.height();
    143143    if (parent())
    144144        result += flowObject->borderAndPaddingLogicalHeight();
  • trunk/Source/WebCore/rendering/InlineBox.h

    r90791 r90869  
    255255
    256256    // The logicalTop[ position is the top edge of the line box in a horizontal line and the left edge in a vertical line.
    257     int logicalTop() const { return isHorizontal() ? m_topLeft.y() : m_topLeft.x(); }
    258     int logicalBottom() const { return logicalTop() + logicalHeight(); }
    259     void setLogicalTop(int top)
     257    LayoutUnit logicalTop() const { return isHorizontal() ? m_topLeft.y() : m_topLeft.x(); }
     258    LayoutUnit logicalBottom() const { return logicalTop() + logicalHeight(); }
     259    void setLogicalTop(LayoutUnit top)
    260260    {
    261261        if (isHorizontal())
     
    270270
    271271    // The logical height is our extent in the block flow direction, i.e., height for horizontal text and width for vertical text.
    272     int logicalHeight() const;
     272    LayoutUnit logicalHeight() const;
    273273
    274274    FloatRect logicalFrameRect() const { return isHorizontal() ? IntRect(m_topLeft.x(), m_topLeft.y(), m_logicalWidth, logicalHeight()) : IntRect(m_topLeft.y(), m_topLeft.x(), m_logicalWidth, logicalHeight()); }
  • trunk/Source/WebCore/rendering/InlineFlowBox.cpp

    r90791 r90869  
    449449}
    450450
    451 void InlineFlowBox::adjustMaxAscentAndDescent(int& maxAscent, int& maxDescent, int maxPositionTop, int maxPositionBottom)
     451void InlineFlowBox::adjustMaxAscentAndDescent(LayoutUnit& maxAscent, LayoutUnit& maxDescent, LayoutUnit maxPositionTop, LayoutUnit maxPositionBottom)
    452452{
    453453    for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
     
    457457            continue; // Positioned placeholders don't affect calculations.
    458458        if (curr->verticalAlign() == TOP || curr->verticalAlign() == BOTTOM) {
    459             int lineHeight = curr->lineHeight();
     459            LayoutUnit lineHeight = curr->lineHeight();
    460460            if (curr->verticalAlign() == TOP) {
    461461                if (maxAscent + maxDescent < lineHeight)
     
    476476}
    477477
    478 void InlineFlowBox::computeLogicalBoxHeights(RootInlineBox* rootBox, int& maxPositionTop, int& maxPositionBottom,
    479                                              int& maxAscent, int& maxDescent, bool& setMaxAscent, bool& setMaxDescent,
     478void InlineFlowBox::computeLogicalBoxHeights(RootInlineBox* rootBox, LayoutUnit& maxPositionTop, LayoutUnit& maxPositionBottom,
     479                                             LayoutUnit& maxAscent, LayoutUnit& maxDescent, bool& setMaxAscent, bool& setMaxDescent,
    480480                                             bool strictMode, GlyphOverflowAndFallbackFontsMap& textBoxDataMap,
    481481                                             FontBaseline baselineType, VerticalPositionCache& verticalPositionCache)
     
    502502    if (isRootInlineBox()) {
    503503        // Examine our root box.
    504         int ascent = 0;
    505         int descent = 0;
     504        LayoutUnit ascent = 0;
     505        LayoutUnit descent = 0;
    506506        rootBox->ascentAndDescentForBox(rootBox, textBoxDataMap, ascent, descent, affectsAscent, affectsDescent);
    507507        if (strictMode || hasTextChildren() || (!checkChildren && hasTextDescendants())) {
     
    534534        curr->setLogicalTop(rootBox->verticalPositionForBox(curr, verticalPositionCache));
    535535       
    536         int ascent = 0;
    537         int descent = 0;
     536        LayoutUnit ascent = 0;
     537        LayoutUnit descent = 0;
    538538        rootBox->ascentAndDescentForBox(curr, textBoxDataMap, ascent, descent, affectsAscent, affectsDescent);
    539539
    540         int boxHeight = ascent + descent;
     540        LayoutUnit boxHeight = ascent + descent;
    541541        if (curr->verticalAlign() == TOP) {
    542542            if (maxPositionTop < boxHeight)
     
    573573}
    574574
    575 void InlineFlowBox::placeBoxesInBlockDirection(int top, int maxHeight, int maxAscent, bool strictMode, LayoutUnit& lineTop, LayoutUnit& lineBottom, bool& setLineTop,
     575void InlineFlowBox::placeBoxesInBlockDirection(LayoutUnit top, LayoutUnit maxHeight, LayoutUnit maxAscent, bool strictMode, LayoutUnit& lineTop, LayoutUnit& lineBottom, bool& setLineTop,
    576576                                               LayoutUnit& lineTopIncludingMargins, LayoutUnit& lineBottomIncludingMargins, bool& hasAnnotationsBefore, bool& hasAnnotationsAfter, FontBaseline baselineType)
    577577{
     
    720720}
    721721
    722 inline void InlineFlowBox::addBoxShadowVisualOverflow(IntRect& logicalVisualOverflow)
     722inline void InlineFlowBox::addBoxShadowVisualOverflow(LayoutRect& logicalVisualOverflow)
    723723{
    724724    if (!parent())
    725725        return; // Box-shadow doesn't apply to root line boxes.
    726726
    727     int boxShadowLogicalTop;
    728     int boxShadowLogicalBottom;
     727    LayoutUnit boxShadowLogicalTop;
     728    LayoutUnit boxShadowLogicalBottom;
    729729    renderer()->style(m_firstLine)->getBoxShadowBlockDirectionExtent(boxShadowLogicalTop, boxShadowLogicalBottom);
    730730   
    731     int logicalTopVisualOverflow = min(logicalTop() + boxShadowLogicalTop, logicalVisualOverflow.y());
    732     int logicalBottomVisualOverflow = max(logicalBottom() + boxShadowLogicalBottom, logicalVisualOverflow.maxY());
    733    
    734     int boxShadowLogicalLeft;
    735     int boxShadowLogicalRight;
     731    LayoutUnit logicalTopVisualOverflow = min(logicalTop() + boxShadowLogicalTop, logicalVisualOverflow.y());
     732    LayoutUnit logicalBottomVisualOverflow = max(logicalBottom() + boxShadowLogicalBottom, logicalVisualOverflow.maxY());
     733   
     734    LayoutUnit boxShadowLogicalLeft;
     735    LayoutUnit boxShadowLogicalRight;
    736736    renderer()->style(m_firstLine)->getBoxShadowInlineDirectionExtent(boxShadowLogicalLeft, boxShadowLogicalRight);
    737737
    738     int logicalLeftVisualOverflow = min(pixelSnappedLogicalLeft() + boxShadowLogicalLeft, logicalVisualOverflow.x());
    739     int logicalRightVisualOverflow = max(pixelSnappedLogicalRight() + boxShadowLogicalRight, logicalVisualOverflow.maxX());
    740    
    741     logicalVisualOverflow = IntRect(logicalLeftVisualOverflow, logicalTopVisualOverflow,
    742                                     logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
    743 }
    744 
    745 inline void InlineFlowBox::addTextBoxVisualOverflow(InlineTextBox* textBox, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, IntRect& logicalVisualOverflow)
     738    LayoutUnit logicalLeftVisualOverflow = min(pixelSnappedLogicalLeft() + boxShadowLogicalLeft, logicalVisualOverflow.x());
     739    LayoutUnit logicalRightVisualOverflow = max(pixelSnappedLogicalRight() + boxShadowLogicalRight, logicalVisualOverflow.maxX());
     740   
     741    logicalVisualOverflow = LayoutRect(logicalLeftVisualOverflow, logicalTopVisualOverflow,
     742                                       logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
     743}
     744
     745inline void InlineFlowBox::addTextBoxVisualOverflow(InlineTextBox* textBox, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, LayoutRect& logicalVisualOverflow)
    746746{
    747747    if (textBox->knownToHaveNoOverflow())
     
    778778    rightGlyphOverflow -= min(0, (int)style->font().letterSpacing());
    779779
    780     int textShadowLogicalTop;
    781     int textShadowLogicalBottom;
     780    LayoutUnit textShadowLogicalTop;
     781    LayoutUnit textShadowLogicalBottom;
    782782    style->getTextShadowBlockDirectionExtent(textShadowLogicalTop, textShadowLogicalBottom);
    783783   
    784     int childOverflowLogicalTop = min(textShadowLogicalTop + topGlyphOverflow, topGlyphOverflow);
    785     int childOverflowLogicalBottom = max(textShadowLogicalBottom + bottomGlyphOverflow, bottomGlyphOverflow);
     784    LayoutUnit childOverflowLogicalTop = min<LayoutUnit>(textShadowLogicalTop + topGlyphOverflow, topGlyphOverflow);
     785    LayoutUnit childOverflowLogicalBottom = max<LayoutUnit>(textShadowLogicalBottom + bottomGlyphOverflow, bottomGlyphOverflow);
    786786   
    787     int textShadowLogicalLeft;
    788     int textShadowLogicalRight;
     787    LayoutUnit textShadowLogicalLeft;
     788    LayoutUnit textShadowLogicalRight;
    789789    style->getTextShadowInlineDirectionExtent(textShadowLogicalLeft, textShadowLogicalRight);
    790790   
    791     int childOverflowLogicalLeft = min(textShadowLogicalLeft + leftGlyphOverflow, leftGlyphOverflow);
    792     int childOverflowLogicalRight = max(textShadowLogicalRight + rightGlyphOverflow, rightGlyphOverflow);
    793 
    794     int logicalTopVisualOverflow = min(textBox->logicalTop() + childOverflowLogicalTop, logicalVisualOverflow.y());
    795     int logicalBottomVisualOverflow = max(textBox->logicalBottom() + childOverflowLogicalBottom, logicalVisualOverflow.maxY());
    796     int logicalLeftVisualOverflow = min(textBox->pixelSnappedLogicalLeft() + childOverflowLogicalLeft, logicalVisualOverflow.x());
    797     int logicalRightVisualOverflow = max(textBox->pixelSnappedLogicalRight() + childOverflowLogicalRight, logicalVisualOverflow.maxX());
    798    
    799     logicalVisualOverflow = IntRect(logicalLeftVisualOverflow, logicalTopVisualOverflow,
    800                                     logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
     791    LayoutUnit childOverflowLogicalLeft = min<LayoutUnit>(textShadowLogicalLeft + leftGlyphOverflow, leftGlyphOverflow);
     792    LayoutUnit childOverflowLogicalRight = max<LayoutUnit>(textShadowLogicalRight + rightGlyphOverflow, rightGlyphOverflow);
     793
     794    LayoutUnit logicalTopVisualOverflow = min(textBox->logicalTop() + childOverflowLogicalTop, logicalVisualOverflow.y());
     795    LayoutUnit logicalBottomVisualOverflow = max(textBox->logicalBottom() + childOverflowLogicalBottom, logicalVisualOverflow.maxY());
     796    LayoutUnit logicalLeftVisualOverflow = min(textBox->pixelSnappedLogicalLeft() + childOverflowLogicalLeft, logicalVisualOverflow.x());
     797    LayoutUnit logicalRightVisualOverflow = max(textBox->pixelSnappedLogicalRight() + childOverflowLogicalRight, logicalVisualOverflow.maxX());
     798   
     799    logicalVisualOverflow = LayoutRect(logicalLeftVisualOverflow, logicalTopVisualOverflow,
     800                                       logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
    801801                                   
    802802    textBox->setLogicalOverflowRect(logicalVisualOverflow);
    803803}
    804804
    805 inline void InlineFlowBox::addReplacedChildOverflow(const InlineBox* inlineBox, IntRect& logicalLayoutOverflow, IntRect& logicalVisualOverflow)
     805inline void InlineFlowBox::addReplacedChildOverflow(const InlineBox* inlineBox, LayoutRect& logicalLayoutOverflow, LayoutRect& logicalVisualOverflow)
    806806{
    807807    RenderBox* box = toRenderBox(inlineBox->renderer());
     
    811811    // for writing-mode differences.
    812812    if (!box->hasSelfPaintingLayer()) {
    813         IntRect childLogicalVisualOverflow = box->logicalVisualOverflowRectForPropagation(renderer()->style());
     813        LayoutRect childLogicalVisualOverflow = box->logicalVisualOverflowRectForPropagation(renderer()->style());
    814814        childLogicalVisualOverflow.move(inlineBox->logicalLeft(), inlineBox->logicalTop());
    815815        logicalVisualOverflow.unite(childLogicalVisualOverflow);
     
    819819    // Otherwise the child border box propagates as layout overflow.  This rectangle must include transforms and relative positioning
    820820    // and be adjusted for writing-mode differences.
    821     IntRect childLogicalLayoutOverflow = box->logicalLayoutOverflowRectForPropagation(renderer()->style());
     821    LayoutRect childLogicalLayoutOverflow = box->logicalLayoutOverflowRectForPropagation(renderer()->style());
    822822    childLogicalLayoutOverflow.move(inlineBox->logicalLeft(), inlineBox->logicalTop());
    823823    logicalLayoutOverflow.unite(childLogicalLayoutOverflow);
     
    10751075}
    10761076
    1077 void InlineFlowBox::constrainToLineTopAndBottomIfNeeded(IntRect& rect) const
     1077void InlineFlowBox::constrainToLineTopAndBottomIfNeeded(LayoutRect& rect) const
    10781078{
    10791079    bool noQuirksMode = renderer()->document()->inNoQuirksMode();
    10801080    if (!noQuirksMode && !hasTextChildren() && !(descendantsHaveSameLineHeightAndBaseline() && hasTextDescendants())) {
    10811081        const RootInlineBox* rootBox = root();
    1082         int logicalTop = isHorizontal() ? rect.y() : rect.x();
    1083         int logicalHeight = isHorizontal() ? rect.height() : rect.width();
    1084         int bottom = min(rootBox->lineBottom(), logicalTop + logicalHeight);
     1082        LayoutUnit logicalTop = isHorizontal() ? rect.y() : rect.x();
     1083        LayoutUnit logicalHeight = isHorizontal() ? rect.height() : rect.width();
     1084        LayoutUnit bottom = min(rootBox->lineBottom(), logicalTop + logicalHeight);
    10851085        logicalTop = max(rootBox->lineTop(), logicalTop);
    10861086        logicalHeight = bottom - logicalTop;
     
    12981298}
    12991299
    1300 int InlineFlowBox::computeOverAnnotationAdjustment(int allowedPosition) const
    1301 {
    1302     int result = 0;
     1300LayoutUnit InlineFlowBox::computeOverAnnotationAdjustment(LayoutUnit allowedPosition) const
     1301{
     1302    LayoutUnit result = 0;
    13031303    for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
    13041304        if (curr->renderer()->isPositioned())
     
    13151315           
    13161316            if (!rubyRun->style()->isFlippedLinesWritingMode()) {
    1317                 int topOfFirstRubyTextLine = rubyText->logicalTop() + (rubyText->firstRootBox() ? rubyText->firstRootBox()->lineTop() : 0);
     1317                LayoutUnit topOfFirstRubyTextLine = rubyText->logicalTop() + (rubyText->firstRootBox() ? rubyText->firstRootBox()->lineTop() : 0);
    13181318                if (topOfFirstRubyTextLine >= 0)
    13191319                    continue;
     
    13211321                result = max(result, allowedPosition - topOfFirstRubyTextLine);
    13221322            } else {
    1323                 int bottomOfLastRubyTextLine = rubyText->logicalTop() + (rubyText->lastRootBox() ? rubyText->lastRootBox()->lineBottom() : rubyText->logicalHeight());
     1323                LayoutUnit bottomOfLastRubyTextLine = rubyText->logicalTop() + (rubyText->lastRootBox() ? rubyText->lastRootBox()->lineBottom() : rubyText->logicalHeight());
    13241324                if (bottomOfLastRubyTextLine <= curr->logicalHeight())
    13251325                    continue;
     
    13461346}
    13471347
    1348 int InlineFlowBox::computeUnderAnnotationAdjustment(int allowedPosition) const
    1349 {
    1350     int result = 0;
     1348LayoutUnit InlineFlowBox::computeUnderAnnotationAdjustment(LayoutUnit allowedPosition) const
     1349{
     1350    LayoutUnit result = 0;
    13511351    for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
    13521352        if (curr->renderer()->isPositioned())
     
    13601360            if (style->textEmphasisMark() != TextEmphasisMarkNone && style->textEmphasisPosition() == TextEmphasisPositionUnder) {
    13611361                if (!style->isFlippedLinesWritingMode()) {
    1362                     int bottomOfEmphasisMark = curr->logicalBottom() + style->font().emphasisMarkHeight(style->textEmphasisMarkString());
     1362                    LayoutUnit bottomOfEmphasisMark = curr->logicalBottom() + style->font().emphasisMarkHeight(style->textEmphasisMarkString());
    13631363                    result = max(result, bottomOfEmphasisMark - allowedPosition);
    13641364                } else {
    1365                     int topOfEmphasisMark = curr->logicalTop() - style->font().emphasisMarkHeight(style->textEmphasisMarkString());
     1365                    LayoutUnit topOfEmphasisMark = curr->logicalTop() - style->font().emphasisMarkHeight(style->textEmphasisMarkString());
    13661366                    result = max(result, allowedPosition - topOfEmphasisMark);
    13671367                }
  • trunk/Source/WebCore/rendering/InlineFlowBox.h

    r90791 r90869  
    166166    int getFlowSpacingLogicalWidth();
    167167    float placeBoxesInInlineDirection(float logicalLeft, bool& needsWordSpacing, GlyphOverflowAndFallbackFontsMap&);
    168     void computeLogicalBoxHeights(RootInlineBox*, int& maxPositionTop, int& maxPositionBottom,
    169                                   int& maxAscent, int& maxDescent, bool& setMaxAscent, bool& setMaxDescent,
     168    void computeLogicalBoxHeights(RootInlineBox*, LayoutUnit& maxPositionTop, LayoutUnit& maxPositionBottom,
     169                                  LayoutUnit& maxAscent, LayoutUnit& maxDescent, bool& setMaxAscent, bool& setMaxDescent,
    170170                                  bool strictMode, GlyphOverflowAndFallbackFontsMap&, FontBaseline, VerticalPositionCache&);
    171     void adjustMaxAscentAndDescent(int& maxAscent, int& maxDescent,
    172                                    int maxPositionTop, int maxPositionBottom);
     171    void adjustMaxAscentAndDescent(LayoutUnit& maxAscent, LayoutUnit& maxDescent,
     172                                   LayoutUnit maxPositionTop, LayoutUnit maxPositionBottom);
    173173    void placeBoxesInBlockDirection(LayoutUnit logicalTop, LayoutUnit maxHeight, LayoutUnit maxAscent, bool strictMode, LayoutUnit& lineTop, LayoutUnit& lineBottom, bool& setLineTop,
    174174                                    LayoutUnit& lineTopIncludingMargins, LayoutUnit& lineBottomIncludingMargins, bool& hasAnnotationsBefore, bool& hasAnnotationsAfter, FontBaseline);
     
    176176    bool requiresIdeographicBaseline(const GlyphOverflowAndFallbackFontsMap&) const;
    177177
    178     int computeOverAnnotationAdjustment(int allowedPosition) const;
    179     int computeUnderAnnotationAdjustment(int allowedPosition) const;
     178    LayoutUnit computeOverAnnotationAdjustment(LayoutUnit allowedPosition) const;
     179    LayoutUnit computeUnderAnnotationAdjustment(LayoutUnit allowedPosition) const;
    180180
    181181    void computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, GlyphOverflowAndFallbackFontsMap&);
     
    274274
    275275private:
    276     void addBoxShadowVisualOverflow(IntRect& logicalVisualOverflow);
    277     void addTextBoxVisualOverflow(InlineTextBox*, GlyphOverflowAndFallbackFontsMap&, IntRect& logicalVisualOverflow);
    278     void addReplacedChildOverflow(const InlineBox*, IntRect& logicalLayoutOverflow, IntRect& logicalVisualOverflow);
    279     void constrainToLineTopAndBottomIfNeeded(IntRect&) const;
     276    void addBoxShadowVisualOverflow(LayoutRect& logicalVisualOverflow);
     277    void addTextBoxVisualOverflow(InlineTextBox*, GlyphOverflowAndFallbackFontsMap&, LayoutRect& logicalVisualOverflow);
     278    void addReplacedChildOverflow(const InlineBox*, LayoutRect& logicalLayoutOverflow, LayoutRect& logicalVisualOverflow);
     279    void constrainToLineTopAndBottomIfNeeded(LayoutRect&) const;
    280280
    281281protected:
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r90833 r90869  
    30303030
    30313031LayoutRect RenderBlock::logicalRightSelectionGap(RenderBlock* rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
    3032                                                  RenderObject* selObj, int logicalRight, int logicalTop, int logicalHeight, const PaintInfo* paintInfo)
     3032                                                 RenderObject* selObj, LayoutUnit logicalRight, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo* paintInfo)
    30333033{
    30343034    LayoutUnit rootBlockLogicalTop = blockDirectionOffset(rootBlock, offsetFromRootBlock) + logicalTop;
  • trunk/Source/WebCore/rendering/RenderBlock.h

    r90833 r90869  
    137137
    138138    GapRects selectionGapRectsForRepaint(RenderBoxModelObject* repaintContainer);
    139     IntRect logicalLeftSelectionGap(RenderBlock* rootBlock, const IntPoint& rootBlockPhysicalPosition, const IntSize& offsetFromRootBlock,
    140                                     RenderObject* selObj, int logicalLeft, int logicalTop, int logicalHeight, const PaintInfo*);
    141     IntRect logicalRightSelectionGap(RenderBlock* rootBlock, const IntPoint& rootBlockPhysicalPosition, const IntSize& offsetFromRootBlock,
    142                                      RenderObject* selObj, int logicalRight, int logicalTop, int logicalHeight, const PaintInfo*);
     139    LayoutRect logicalLeftSelectionGap(RenderBlock* rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
     140                                       RenderObject* selObj, LayoutUnit logicalLeft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*);
     141    LayoutRect logicalRightSelectionGap(RenderBlock* rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
     142                                        RenderObject* selObj, LayoutUnit logicalRight, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*);
    143143    void getSelectionGapInfo(SelectionState, bool& leftGap, bool& rightGap);
    144144    IntRect logicalRectToPhysicalRect(const IntPoint& physicalPosition, const IntRect& logicalRect);
     
    627627    GapRects blockSelectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
    628628                                LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLeft, LayoutUnit& lastLogicalRight, const PaintInfo*);
    629     IntRect blockSelectionGap(RenderBlock* rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
    630                               LayoutUnit lastLogicalTop, LayoutUnit lastLogicalLeft, LayoutUnit lastLogicalRight, LayoutUnit logicalBottom, const PaintInfo*);
     629    LayoutRect blockSelectionGap(RenderBlock* rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
     630                                 LayoutUnit lastLogicalTop, LayoutUnit lastLogicalLeft, LayoutUnit lastLogicalRight, LayoutUnit logicalBottom, const PaintInfo*);
    631631    LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, LayoutUnit position);
    632632    LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, LayoutUnit position);
  • trunk/Source/WebCore/rendering/RootInlineBox.cpp

    r90791 r90869  
    221221}
    222222
    223 int RootInlineBox::alignBoxesInBlockDirection(int heightOfBlock, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& verticalPositionCache)
     223LayoutUnit RootInlineBox::alignBoxesInBlockDirection(LayoutUnit heightOfBlock, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& verticalPositionCache)
    224224{
    225225#if ENABLE(SVG)
     
    229229#endif
    230230
    231     int maxPositionTop = 0;
    232     int maxPositionBottom = 0;
    233     int maxAscent = 0;
    234     int maxDescent = 0;
     231    LayoutUnit maxPositionTop = 0;
     232    LayoutUnit maxPositionBottom = 0;
     233    LayoutUnit maxAscent = 0;
     234    LayoutUnit maxDescent = 0;
    235235    bool setMaxAscent = false;
    236236    bool setMaxDescent = false;
     
    247247        adjustMaxAscentAndDescent(maxAscent, maxDescent, maxPositionTop, maxPositionBottom);
    248248
    249     int maxHeight = maxAscent + maxDescent;
    250     int lineTop = heightOfBlock;
    251     int lineBottom = heightOfBlock;
    252     int lineTopIncludingMargins = heightOfBlock;
    253     int lineBottomIncludingMargins = heightOfBlock;
     249    LayoutUnit maxHeight = maxAscent + maxDescent;
     250    LayoutUnit lineTop = heightOfBlock;
     251    LayoutUnit lineBottom = heightOfBlock;
     252    LayoutUnit lineTopIncludingMargins = heightOfBlock;
     253    LayoutUnit lineBottomIncludingMargins = heightOfBlock;
    254254    bool setLineTop = false;
    255255    bool hasAnnotationsBefore = false;
     
    269269    }
    270270
    271     maxHeight = max(0, maxHeight);
     271    maxHeight = max<LayoutUnit>(0, maxHeight);
    272272
    273273    return heightOfBlock + maxHeight;
     
    305305}
    306306
    307 GapRects RootInlineBox::lineSelectionGap(RenderBlock* rootBlock, const IntPoint& rootBlockPhysicalPosition, const IntSize& offsetFromRootBlock,
    308                                          int selTop, int selHeight, const PaintInfo* paintInfo)
     307GapRects RootInlineBox::lineSelectionGap(RenderBlock* rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
     308                                         LayoutUnit selTop, LayoutUnit selHeight, const PaintInfo* paintInfo)
    309309{
    310310    RenderObject::SelectionState lineState = selectionState();
     
    333333    if (firstBox && firstBox != lastBox) {
    334334        // Now fill in any gaps on the line that occurred between two selected elements.
    335         int lastLogicalLeft = firstBox->logicalRight();
     335        LayoutUnit lastLogicalLeft = firstBox->logicalRight();
    336336        bool isPreviousBoxSelected = firstBox->selectionState() != RenderObject::SelectionNone;
    337337        for (InlineBox* box = firstBox->nextLeafChild(); box; box = box->nextLeafChild()) {
    338338            if (box->selectionState() != RenderObject::SelectionNone) {
    339                 IntRect logicalRect(lastLogicalLeft, selTop, box->logicalLeft() - lastLogicalLeft, selHeight);
    340                 logicalRect.move(renderer()->isHorizontalWritingMode() ? offsetFromRootBlock : IntSize(offsetFromRootBlock.height(), offsetFromRootBlock.width()));
    341                 IntRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, logicalRect);
     339                LayoutRect logicalRect(lastLogicalLeft, selTop, box->logicalLeft() - lastLogicalLeft, selHeight);
     340                logicalRect.move(renderer()->isHorizontalWritingMode() ? offsetFromRootBlock : LayoutSize(offsetFromRootBlock.height(), offsetFromRootBlock.width()));
     341                LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, logicalRect);
    342342                if (isPreviousBoxSelected && gapRect.width() > 0 && gapRect.height() > 0) {
    343343                    if (paintInfo && box->parent()->renderer()->style()->visibility() == VISIBLE)
     
    566566}
    567567
    568 void RootInlineBox::ascentAndDescentForBox(InlineBox* box, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, int& ascent, int& descent,
     568void RootInlineBox::ascentAndDescentForBox(InlineBox* box, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, LayoutUnit& ascent, LayoutUnit& descent,
    569569                                           bool& affectsAscent, bool& affectsDescent) const
    570570{
     
    603603        for (size_t i = 0; i < usedFonts->size(); ++i) {
    604604            const FontMetrics& fontMetrics = usedFonts->at(i)->fontMetrics();
    605             int usedFontAscent = fontMetrics.ascent(baselineType());
    606             int usedFontDescent = fontMetrics.descent(baselineType());
    607             int halfLeading = (fontMetrics.lineSpacing() - fontMetrics.height()) / 2;
    608             int usedFontAscentAndLeading = usedFontAscent + halfLeading;
    609             int usedFontDescentAndLeading = fontMetrics.lineSpacing() - usedFontAscentAndLeading;
     605            LayoutUnit usedFontAscent = fontMetrics.ascent(baselineType());
     606            LayoutUnit usedFontDescent = fontMetrics.descent(baselineType());
     607            LayoutUnit halfLeading = (fontMetrics.lineSpacing() - fontMetrics.height()) / 2;
     608            LayoutUnit usedFontAscentAndLeading = usedFontAscent + halfLeading;
     609            LayoutUnit usedFontDescentAndLeading = fontMetrics.lineSpacing() - usedFontAscentAndLeading;
    610610            if (includeFont) {
    611611                setAscentAndDescent(ascent, descent, usedFontAscent, usedFontDescent, ascentDescentSet);
     
    668668}
    669669
    670 int RootInlineBox::verticalPositionForBox(InlineBox* box, VerticalPositionCache& verticalPositionCache)
     670LayoutUnit RootInlineBox::verticalPositionForBox(InlineBox* box, VerticalPositionCache& verticalPositionCache)
    671671{
    672672    if (box->renderer()->isText())
     
    686686    bool isRenderInline = renderer->isRenderInline();
    687687    if (isRenderInline && !firstLine) {
    688         int verticalPosition = verticalPositionCache.get(renderer, baselineType());
     688        LayoutUnit verticalPosition = verticalPositionCache.get(renderer, baselineType());
    689689        if (verticalPosition != PositionUndefined)
    690690            return verticalPosition;
  • trunk/Source/WebCore/rendering/RootInlineBox.h

    r90791 r90869  
    6060    int blockDirectionPointInLine() const { return max(lineTop(), selectionTop()); }
    6161
    62     int alignBoxesInBlockDirection(int heightOfBlock, GlyphOverflowAndFallbackFontsMap&, VerticalPositionCache&);
     62    LayoutUnit alignBoxesInBlockDirection(LayoutUnit heightOfBlock, GlyphOverflowAndFallbackFontsMap&, VerticalPositionCache&);
    6363    void setLineTopBottomPositions(LayoutUnit top, LayoutUnit bottom)
    6464    {
     
    112112    InlineBox* lastSelectedBox();
    113113
    114     GapRects lineSelectionGap(RenderBlock* rootBlock, const IntPoint& rootBlockPhysicalPosition, const IntSize& offsetFromRootBlock, int selTop, int selHeight, const PaintInfo*);
     114    GapRects lineSelectionGap(RenderBlock* rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, LayoutUnit selTop, LayoutUnit selHeight, const PaintInfo*);
    115115
    116116    RenderBlock* block() const;
     
    141141    IntRect paddedLayoutOverflowRect(int endPadding) const;
    142142
    143     void ascentAndDescentForBox(InlineBox*, GlyphOverflowAndFallbackFontsMap&, int& ascent, int& descent, bool& affectsAscent, bool& affectsDescent) const;
    144     int verticalPositionForBox(InlineBox*, VerticalPositionCache&);
     143    void ascentAndDescentForBox(InlineBox*, GlyphOverflowAndFallbackFontsMap&, LayoutUnit& ascent, LayoutUnit& descent, bool& affectsAscent, bool& affectsDescent) const;
     144    LayoutUnit verticalPositionForBox(InlineBox*, VerticalPositionCache&);
    145145    bool includeLeadingForBox(InlineBox*) const;
    146146    bool includeFontForBox(InlineBox*) const;
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r90863 r90869  
    10651065}
    10661066
    1067 void RenderStyle::getShadowExtent(const ShadowData* shadow, int &top, int &right, int &bottom, int &left) const
     1067void RenderStyle::getShadowExtent(const ShadowData* shadow, LayoutUnit &top, LayoutUnit &right, LayoutUnit &bottom, LayoutUnit &left) const
    10681068{
    10691069    top = 0;
     
    10841084}
    10851085
    1086 void RenderStyle::getShadowHorizontalExtent(const ShadowData* shadow, int &left, int &right) const
     1086void RenderStyle::getShadowHorizontalExtent(const ShadowData* shadow, LayoutUnit &left, LayoutUnit &right) const
    10871087{
    10881088    left = 0;
     
    10991099}
    11001100
    1101 void RenderStyle::getShadowVerticalExtent(const ShadowData* shadow, int &top, int &bottom) const
     1101void RenderStyle::getShadowVerticalExtent(const ShadowData* shadow, LayoutUnit &top, LayoutUnit &bottom) const
    11021102{
    11031103    top = 0;
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r90863 r90869  
    652652
    653653    const ShadowData* textShadow() const { return rareInheritedData->textShadow.get(); }
    654     void getTextShadowExtent(int& top, int& right, int& bottom, int& left) const { getShadowExtent(textShadow(), top, right, bottom, left); }
    655     void getTextShadowHorizontalExtent(int& left, int& right) const { getShadowHorizontalExtent(textShadow(), left, right); }
    656     void getTextShadowVerticalExtent(int& top, int& bottom) const { getShadowVerticalExtent(textShadow(), top, bottom); }
    657     void getTextShadowInlineDirectionExtent(int& logicalLeft, int& logicalRight) { getShadowInlineDirectionExtent(textShadow(), logicalLeft, logicalRight); }
    658     void getTextShadowBlockDirectionExtent(int& logicalTop, int& logicalBottom) { getShadowBlockDirectionExtent(textShadow(), logicalTop, logicalBottom); }
     654    void getTextShadowExtent(LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const { getShadowExtent(textShadow(), top, right, bottom, left); }
     655    void getTextShadowHorizontalExtent(LayoutUnit& left, LayoutUnit& right) const { getShadowHorizontalExtent(textShadow(), left, right); }
     656    void getTextShadowVerticalExtent(LayoutUnit& top, LayoutUnit& bottom) const { getShadowVerticalExtent(textShadow(), top, bottom); }
     657    void getTextShadowInlineDirectionExtent(LayoutUnit& logicalLeft, LayoutUnit& logicalRight) { getShadowInlineDirectionExtent(textShadow(), logicalLeft, logicalRight); }
     658    void getTextShadowBlockDirectionExtent(LayoutUnit& logicalTop, LayoutUnit& logicalBottom) { getShadowBlockDirectionExtent(textShadow(), logicalTop, logicalBottom); }
    659659
    660660    float textStrokeWidth() const { return rareInheritedData->textStrokeWidth; }
     
    672672
    673673    const ShadowData* boxShadow() const { return rareNonInheritedData->m_boxShadow.get(); }
    674     void getBoxShadowExtent(int& top, int& right, int& bottom, int& left) const { getShadowExtent(boxShadow(), top, right, bottom, left); }
    675     void getBoxShadowHorizontalExtent(int& left, int& right) const { getShadowHorizontalExtent(boxShadow(), left, right); }
    676     void getBoxShadowVerticalExtent(int& top, int& bottom) const { getShadowVerticalExtent(boxShadow(), top, bottom); }
    677     void getBoxShadowInlineDirectionExtent(int& logicalLeft, int& logicalRight) { getShadowInlineDirectionExtent(boxShadow(), logicalLeft, logicalRight); }
    678     void getBoxShadowBlockDirectionExtent(int& logicalTop, int& logicalBottom) { getShadowBlockDirectionExtent(boxShadow(), logicalTop, logicalBottom); }
     674    void getBoxShadowExtent(LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const { getShadowExtent(boxShadow(), top, right, bottom, left); }
     675    void getBoxShadowHorizontalExtent(LayoutUnit& left, LayoutUnit& right) const { getShadowHorizontalExtent(boxShadow(), left, right); }
     676    void getBoxShadowVerticalExtent(LayoutUnit& top, LayoutUnit& bottom) const { getShadowVerticalExtent(boxShadow(), top, bottom); }
     677    void getBoxShadowInlineDirectionExtent(LayoutUnit& logicalLeft, LayoutUnit& logicalRight) { getShadowInlineDirectionExtent(boxShadow(), logicalLeft, logicalRight); }
     678    void getBoxShadowBlockDirectionExtent(LayoutUnit& logicalTop, LayoutUnit& logicalBottom) { getShadowBlockDirectionExtent(boxShadow(), logicalTop, logicalBottom); }
    679679
    680680    StyleReflection* boxReflect() const { return rareNonInheritedData->m_boxReflect.get(); }
     
    13571357private:
    13581358    void inheritUnicodeBidiFrom(const RenderStyle* parent) { noninherited_flags._unicodeBidi = parent->noninherited_flags._unicodeBidi; }
    1359     void getShadowExtent(const ShadowData*, int& top, int& right, int& bottom, int& left) const;
    1360     void getShadowHorizontalExtent(const ShadowData*, int& left, int& right) const;
    1361     void getShadowVerticalExtent(const ShadowData*, int& top, int& bottom) const;
    1362     void getShadowInlineDirectionExtent(const ShadowData* shadow, int& logicalLeft, int& logicalRight) const
     1359    void getShadowExtent(const ShadowData*, LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const;
     1360    void getShadowHorizontalExtent(const ShadowData*, LayoutUnit& left, LayoutUnit& right) const;
     1361    void getShadowVerticalExtent(const ShadowData*, LayoutUnit& top, LayoutUnit& bottom) const;
     1362    void getShadowInlineDirectionExtent(const ShadowData* shadow, LayoutUnit& logicalLeft, LayoutUnit& logicalRight) const
    13631363    {
    13641364        return isHorizontalWritingMode() ? getShadowHorizontalExtent(shadow, logicalLeft, logicalRight) : getShadowVerticalExtent(shadow, logicalLeft, logicalRight);
    13651365    }
    1366     void getShadowBlockDirectionExtent(const ShadowData* shadow, int& logicalTop, int& logicalBottom) const
     1366    void getShadowBlockDirectionExtent(const ShadowData* shadow, LayoutUnit& logicalTop, LayoutUnit& logicalBottom) const
    13671367    {
    13681368        return isHorizontalWritingMode() ? getShadowVerticalExtent(shadow, logicalTop, logicalBottom) : getShadowHorizontalExtent(shadow, logicalTop, logicalBottom);
  • trunk/Source/WebCore/rendering/style/ShadowData.cpp

    r85603 r90869  
    2222#include "config.h"
    2323#include "ShadowData.h"
    24 
    25 #include "FloatRect.h"
    26 #include "IntRect.h"
    2724
    2825using namespace std;
     
    5754}
    5855
    59 static inline void calculateShadowExtent(const ShadowData* shadow, int additionalOutlineSize, int& shadowLeft, int& shadowRight, int& shadowTop, int& shadowBottom)
     56static inline void calculateShadowExtent(const ShadowData* shadow, int additionalOutlineSize, LayoutUnit& shadowLeft, LayoutUnit& shadowRight, LayoutUnit& shadowTop, LayoutUnit& shadowBottom)
    6057{
    6158    do {
     
    8784void ShadowData::adjustRectForShadow(FloatRect& rect, int additionalOutlineSize) const
    8885{
    89     int shadowLeft = 0;
    90     int shadowRight = 0;
    91     int shadowTop = 0;
    92     int shadowBottom = 0;
     86    LayoutUnit shadowLeft = 0;
     87    LayoutUnit shadowRight = 0;
     88    LayoutUnit shadowTop = 0;
     89    LayoutUnit shadowBottom = 0;
    9390    calculateShadowExtent(this, additionalOutlineSize, shadowLeft, shadowRight, shadowTop, shadowBottom);
    9491
  • trunk/Source/WebCore/rendering/style/ShadowData.h

    r85027 r90869  
    2727
    2828#include "Color.h"
     29#include "LayoutTypes.h"
    2930#include <wtf/OwnPtr.h>
    3031#include <wtf/PassOwnPtr.h>
    3132
    3233namespace WebCore {
    33 
    34 class FloatRect;
    35 class IntRect;
    3634
    3735enum ShadowStyle { Normal, Inset };
     
    5250    }
    5351
    54     ShadowData(int x, int y, int blur, int spread, ShadowStyle style, bool isWebkitBoxShadow, const Color& color)
     52    ShadowData(LayoutUnit x, LayoutUnit y, int blur, int spread, ShadowStyle style, bool isWebkitBoxShadow, const Color& color)
    5553        : m_x(x)
    5654        , m_y(y)
     
    7169    }
    7270   
    73     int x() const { return m_x; }
    74     int y() const { return m_y; }
     71    LayoutUnit x() const { return m_x; }
     72    LayoutUnit y() const { return m_y; }
    7573    int blur() const { return m_blur; }
    7674    int spread() const { return m_spread; }
     
    8684
    8785private:
    88     int m_x;
    89     int m_y;
     86    LayoutUnit m_x;
     87    LayoutUnit m_y;
    9088    int m_blur;
    9189    int m_spread;
Note: See TracChangeset for help on using the changeset viewer.