Changeset 109785 in webkit


Ignore:
Timestamp:
Mar 5, 2012 12:44:00 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r109656.
http://trac.webkit.org/changeset/109656
https://bugs.webkit.org/show_bug.cgi?id=80316

This seems to have regressed Parser/html5-full-render by about
10% (Requested by anttik on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-03-05

Source/WebCore:

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::getPositionOffsetValue):
(WebCore::getBorderRadiusCornerValues):
(WebCore::getBorderRadiusCornerValue):
(WebCore::getBorderRadiusShorthandValue):
(WebCore::lineHeightFromStyle):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

  • css/CSSGrammar.y:
  • css/CSSParser.cpp:

(WebCore::CSSParser::validUnit):
(WebCore::CSSParser::createPrimitiveNumericValue):
(WebCore::unitFromString):
(WebCore::CSSParser::parseValidPrimitive):
(WebCore::CSSParser::detectNumberToken):

  • css/CSSPrimitiveValue.cpp:

(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::unitCategory):
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory):
(WebCore::CSSPrimitiveValue::customCssText):

  • css/CSSPrimitiveValue.h:

(CSSPrimitiveValue):

  • css/CSSPrimitiveValue.idl:
  • css/CSSStyleApplyProperty.cpp:

(WebCore::ApplyPropertyLength::applyValue):
(WebCore::ApplyPropertyBorderRadius::applyValue):
(WebCore::ApplyPropertyFontSize::applyValue):
(WebCore::ApplyPropertyLineHeight::applyValue):
(WebCore::ApplyPropertyVerticalAlign::applyValue):

  • css/CSSStyleSelector.cpp:

(WebCore::CSSStyleSelector::collectMatchingRulesForList):

  • dom/Document.cpp:

(WebCore::Document::pageSizeAndMarginsInPixels):
(WebCore):

  • dom/Document.h:

(Document):

  • html/HTMLAreaElement.cpp:

(WebCore::HTMLAreaElement::getRegion):

  • platform/Length.h:

(WebCore::Length::calcValue):
(WebCore::Length::calcMinValue):
(WebCore::Length::calcFloatValue):
(WebCore::Length::blend):

  • rendering/RenderBR.cpp:

(WebCore::RenderBR::lineHeight):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::lineHeight):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::reflectionOffset):
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::clipRect):
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::computeInlineDirectionMargins):
(WebCore::RenderBox::computeLogicalHeightUsing):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::computeBlockDirectionMargins):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced):
(WebCore::RenderBox::computePositionedLogicalHeightReplaced):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::relativePositionOffsetX):
(WebCore::RenderBoxModelObject::relativePositionOffsetY):
(WebCore::RenderBoxModelObject::paddingTop):
(WebCore::RenderBoxModelObject::paddingBottom):
(WebCore::RenderBoxModelObject::paddingLeft):
(WebCore::RenderBoxModelObject::paddingRight):
(WebCore::RenderBoxModelObject::paddingBefore):
(WebCore::RenderBoxModelObject::paddingAfter):
(WebCore::RenderBoxModelObject::paddingStart):
(WebCore::RenderBoxModelObject::paddingEnd):
(WebCore::RenderBoxModelObject::getBackgroundRoundedRect):
(WebCore::RenderBoxModelObject::calculateFillTileSize):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
(WebCore::computeBorderImageSide):
(WebCore::RenderBoxModelObject::paintNinePieceImage):
(WebCore::RenderBoxModelObject::paintBorder):
(WebCore::RenderBoxModelObject::paintBoxShadow):

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
(WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithm):

  • rendering/RenderInline.cpp:

(WebCore::computeMargin):
(WebCore::RenderInline::lineHeight):

  • rendering/RenderMenuList.cpp:

(WebCore::RenderMenuList::updateOptionsWidth):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::repaintAfterLayoutIfNeeded):

  • rendering/RenderObject.h:

(RenderObject):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::paint):

  • rendering/RenderScrollbarPart.cpp:

(WebCore::calcScrollbarThicknessUsing):
(WebCore::RenderScrollbarPart::computeScrollbarWidth):
(WebCore::RenderScrollbarPart::computeScrollbarHeight):

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::computeLogicalWidth):
(WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::logicalHeightForRowSizing):

  • rendering/RenderTableSection.cpp:

(WebCore::RenderTableSection::calcRowLogicalHeight):

  • rendering/RenderText.h:

(WebCore::RenderText::marginLeft):
(WebCore::RenderText::marginRight):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::paintMenuListButtonGradients):

  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::paint):

  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::verticalPositionForBox):

  • rendering/style/RenderStyle.cpp:

(WebCore::calcRadiiFor):
(WebCore::RenderStyle::getRoundedBorderFor):

  • rendering/style/RenderStyle.h:
  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::resolveLengthAttributeForSVG):
(WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight):

LayoutTests:

  • css3/viewport-relative-lengths/css3-viewport-relative-lengths-getStyle-expected.txt: Removed.
  • css3/viewport-relative-lengths/css3-viewport-relative-lengths-getStyle.html: Removed.
  • css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh-absolute-expected.html: Removed.
  • css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh-absolute.html: Removed.
  • css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh-expected.html: Removed.
  • css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh.html: Removed.
  • css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin-absolute-expected.html: Removed.
  • css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin-absolute.html: Removed.
  • css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin-expected.html: Removed.
  • css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin.html: Removed.
  • css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw-absolute-expected.html: Removed.
  • css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw-absolute.html: Removed.
  • css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw-expected.html: Removed.
  • css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw.html: Removed.
  • fast/dom/Window/window-properties-expected.txt:
  • platform/gtk/fast/dom/Window/window-properties-expected.txt:
  • platform/mac/fast/dom/Window/window-properties-expected.txt:
  • platform/qt/fast/dom/Window/window-properties-expected.txt:
  • platform/win/fast/dom/Window/window-properties-expected.txt:
Location:
trunk
Files:
14 deleted
40 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r109782 r109785  
     12012-03-05  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r109656.
     4        http://trac.webkit.org/changeset/109656
     5        https://bugs.webkit.org/show_bug.cgi?id=80316
     6
     7        This seems to have regressed Parser/html5-full-render by about
     8        10% (Requested by anttik on #webkit).
     9
     10        * css3/viewport-relative-lengths/css3-viewport-relative-lengths-getStyle-expected.txt: Removed.
     11        * css3/viewport-relative-lengths/css3-viewport-relative-lengths-getStyle.html: Removed.
     12        * css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh-absolute-expected.html: Removed.
     13        * css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh-absolute.html: Removed.
     14        * css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh-expected.html: Removed.
     15        * css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh.html: Removed.
     16        * css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin-absolute-expected.html: Removed.
     17        * css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin-absolute.html: Removed.
     18        * css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin-expected.html: Removed.
     19        * css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin.html: Removed.
     20        * css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw-absolute-expected.html: Removed.
     21        * css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw-absolute.html: Removed.
     22        * css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw-expected.html: Removed.
     23        * css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw.html: Removed.
     24        * fast/dom/Window/window-properties-expected.txt:
     25        * platform/gtk/fast/dom/Window/window-properties-expected.txt:
     26        * platform/mac/fast/dom/Window/window-properties-expected.txt:
     27        * platform/qt/fast/dom/Window/window-properties-expected.txt:
     28        * platform/win/fast/dom/Window/window-properties-expected.txt:
     29
    1302012-03-05  Adam Klein  <adamk@chromium.org>
    231
  • trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt

    r109656 r109785  
    290290window.CSSPrimitiveValue.CSS_UNKNOWN [number]
    291291window.CSSPrimitiveValue.CSS_URI [number]
    292 window.CSSPrimitiveValue.CSS_VH [number]
    293 window.CSSPrimitiveValue.CSS_VMIN [number]
    294 window.CSSPrimitiveValue.CSS_VW [number]
    295292window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
    296293window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
     
    324321window.CSSPrimitiveValue.prototype.CSS_URI [number]
    325322window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
    326 window.CSSPrimitiveValue.prototype.CSS_VH [number]
    327 window.CSSPrimitiveValue.prototype.CSS_VMIN [number]
    328 window.CSSPrimitiveValue.prototype.CSS_VW [number]
    329323window.CSSPrimitiveValue.prototype.getCounterValue [function]
    330324window.CSSPrimitiveValue.prototype.getFloatValue [function]
  • trunk/LayoutTests/platform/gtk/fast/dom/Window/window-properties-expected.txt

    r109656 r109785  
    292292window.CSSPrimitiveValue.CSS_UNKNOWN [number]
    293293window.CSSPrimitiveValue.CSS_URI [number]
    294 window.CSSPrimitiveValue.CSS_VH [number]
    295 window.CSSPrimitiveValue.CSS_VMIN [number]
    296 window.CSSPrimitiveValue.CSS_VW [number]
    297294window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
    298295window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
     
    326323window.CSSPrimitiveValue.prototype.CSS_URI [number]
    327324window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
    328 window.CSSPrimitiveValue.prototype.CSS_VH [number]
    329 window.CSSPrimitiveValue.prototype.CSS_VMIN [number]
    330 window.CSSPrimitiveValue.prototype.CSS_VW [number]
    331325window.CSSPrimitiveValue.prototype.getCounterValue [function]
    332326window.CSSPrimitiveValue.prototype.getFloatValue [function]
  • trunk/LayoutTests/platform/mac/fast/dom/Window/window-properties-expected.txt

    r109656 r109785  
    315315window.CSSPrimitiveValue.CSS_UNKNOWN [number]
    316316window.CSSPrimitiveValue.CSS_URI [number]
    317 window.CSSPrimitiveValue.CSS_VH [number]
    318 window.CSSPrimitiveValue.CSS_VMIN [number]
    319 window.CSSPrimitiveValue.CSS_VW [number]
    320317window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
    321318window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
     
    349346window.CSSPrimitiveValue.prototype.CSS_URI [number]
    350347window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
    351 window.CSSPrimitiveValue.prototype.CSS_VH [number]
    352 window.CSSPrimitiveValue.prototype.CSS_VMIN [number]
    353 window.CSSPrimitiveValue.prototype.CSS_VW [number]
    354348window.CSSPrimitiveValue.prototype.getCounterValue [function]
    355349window.CSSPrimitiveValue.prototype.getFloatValue [function]
  • trunk/LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt

    r109656 r109785  
    289289window.CSSPrimitiveValue.CSS_UNKNOWN [number]
    290290window.CSSPrimitiveValue.CSS_URI [number]
    291 window.CSSPrimitiveValue.CSS_VH [number]
    292 window.CSSPrimitiveValue.CSS_VMIN [number]
    293 window.CSSPrimitiveValue.CSS_VW [number]
    294291window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
    295292window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
     
    323320window.CSSPrimitiveValue.prototype.CSS_URI [number]
    324321window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
    325 window.CSSPrimitiveValue.prototype.CSS_VH [number]
    326 window.CSSPrimitiveValue.prototype.CSS_VMIN [number]
    327 window.CSSPrimitiveValue.prototype.CSS_VW [number]
    328322window.CSSPrimitiveValue.prototype.getCounterValue [function]
    329323window.CSSPrimitiveValue.prototype.getFloatValue [function]
  • trunk/LayoutTests/platform/win/fast/dom/Window/window-properties-expected.txt

    r109656 r109785  
    290290window.CSSPrimitiveValue.CSS_UNKNOWN [number]
    291291window.CSSPrimitiveValue.CSS_URI [number]
    292 window.CSSPrimitiveValue.CSS_VH [number]
    293 window.CSSPrimitiveValue.CSS_VMIN [number]
    294 window.CSSPrimitiveValue.CSS_VW [number]
    295292window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
    296293window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
     
    324321window.CSSPrimitiveValue.prototype.CSS_URI [number]
    325322window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
    326 window.CSSPrimitiveValue.prototype.CSS_VH [number]
    327 window.CSSPrimitiveValue.prototype.CSS_VMIN [number]
    328 window.CSSPrimitiveValue.prototype.CSS_VW [number]
    329323window.CSSPrimitiveValue.prototype.getCounterValue [function]
    330324window.CSSPrimitiveValue.prototype.getFloatValue [function]
  • trunk/Source/WebCore/ChangeLog

    r109783 r109785  
     12012-03-05  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r109656.
     4        http://trac.webkit.org/changeset/109656
     5        https://bugs.webkit.org/show_bug.cgi?id=80316
     6
     7        This seems to have regressed Parser/html5-full-render by about
     8        10% (Requested by anttik on #webkit).
     9
     10        * css/CSSComputedStyleDeclaration.cpp:
     11        (WebCore::getPositionOffsetValue):
     12        (WebCore::getBorderRadiusCornerValues):
     13        (WebCore::getBorderRadiusCornerValue):
     14        (WebCore::getBorderRadiusShorthandValue):
     15        (WebCore::lineHeightFromStyle):
     16        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
     17        * css/CSSGrammar.y:
     18        * css/CSSParser.cpp:
     19        (WebCore::CSSParser::validUnit):
     20        (WebCore::CSSParser::createPrimitiveNumericValue):
     21        (WebCore::unitFromString):
     22        (WebCore::CSSParser::parseValidPrimitive):
     23        (WebCore::CSSParser::detectNumberToken):
     24        * css/CSSPrimitiveValue.cpp:
     25        (WebCore::isValidCSSUnitTypeForDoubleConversion):
     26        (WebCore::unitCategory):
     27        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
     28        (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory):
     29        (WebCore::CSSPrimitiveValue::customCssText):
     30        * css/CSSPrimitiveValue.h:
     31        (CSSPrimitiveValue):
     32        * css/CSSPrimitiveValue.idl:
     33        * css/CSSStyleApplyProperty.cpp:
     34        (WebCore::ApplyPropertyLength::applyValue):
     35        (WebCore::ApplyPropertyBorderRadius::applyValue):
     36        (WebCore::ApplyPropertyFontSize::applyValue):
     37        (WebCore::ApplyPropertyLineHeight::applyValue):
     38        (WebCore::ApplyPropertyVerticalAlign::applyValue):
     39        * css/CSSStyleSelector.cpp:
     40        (WebCore::CSSStyleSelector::collectMatchingRulesForList):
     41        * dom/Document.cpp:
     42        (WebCore::Document::pageSizeAndMarginsInPixels):
     43        (WebCore):
     44        * dom/Document.h:
     45        (Document):
     46        * html/HTMLAreaElement.cpp:
     47        (WebCore::HTMLAreaElement::getRegion):
     48        * platform/Length.h:
     49        (WebCore::Length::calcValue):
     50        (WebCore::Length::calcMinValue):
     51        (WebCore::Length::calcFloatValue):
     52        (WebCore::Length::blend):
     53        * rendering/RenderBR.cpp:
     54        (WebCore::RenderBR::lineHeight):
     55        * rendering/RenderBlock.cpp:
     56        (WebCore::RenderBlock::lineHeight):
     57        * rendering/RenderBox.cpp:
     58        (WebCore::RenderBox::reflectionOffset):
     59        (WebCore::RenderBox::paintBoxDecorations):
     60        (WebCore::RenderBox::clipRect):
     61        (WebCore::RenderBox::computeLogicalWidthInRegion):
     62        (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
     63        (WebCore::RenderBox::computeInlineDirectionMargins):
     64        (WebCore::RenderBox::computeLogicalHeightUsing):
     65        (WebCore::RenderBox::computePercentageLogicalHeight):
     66        (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
     67        (WebCore::RenderBox::computeBlockDirectionMargins):
     68        (WebCore::RenderBox::computePositionedLogicalWidthUsing):
     69        (WebCore::RenderBox::computePositionedLogicalHeightUsing):
     70        (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
     71        (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
     72        * rendering/RenderBoxModelObject.cpp:
     73        (WebCore::RenderBoxModelObject::relativePositionOffsetX):
     74        (WebCore::RenderBoxModelObject::relativePositionOffsetY):
     75        (WebCore::RenderBoxModelObject::paddingTop):
     76        (WebCore::RenderBoxModelObject::paddingBottom):
     77        (WebCore::RenderBoxModelObject::paddingLeft):
     78        (WebCore::RenderBoxModelObject::paddingRight):
     79        (WebCore::RenderBoxModelObject::paddingBefore):
     80        (WebCore::RenderBoxModelObject::paddingAfter):
     81        (WebCore::RenderBoxModelObject::paddingStart):
     82        (WebCore::RenderBoxModelObject::paddingEnd):
     83        (WebCore::RenderBoxModelObject::getBackgroundRoundedRect):
     84        (WebCore::RenderBoxModelObject::calculateFillTileSize):
     85        (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
     86        (WebCore::computeBorderImageSide):
     87        (WebCore::RenderBoxModelObject::paintNinePieceImage):
     88        (WebCore::RenderBoxModelObject::paintBorder):
     89        (WebCore::RenderBoxModelObject::paintBoxShadow):
     90        * rendering/RenderFlexibleBox.cpp:
     91        (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
     92        (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
     93        (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithm):
     94        * rendering/RenderInline.cpp:
     95        (WebCore::computeMargin):
     96        (WebCore::RenderInline::lineHeight):
     97        * rendering/RenderMenuList.cpp:
     98        (WebCore::RenderMenuList::updateOptionsWidth):
     99        * rendering/RenderObject.cpp:
     100        (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
     101        * rendering/RenderObject.h:
     102        (RenderObject):
     103        * rendering/RenderReplaced.cpp:
     104        (WebCore::RenderReplaced::paint):
     105        * rendering/RenderScrollbarPart.cpp:
     106        (WebCore::calcScrollbarThicknessUsing):
     107        (WebCore::RenderScrollbarPart::computeScrollbarWidth):
     108        (WebCore::RenderScrollbarPart::computeScrollbarHeight):
     109        * rendering/RenderTable.cpp:
     110        (WebCore::RenderTable::computeLogicalWidth):
     111        (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
     112        * rendering/RenderTableCell.cpp:
     113        (WebCore::RenderTableCell::logicalHeightForRowSizing):
     114        * rendering/RenderTableSection.cpp:
     115        (WebCore::RenderTableSection::calcRowLogicalHeight):
     116        * rendering/RenderText.h:
     117        (WebCore::RenderText::marginLeft):
     118        (WebCore::RenderText::marginRight):
     119        * rendering/RenderThemeMac.mm:
     120        (WebCore::RenderThemeMac::paintMenuListButtonGradients):
     121        * rendering/RenderWidget.cpp:
     122        (WebCore::RenderWidget::paint):
     123        * rendering/RootInlineBox.cpp:
     124        (WebCore::RootInlineBox::verticalPositionForBox):
     125        * rendering/style/RenderStyle.cpp:
     126        (WebCore::calcRadiiFor):
     127        (WebCore::RenderStyle::getRoundedBorderFor):
     128        * rendering/style/RenderStyle.h:
     129        * rendering/svg/RenderSVGRoot.cpp:
     130        (WebCore::resolveLengthAttributeForSVG):
     131        (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
     132        (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
     133
    11342012-03-05  Rob Buis  <rbuis@rim.com>
    2135
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r109656 r109785  
    544544}
    545545
    546 static PassRefPtr<CSSValue> getPositionOffsetValue(RenderStyle* style, int propertyID, CSSValuePool* cssValuePool, const IntSize& viewportSize)
     546static PassRefPtr<CSSValue> getPositionOffsetValue(RenderStyle* style, int propertyID, CSSValuePool* cssValuePool)
    547547{
    548548    if (!style)
     
    570570        if (l.type() == WebCore::Fixed)
    571571            return zoomAdjustedPixelValue(l.value(), style, cssValuePool);
    572         else if (l.isViewportRelative())
    573             return zoomAdjustedPixelValue(l.calcValue(0, viewportSize), style, cssValuePool);
    574572        return cssValuePool->createValue(l);
    575573    }
     
    593591}
    594592
    595 static PassRefPtr<CSSValueList> getBorderRadiusCornerValues(LengthSize radius, const RenderStyle* style, CSSValuePool* cssValuePool, const IntSize& viewportSize)
     593static PassRefPtr<CSSValueList> getBorderRadiusCornerValues(LengthSize radius, const RenderStyle* style, CSSValuePool* cssValuePool)
    596594{
    597595    RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
     
    599597        list->append(cssValuePool->createValue(radius.width().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
    600598    else
    601         list->append(zoomAdjustedPixelValue(radius.width().calcValue(0, viewportSize), style, cssValuePool));
     599        list->append(zoomAdjustedPixelValue(radius.width().value(), style, cssValuePool));
    602600    if (radius.height().type() == Percent)
    603601        list->append(cssValuePool->createValue(radius.height().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
    604602    else
    605         list->append(zoomAdjustedPixelValue(radius.height().calcValue(0, viewportSize), style, cssValuePool));
     603        list->append(zoomAdjustedPixelValue(radius.height().value(), style, cssValuePool));
    606604    return list.release();
    607605}
    608606
    609 static PassRefPtr<CSSValue> getBorderRadiusCornerValue(LengthSize radius, const RenderStyle* style, CSSValuePool* cssValuePool, const IntSize& viewportSize)
     607static PassRefPtr<CSSValue> getBorderRadiusCornerValue(LengthSize radius, const RenderStyle* style, CSSValuePool* cssValuePool)
    610608{
    611609    if (radius.width() == radius.height()) {
    612610        if (radius.width().type() == Percent)
    613611            return cssValuePool->createValue(radius.width().percent(), CSSPrimitiveValue::CSS_PERCENTAGE);
    614         return zoomAdjustedPixelValue(radius.width().calcValue(0, viewportSize), style, cssValuePool);
     612        return zoomAdjustedPixelValue(radius.width().value(), style, cssValuePool);
    615613    }
    616     return getBorderRadiusCornerValues(radius, style, cssValuePool, viewportSize);
    617 }
    618 
    619 static PassRefPtr<CSSValueList> getBorderRadiusShorthandValue(const RenderStyle* style, CSSValuePool* cssValuePool, const IntSize& viewportSize)
     614    return getBorderRadiusCornerValues(radius, style, cssValuePool);
     615}
     616
     617static PassRefPtr<CSSValueList> getBorderRadiusShorthandValue(const RenderStyle* style, CSSValuePool* cssValuePool)
    620618{
    621619    RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
     
    629627    bool showVerticalTopLeft = (style->borderTopLeftRadius().width() != style->borderTopLeftRadius().height());
    630628
    631     RefPtr<CSSValueList> topLeftRadius = getBorderRadiusCornerValues(style->borderTopLeftRadius(), style, cssValuePool, viewportSize);
    632     RefPtr<CSSValueList> topRightRadius = getBorderRadiusCornerValues(style->borderTopRightRadius(), style, cssValuePool, viewportSize);
    633     RefPtr<CSSValueList> bottomRightRadius = getBorderRadiusCornerValues(style->borderBottomRightRadius(), style, cssValuePool, viewportSize);
    634     RefPtr<CSSValueList> bottomLeftRadius = getBorderRadiusCornerValues(style->borderBottomLeftRadius(), style, cssValuePool, viewportSize);
     629    RefPtr<CSSValueList> topLeftRadius = getBorderRadiusCornerValues(style->borderTopLeftRadius(), style, cssValuePool);
     630    RefPtr<CSSValueList> topRightRadius = getBorderRadiusCornerValues(style->borderTopRightRadius(), style, cssValuePool);
     631    RefPtr<CSSValueList> bottomRightRadius = getBorderRadiusCornerValues(style->borderBottomRightRadius(), style, cssValuePool);
     632    RefPtr<CSSValueList> bottomLeftRadius = getBorderRadiusCornerValues(style->borderBottomLeftRadius(), style, cssValuePool);
    635633
    636634    RefPtr<CSSValueList> horizontalRadii = CSSValueList::createSpaceSeparated();
     
    12351233}
    12361234
    1237 static PassRefPtr<CSSPrimitiveValue> lineHeightFromStyle(RenderStyle* style, CSSValuePool* cssValuePool, const IntSize& viewportSize)
     1235static PassRefPtr<CSSPrimitiveValue> lineHeightFromStyle(RenderStyle* style, CSSValuePool* cssValuePool)
    12381236{
    12391237    Length length = style->lineHeight();
     
    12461244        // that here either.
    12471245        return zoomAdjustedPixelValue(static_cast<int>(length.percent() * style->fontDescription().specifiedSize()) / 100, style, cssValuePool);
    1248     return zoomAdjustedPixelValue(length.calcValue(0, viewportSize), style, cssValuePool);
     1246    return zoomAdjustedPixelValue(length.value(), style, cssValuePool);
    12491247}
    12501248
     
    15081506            return zoomAdjustedPixelValue(style->borderLeftWidth(), style.get(), cssValuePool);
    15091507        case CSSPropertyBottom:
    1510             return getPositionOffsetValue(style.get(), CSSPropertyBottom, cssValuePool, m_node->document()->viewportSize());
     1508            return getPositionOffsetValue(style.get(), CSSPropertyBottom, cssValuePool);
    15111509        case CSSPropertyWebkitBoxAlign:
    15121510            return cssValuePool->createValue(style->boxAlign());
     
    16241622            computedFont->weight = fontWeightFromStyle(style.get(), cssValuePool);
    16251623            computedFont->size = fontSizeFromStyle(style.get(), cssValuePool);
    1626             computedFont->lineHeight = lineHeightFromStyle(style.get(), cssValuePool, m_node->document()->viewportSize());
     1624            computedFont->lineHeight = lineHeightFromStyle(style.get(), cssValuePool);
    16271625            computedFont->family = fontFamilyFromStyle(style.get(), cssValuePool);
    16281626            return computedFont.release();
     
    17071705            return CSSPrimitiveValue::create(style->imageRendering());
    17081706        case CSSPropertyLeft:
    1709             return getPositionOffsetValue(style.get(), CSSPropertyLeft, cssValuePool, m_node->document()->viewportSize());
     1707            return getPositionOffsetValue(style.get(), CSSPropertyLeft, cssValuePool);
    17101708        case CSSPropertyLetterSpacing:
    17111709            if (!style->letterSpacing())
     
    17171715            return cssValuePool->createValue(style->lineClamp().value(), style->lineClamp().isPercentage() ? CSSPrimitiveValue::CSS_PERCENTAGE : CSSPrimitiveValue::CSS_NUMBER);
    17181716        case CSSPropertyLineHeight:
    1719             return lineHeightFromStyle(style.get(), cssValuePool, m_node->document()->viewportSize());
     1717            return lineHeightFromStyle(style.get(), cssValuePool);
    17201718        case CSSPropertyListStyleImage:
    17211719            if (style->listStyleImage())
     
    17411739                return zoomAdjustedPixelValueForLength(marginRight, style.get(), cssValuePool);
    17421740            int value;
    1743             if (marginRight.isPercent() || marginRight.isViewportRelative())
     1741            if (marginRight.isPercent())
    17441742                // RenderBox gives a marginRight() that is the distance between the right-edge of the child box
    17451743                // and the right-edge of the containing box, when display == BLOCK. Let's calculate the absolute
    17461744                // value of the specified margin-right % instead of relying on RenderBox's marginRight() value.
    1747                 value = marginRight.calcMinValue(toRenderBox(renderer)->containingBlockLogicalWidthForContent(), m_node->document()->viewportSize());
     1745                value = marginRight.calcMinValue(toRenderBox(renderer)->containingBlockLogicalWidthForContent());
    17481746            else
    17491747                value = toRenderBox(renderer)->marginRight();
     
    18401838            return cssValuePool->createValue(style->position());
    18411839        case CSSPropertyRight:
    1842             return getPositionOffsetValue(style.get(), CSSPropertyRight, cssValuePool, m_node->document()->viewportSize());
     1840            return getPositionOffsetValue(style.get(), CSSPropertyRight, cssValuePool);
    18431841        case CSSPropertyTableLayout:
    18441842            return cssValuePool->createValue(style->tableLayout());
     
    18981896            return cssValuePool->createValue(style->textTransform());
    18991897        case CSSPropertyTop:
    1900             return getPositionOffsetValue(style.get(), CSSPropertyTop, cssValuePool, m_node->document()->viewportSize());
     1898            return getPositionOffsetValue(style.get(), CSSPropertyTop, cssValuePool);
    19011899        case CSSPropertyUnicodeBidi:
    19021900            return cssValuePool->createValue(style->unicodeBidi());
     
    21572155            if (renderer) {
    21582156                LayoutRect box = sizingBox(renderer);
    2159                 IntSize viewportSize = m_node->document()->viewportSize();
    2160                 list->append(zoomAdjustedPixelValue(style->perspectiveOriginX().calcMinValue(box.width(), viewportSize), style.get(), cssValuePool));
    2161                 list->append(zoomAdjustedPixelValue(style->perspectiveOriginY().calcMinValue(box.height(), viewportSize), style.get(), cssValuePool));
     2157                list->append(zoomAdjustedPixelValue(style->perspectiveOriginX().calcMinValue(box.width()), style.get(), cssValuePool));
     2158                list->append(zoomAdjustedPixelValue(style->perspectiveOriginY().calcMinValue(box.height()), style.get(), cssValuePool));
    21622159            }
    21632160            else {
     
    21792176            return cssValuePool->createValue(style->userSelect());
    21802177        case CSSPropertyBorderBottomLeftRadius:
    2181             return getBorderRadiusCornerValue(style->borderBottomLeftRadius(), style.get(), cssValuePool, m_node->document()->viewportSize());
     2178            return getBorderRadiusCornerValue(style->borderBottomLeftRadius(), style.get(), cssValuePool);
    21822179        case CSSPropertyBorderBottomRightRadius:
    2183             return getBorderRadiusCornerValue(style->borderBottomRightRadius(), style.get(), cssValuePool, m_node->document()->viewportSize());
     2180            return getBorderRadiusCornerValue(style->borderBottomRightRadius(), style.get(), cssValuePool);
    21842181        case CSSPropertyBorderTopLeftRadius:
    2185             return getBorderRadiusCornerValue(style->borderTopLeftRadius(), style.get(), cssValuePool, m_node->document()->viewportSize());
     2182            return getBorderRadiusCornerValue(style->borderTopLeftRadius(), style.get(), cssValuePool);
    21862183        case CSSPropertyBorderTopRightRadius:
    2187             return getBorderRadiusCornerValue(style->borderTopRightRadius(), style.get(), cssValuePool, m_node->document()->viewportSize());
     2184            return getBorderRadiusCornerValue(style->borderTopRightRadius(), style.get(), cssValuePool);
    21882185        case CSSPropertyClip: {
    21892186            if (!style->hasClip())
     
    22042201            if (renderer) {
    22052202                IntRect box = sizingBox(renderer);
    2206                 IntSize viewportSize = m_node->document()->viewportSize();
    2207                 list->append(zoomAdjustedPixelValue(style->transformOriginX().calcMinValue(box.width(), viewportSize), style.get(), cssValuePool));
    2208                 list->append(zoomAdjustedPixelValue(style->transformOriginY().calcMinValue(box.height(), viewportSize), style.get(), cssValuePool));
     2203                list->append(zoomAdjustedPixelValue(style->transformOriginX().calcMinValue(box.width()), style.get(), cssValuePool));
     2204                list->append(zoomAdjustedPixelValue(style->transformOriginY().calcMinValue(box.height()), style.get(), cssValuePool));
    22092205                if (style->transformOriginZ() != 0)
    22102206                    list->append(zoomAdjustedPixelValue(style->transformOriginZ(), style.get(), cssValuePool));
     
    23342330            return valueForNinePieceImage(style->borderImage(), cssValuePool);
    23352331        case CSSPropertyBorderRadius:
    2336             return getBorderRadiusShorthandValue(style.get(), cssValuePool, m_node->document()->viewportSize());
     2332            return getBorderRadiusShorthandValue(style.get(), cssValuePool);
    23372333        case CSSPropertyBorderRight: {
    23382334            const int properties[3] = { CSSPropertyBorderRightWidth, CSSPropertyBorderRightStyle,
  • trunk/Source/WebCore/css/CSSGrammar.y

    r109656 r109785  
    101101%}
    102102
    103 %expect 58
     103%expect 55
    104104
    105105%nonassoc LOWEST_PREC
     
    190190%token <number> FLOATTOKEN
    191191%token <number> INTEGER
    192 %token <number> VW
    193 %token <number> VH
    194 %token <number> VMIN
    195192
    196193%token <string> URI
     
    14741471          doc->setUsesRemUnits(true);
    14751472  }
    1476   | VW maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VW; }
    1477   | VH maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VH; }
    1478   | VMIN maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VMIN; }
    14791473  ;
    14801474
  • trunk/Source/WebCore/css/CSSParser.cpp

    r109656 r109785  
    779779    case CSSPrimitiveValue::CSS_PT:
    780780    case CSSPrimitiveValue::CSS_PC:
    781     case CSSPrimitiveValue::CSS_VW:
    782     case CSSPrimitiveValue::CSS_VH:
    783     case CSSPrimitiveValue::CSS_VMIN:
    784781        b = (unitflags & FLength);
    785782        break;
     
    813810               
    814811    ASSERT((value->unit >= CSSPrimitiveValue::CSS_NUMBER && value->unit <= CSSPrimitiveValue::CSS_KHZ)
    815            || (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_REMS)
    816            || (value->unit >= CSSPrimitiveValue::CSS_VW && value->unit <= CSSPrimitiveValue::CSS_VMIN));
     812           || (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_REMS));
    817813    return cssValuePool()->createValue(value->fValue, static_cast<CSSPrimitiveValue::UnitTypes>(value->unit));
    818814}
     
    863859    if (equal(value->string, "kHz"))
    864860        return CSSPrimitiveValue::CSS_KHZ;
    865     if (equal(value->string, "vw"))
    866         return CSSPrimitiveValue::CSS_VW;
    867     if (equal(value->string, "vh"))
    868         return CSSPrimitiveValue::CSS_VH;
    869     if (equal(value->string, "vmin"))
    870         return CSSPrimitiveValue::CSS_VMIN;
    871861
    872862    return 0;
     
    913903        return createPrimitiveNumericValue(value);
    914904    if (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_REMS)
    915         return createPrimitiveNumericValue(value);
    916     if (value->unit >= CSSPrimitiveValue::CSS_VW && value->unit <= CSSPrimitiveValue::CSS_VMIN)
    917905        return createPrimitiveNumericValue(value);
    918906    if (value->unit >= CSSParserValue::Q_EMS)
     
    80518039            m_token = TURNS;
    80528040        return;
    8053     case 'v':
    8054         if (length == 2) {
    8055             if (isASCIIAlphaCaselessEqual(type[1], 'w'))
    8056                 m_token = VW;
    8057             else if (isASCIIAlphaCaselessEqual(type[1], 'h'))
    8058                 m_token = VH;
    8059         } else if (length == 4 && isASCIIAlphaCaselessEqual(type[1], 'm')
    8060                 && isASCIIAlphaCaselessEqual(type[2], 'i') && isASCIIAlphaCaselessEqual(type[3], 'n'))
    8061             m_token = VMIN;
    8062         return;
    80638041
    80648042    default:
  • trunk/Source/WebCore/css/CSSPrimitiveValue.cpp

    r109656 r109785  
    7878    case CSSPrimitiveValue:: CSS_S:
    7979    case CSSPrimitiveValue:: CSS_TURN:
    80     case CSSPrimitiveValue:: CSS_VW:
    81     case CSSPrimitiveValue:: CSS_VH:
    82     case CSSPrimitiveValue:: CSS_VMIN:
    8380        return true;
    8481    case CSSPrimitiveValue:: CSS_ATTR:
     
    134131    case CSSPrimitiveValue::CSS_KHZ:
    135132        return CSSPrimitiveValue::UFrequency;
    136     case CSSPrimitiveValue::CSS_VW:
    137     case CSSPrimitiveValue::CSS_VH:
    138     case CSSPrimitiveValue::CSS_VMIN:
    139         return CSSPrimitiveValue::UViewportRelativeLength;
    140133    default:
    141134        return CSSPrimitiveValue::UOther;
     
    274267            m_value.num = length.percent();
    275268            break;
    276         case ViewportRelativeWidth:
    277             m_primitiveUnitType = CSS_VW;
    278             m_value.num = length.viewportRelativeLength();
    279             break;
    280         case ViewportRelativeHeight:
    281             m_primitiveUnitType = CSS_VH;
    282             m_value.num = length.viewportRelativeLength();
    283             break;
    284         case ViewportRelativeMin:
    285             m_primitiveUnitType = CSS_VMIN;
    286             m_value.num = length.viewportRelativeLength();
    287             break;
    288269        case Relative:
    289270        case Undefined:
     
    614595    case UFrequency:
    615596        return CSS_HZ;
    616     case UViewportRelativeLength:
    617         return CSS_UNKNOWN; // Cannot convert between numbers and relative lengths.
    618597    default:
    619598        return CSS_UNKNOWN;
     
    10361015            text = m_value.shape->cssText();
    10371016            break;
    1038         case CSS_VW:
    1039             text = formatNumber(m_value.num) + "vw";
    1040             break;
    1041         case CSS_VH:
    1042             text = formatNumber(m_value.num) + "vh";
    1043             break;
    1044         case CSS_VMIN:
    1045             text = formatNumber(m_value.num) + "vmin";
    1046             break;
    10471017    }
    10481018
     
    10591029}
    10601030
    1061 Length CSSPrimitiveValue::viewportRelativeLength()
    1062 {
    1063     ASSERT(isViewportRelativeLength());
    1064     Length viewportLength;
    1065     switch (m_primitiveUnitType) {
    1066     case CSS_VW:
    1067         viewportLength = Length(getDoubleValue(), ViewportRelativeWidth);
    1068         break;
    1069     case CSS_VH:
    1070         viewportLength = Length(getDoubleValue(), ViewportRelativeHeight);
    1071         break;
    1072     case CSS_VMIN:
    1073         viewportLength = Length(getDoubleValue(), ViewportRelativeMin);
    1074         break;
    1075     default:
    1076         break;
    1077     }
    1078     return viewportLength;
    1079 }
    1080 
    10811031} // namespace WebCore
  • trunk/Source/WebCore/css/CSSPrimitiveValue.h

    r109656 r109785  
    8181        CSS_RECT = 24,
    8282        CSS_RGBCOLOR = 25,
    83         // From CSS Values and Units. Viewport Relative Lengths (vw/vh/vmin).
    84         CSS_VW = 26,
    85         CSS_VH = 27,
    86         CSS_VMIN = 28,
    8783        CSS_PAIR = 100, // We envision this being exposed as a means of getting computed style values for pairs (border-spacing/radius, background-position, etc.)
    8884        CSS_DASHBOARD_REGION = 101, // FIXME: Dashboard region should not be a primitive value.
     
    123119        UTime,
    124120        UFrequency,
    125         UViewportRelativeLength,
    126121        UOther
    127122    };
     
    159154    bool isCalculatedPercentageWithNumber() const { return primitiveType() == CSS_CALC_PERCENTAGE_WITH_NUMBER; }
    160155    bool isCalculatedPercentageWithLength() const { return primitiveType() == CSS_CALC_PERCENTAGE_WITH_LENGTH; }
    161     bool isViewportRelativeLength() const { return m_primitiveUnitType >= CSS_VW && m_primitiveUnitType <= CSS_VMIN; }
    162156
    163157    static PassRefPtr<CSSPrimitiveValue> createIdentifier(int identifier) { return adoptRef(new CSSPrimitiveValue(identifier)); }
     
    274268
    275269    void addSubresourceStyleURLs(ListHashSet<KURL>&, const CSSStyleSheet*);
    276 
    277     Length viewportRelativeLength();
    278270
    279271protected:
  • trunk/Source/WebCore/css/CSSPrimitiveValue.idl

    r109656 r109785  
    4949        const unsigned short CSS_RECT       = 24;
    5050        const unsigned short CSS_RGBCOLOR   = 25;
    51         const unsigned short CSS_VW         = 26;
    52         const unsigned short CSS_VH         = 27;
    53         const unsigned short CSS_VMIN       = 28;
    54        
     51
    5552        readonly attribute unsigned short primitiveType;
    5653
  • trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp

    r109699 r109785  
    390390            } else if (primitiveValue->isPercentage())
    391391                setValue(selector->style(), Length(primitiveValue->getDoubleValue(), Percent));
    392             else if (primitiveValue->isViewportRelativeLength())
    393                 setValue(selector->style(), primitiveValue->viewportRelativeLength());
    394392        }
    395393    }
     
    443441        if (pair->first()->isPercentage())
    444442            radiusWidth = Length(pair->first()->getDoubleValue(), Percent);
    445         else if (pair->first()->isViewportRelativeLength())
    446             radiusWidth = pair->first()->viewportRelativeLength();
    447443        else if (pair->first()->isCalculatedPercentageWithLength()) {
    448444            // FIXME calc(): http://webkit.org/b/16662
     
    453449        if (pair->second()->isPercentage())
    454450            radiusHeight = Length(pair->second()->getDoubleValue(), Percent);
    455         else if (pair->second()->isViewportRelativeLength())
    456             radiusHeight = pair->second()->viewportRelativeLength();
    457451        else if (pair->second()->isCalculatedPercentageWithLength()) {
    458452            // FIXME calc(): http://webkit.org/b/16662
     
    743737            else if (primitiveValue->isPercentage())
    744738                size = (primitiveValue->getFloatValue() * parentSize) / 100.0f;
    745             else if (primitiveValue->isViewportRelativeLength())
    746                 size = primitiveValue->viewportRelativeLength().calcValue(0, selector->document()->viewportSize());
    747739            else
    748740                return;
     
    11781170            // FIXME: number and percentage values should produce the same type of Length (ie. Fixed or Percent).
    11791171            lineHeight = Length(primitiveValue->getDoubleValue() * 100.0, Percent);
    1180         } else if (primitiveValue->isViewportRelativeLength()) {
    1181             lineHeight = primitiveValue->viewportRelativeLength();
    11821172        } else
    11831173            return;
     
    15381528        else if (primitiveValue->isPercentage())
    15391529            length = Length(primitiveValue->getDoubleValue(), Percent);
    1540         else if (primitiveValue->isViewportRelativeLength())
    1541             length = primitiveValue->viewportRelativeLength();
    15421530
    15431531        selector->style()->setVerticalAlignLength(length);
  • trunk/Source/WebCore/css/CSSStyleSelector.cpp

    r109709 r109785  
    25412541        else if (primitiveValue->isNumber())
    25422542            l = Length(primitiveValue->getDoubleValue() * 100.0, Percent);
    2543         else if (primitiveValue->isViewportRelativeLength())
    2544             l = primitiveValue->viewportRelativeLength();
    25452543        else if (ok)
    25462544            *ok = false;
     
    29512949    if (primitiveValue->isPercentage()) {
    29522950        length = Length(primitiveValue->getDoubleValue(), Percent);
    2953         return true;
    2954     }
    2955 
    2956     if (primitiveValue->isViewportRelativeLength()) {
    2957         length = primitiveValue->viewportRelativeLength();
    29582951        return true;
    29592952    }
     
    42554248    else if (first->isPercentage())
    42564249        firstLength = Length(first->getDoubleValue(), Percent);
    4257     else if (first->isViewportRelativeLength())
    4258         firstLength = first->viewportRelativeLength();
    42594250    else
    42604251        return;
     
    42664257    else if (second->isPercentage())
    42674258        secondLength = Length(second->getDoubleValue(), Percent);
    4268     else if (second->isViewportRelativeLength())
    4269         secondLength = second->viewportRelativeLength();
    42704259    else
    42714260        return;
     
    42944283    else if (primitiveValue->isPercentage())
    42954284        l = Length(primitiveValue->getDoubleValue(), Percent);
    4296     else if (primitiveValue->isViewportRelativeLength())
    4297         l = primitiveValue->viewportRelativeLength();
    42984285    else
    42994286        return;
     
    43194306    else if (primitiveValue->isPercentage())
    43204307        l = Length(primitiveValue->getDoubleValue(), Percent);
    4321     else if (primitiveValue->isViewportRelativeLength())
    4322         l = primitiveValue->viewportRelativeLength();
    43234308    else
    43244309        return;
  • trunk/Source/WebCore/dom/Document.cpp

    r109761 r109785  
    17641764{
    17651765    RefPtr<RenderStyle> style = styleForPage(pageIndex);
    1766     IntSize viewSize = viewportSize();
    17671766
    17681767    int width = pageSize.width();
     
    17831782        ASSERT(size.width().isFixed());
    17841783        ASSERT(size.height().isFixed());
    1785         width = size.width().calcValue(0, viewSize);
    1786         height = size.height().calcValue(0, viewSize);
     1784        width = size.width().calcValue(0);
     1785        height = size.height().calcValue(0);
    17871786        break;
    17881787    }
     
    17941793    // The percentage is calculated with respect to the width even for margin top and bottom.
    17951794    // http://www.w3.org/TR/CSS2/box.html#margin-properties
    1796 
    1797     marginTop = style->marginTop().isAuto() ? marginTop : style->marginTop().calcValue(width, viewSize);
    1798     marginRight = style->marginRight().isAuto() ? marginRight : style->marginRight().calcValue(width, viewSize);
    1799     marginBottom = style->marginBottom().isAuto() ? marginBottom : style->marginBottom().calcValue(width, viewSize);
    1800     marginLeft = style->marginLeft().isAuto() ? marginLeft : style->marginLeft().calcValue(width, viewSize);
     1795    marginTop = style->marginTop().isAuto() ? marginTop : style->marginTop().calcValue(width);
     1796    marginRight = style->marginRight().isAuto() ? marginRight : style->marginRight().calcValue(width);
     1797    marginBottom = style->marginBottom().isAuto() ? marginBottom : style->marginBottom().calcValue(width);
     1798    marginLeft = style->marginLeft().isAuto() ? marginLeft : style->marginLeft().calcValue(width);
    18011799}
    18021800
     
    54575455#endif
    54585456
    5459 IntSize Document::viewportSize() const
    5460 {
    5461     if (!view())
    5462         return IntSize();
    5463     return view()->visibleContentRect().size();
    5464 }
    5465 
    54665457} // namespace WebCore
  • trunk/Source/WebCore/dom/Document.h

    r109761 r109785  
    11241124    void resumeScheduledTasks();
    11251125
    1126     IntSize viewportSize() const;
    1127 
    11281126protected:
    11291127    Document(Frame*, const KURL&, bool isXHTML, bool isHTML);
  • trunk/Source/WebCore/html/HTMLAreaElement.cpp

    r109656 r109785  
    144144
    145145    Path path;
    146     IntSize viewportSize = document()->viewportSize();
    147146    switch (shape) {
    148147        case Poly:
    149148            if (m_coordsLen >= 6) {
    150149                int numPoints = m_coordsLen / 2;
    151                 path.moveTo(FloatPoint(m_coords[0].calcMinValue(width, viewportSize), m_coords[1].calcMinValue(height, viewportSize)));
     150                path.moveTo(FloatPoint(m_coords[0].calcMinValue(width), m_coords[1].calcMinValue(height)));
    152151                for (int i = 1; i < numPoints; ++i)
    153                     path.addLineTo(FloatPoint(m_coords[i * 2].calcMinValue(width, viewportSize), m_coords[i * 2 + 1].calcMinValue(height, viewportSize)));
     152                    path.addLineTo(FloatPoint(m_coords[i * 2].calcMinValue(width), m_coords[i * 2 + 1].calcMinValue(height)));
    154153                path.closeSubpath();
    155154            }
     
    158157            if (m_coordsLen >= 3) {
    159158                Length radius = m_coords[2];
    160                 int r = min(radius.calcMinValue(width, viewportSize), radius.calcMinValue(height, viewportSize));
    161                 path.addEllipse(FloatRect(m_coords[0].calcMinValue(width, viewportSize) - r, m_coords[1].calcMinValue(height, viewportSize) - r, 2 * r, 2 * r));
     159                int r = min(radius.calcMinValue(width), radius.calcMinValue(height));
     160                path.addEllipse(FloatRect(m_coords[0].calcMinValue(width) - r, m_coords[1].calcMinValue(height) - r, 2 * r, 2 * r));
    162161            }
    163162            break;
    164163        case Rect:
    165164            if (m_coordsLen >= 4) {
    166                 int x0 = m_coords[0].calcMinValue(width, viewportSize);
    167                 int y0 = m_coords[1].calcMinValue(height, viewportSize);
    168                 int x1 = m_coords[2].calcMinValue(width, viewportSize);
    169                 int y1 = m_coords[3].calcMinValue(height, viewportSize);
     165                int x0 = m_coords[0].calcMinValue(width);
     166                int y0 = m_coords[1].calcMinValue(height);
     167                int x1 = m_coords[2].calcMinValue(width);
     168                int y1 = m_coords[3].calcMinValue(height);
    170169                path.addRect(FloatRect(x0, y0, x1 - x0, y1 - y0));
    171170            }
  • trunk/Source/WebCore/platform/Length.h

    r109656 r109785  
    2424
    2525#include "AnimationUtilities.h"
    26 #include "IntSize.h"
    2726#include <wtf/Assertions.h>
    2827#include <wtf/FastAllocBase.h>
     
    3635const int intMinForLength = (-0x7ffffff - 1); // min value for a 28-bit int
    3736
    38 enum LengthType { Auto, Relative, Percent, Fixed, Intrinsic, MinIntrinsic, ViewportRelativeWidth, ViewportRelativeHeight, ViewportRelativeMin, Undefined };
     37enum LengthType { Auto, Relative, Percent, Fixed, Intrinsic, MinIntrinsic, Undefined };
    3938
    4039struct Length {
     
    125124    // Note: May only be called for Fixed, Percent and Auto lengths.
    126125    // Other types will ASSERT in order to catch invalid length calculations.
    127     int calcValue(int maxValue, IntSize viewportSize = IntSize(), bool roundPercentages = false) const
     126    int calcValue(int maxValue, bool roundPercentages = false) const
    128127    {
    129128        switch (type()) {
    130129            case Fixed:
    131130            case Percent:
    132                 return calcMinValue(maxValue, viewportSize, roundPercentages);
     131                return calcMinValue(maxValue, roundPercentages);
    133132            case Auto:
    134133                return maxValue;
    135             case ViewportRelativeWidth:
    136             case ViewportRelativeHeight:
    137             case ViewportRelativeMin:
    138                 return calcMinValue(maxValue, viewportSize, roundPercentages);           
    139134            case Relative:
    140135            case Intrinsic:
     
    148143    }
    149144
    150     int calcMinValue(int maxValue, IntSize viewportSize = IntSize(), bool roundPercentages = false) const
     145    int calcMinValue(int maxValue, bool roundPercentages = false) const
    151146    {
    152147        switch (type()) {
     
    160155            case Auto:
    161156                return 0;
    162             case ViewportRelativeWidth:
    163                 return static_cast<int>(viewportSize.width() * viewportRelativeLength() / 100.0f);
    164             case ViewportRelativeHeight:
    165                 return static_cast<int>(viewportSize.height() * viewportRelativeLength() / 100.0f);
    166             case ViewportRelativeMin:
    167                 return static_cast<int>(std::min(viewportSize.width(), viewportSize.height()) * viewportRelativeLength() / 100.0f);
    168157            case Relative:
    169158            case Intrinsic:
     
    177166    }
    178167
    179     float calcFloatValue(int maxValue, IntSize viewportSize = IntSize()) const
     168    float calcFloatValue(int maxValue) const
    180169    {
    181170        switch (type()) {
     
    186175            case Auto:
    187176                return static_cast<float>(maxValue);
    188             case ViewportRelativeWidth:
    189                 return static_cast<float>(viewportSize.width() * viewportRelativeLength() / 100.0f);
    190             case ViewportRelativeHeight:
    191                 return static_cast<float>(viewportSize.height() * viewportRelativeLength() / 100.0f);
    192             case ViewportRelativeMin:
    193                 return static_cast<float>(std::min(viewportSize.width(), viewportSize.height()) * viewportRelativeLength() / 100.0f);
    194177            case Relative:
    195178            case Intrinsic:
     
    243226        return Length(WebCore::blend(fromValue, toValue, progress), resultType);
    244227    }
    245    
    246     bool isViewportRelative() const { return type() >= ViewportRelativeWidth && type() <= ViewportRelativeMin; }
    247     float viewportRelativeLength() const
    248     {
    249         ASSERT(isViewportRelative());
    250         return getFloatValue();
    251     }
    252228
    253229private:
  • trunk/Source/WebCore/rendering/RenderBR.cpp

    r109656 r109785  
    4444        RenderStyle* s = style(firstLine);
    4545        if (s != style())
    46             return s->computedLineHeight(viewportSize());
     46            return s->computedLineHeight();
    4747    }
    4848   
    4949    if (m_lineHeight == -1)
    50         m_lineHeight = style()->computedLineHeight(viewportSize());
     50        m_lineHeight = style()->computedLineHeight();
    5151   
    5252    return m_lineHeight;
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r109688 r109785  
    57955795        RenderStyle* s = style(firstLine);
    57965796        if (s != style())
    5797             return s->computedLineHeight(viewportSize());
     5797            return s->computedLineHeight();
    57985798    }
    57995799   
    58005800    if (m_lineHeight == -1)
    5801         m_lineHeight = style()->computedLineHeight(viewportSize());
     5801        m_lineHeight = style()->computedLineHeight();
    58025802
    58035803    return m_lineHeight;
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r109656 r109785  
    616616    if (!style()->boxReflect())
    617617        return 0;
    618     IntSize viewSize = viewportSize();
    619618    if (style()->boxReflect()->direction() == ReflectionLeft || style()->boxReflect()->direction() == ReflectionRight)
    620         return style()->boxReflect()->offset().calcValue(borderBoxRect().width(), viewSize);
    621     return style()->boxReflect()->offset().calcValue(borderBoxRect().height(), viewSize);
     619        return style()->boxReflect()->offset().calcValue(borderBoxRect().width());
     620    return style()->boxReflect()->offset().calcValue(borderBoxRect().height());
    622621}
    623622
     
    946945        // into a transparency layer, and then clip that in one go (which requires setting up the clip before
    947946        // beginning the layer).
    948         RoundedRect border = style()->getRoundedBorderFor(paintRect, viewportSize());
     947        RoundedRect border = style()->getRoundedBorderFor(paintRect);
    949948        stateSaver.save();
    950949        paintInfo.context->addRoundedRectClip(border);
     
    12471246    LayoutRect borderBoxRect = borderBoxRectInRegion(region);
    12481247    LayoutRect clipRect = LayoutRect(borderBoxRect.location() + location, borderBoxRect.size());
    1249     IntSize viewSize = viewportSize();
    12501248
    12511249    if (!style()->clipLeft().isAuto()) {
    1252         LayoutUnit c = style()->clipLeft().calcValue(borderBoxRect.width(), viewSize);
     1250        LayoutUnit c = style()->clipLeft().calcValue(borderBoxRect.width());
    12531251        clipRect.move(c, 0);
    12541252        clipRect.contract(c, 0);
     
    12591257
    12601258    if (!style()->clipRight().isAuto())
    1261         clipRect.contract(width() - style()->clipRight().calcValue(width(), viewSize), 0);
     1259        clipRect.contract(width() - style()->clipRight().calcValue(width()), 0);
    12621260
    12631261    if (!style()->clipTop().isAuto()) {
    1264         LayoutUnit c = style()->clipTop().calcValue(borderBoxRect.height(), viewSize);
     1262        LayoutUnit c = style()->clipTop().calcValue(borderBoxRect.height());
    12651263        clipRect.move(0, c);
    12661264        clipRect.contract(0, c);
     
    12681266
    12691267    if (!style()->clipBottom().isAuto())
    1270         clipRect.contract(0, height() - style()->clipBottom().calcValue(height(), viewSize));
     1268        clipRect.contract(0, height() - style()->clipBottom().calcValue(height()));
    12711269
    12721270    return clipRect;
     
    17231721    bool stretching = (parent()->style()->boxAlign() == BSTRETCH);
    17241722    bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inVerticalBox || !stretching);
    1725     IntSize viewSize = viewportSize();
    17261723
    17271724    RenderStyle* styleToUse = style();
     
    17371734    if (isInline() && !isInlineBlockOrInlineTable()) {
    17381735        // just calculate margins
    1739         setMarginStart(styleToUse->marginStart().calcMinValue(containerLogicalWidth, viewSize));
    1740         setMarginEnd(styleToUse->marginEnd().calcMinValue(containerLogicalWidth, viewSize));
     1736        setMarginStart(styleToUse->marginStart().calcMinValue(containerLogicalWidth));
     1737        setMarginEnd(styleToUse->marginEnd().calcMinValue(containerLogicalWidth));
    17411738        if (treatAsReplaced)
    17421739            setLogicalWidth(max<LayoutUnit>(logicalWidthLength.calcFloatValue(0) + borderAndPaddingLogicalWidth(), minPreferredLogicalWidth()));
     
    17761773    // Margin calculations.
    17771774    if (logicalWidthLength.isAuto() || hasPerpendicularContainingBlock) {
    1778         setMarginStart(styleToUse->marginStart().calcMinValue(containerLogicalWidth, viewSize));
    1779         setMarginEnd(styleToUse->marginEnd().calcMinValue(containerLogicalWidth, viewSize));
     1775        setMarginStart(styleToUse->marginStart().calcMinValue(containerLogicalWidth));
     1776        setMarginEnd(styleToUse->marginEnd().calcMinValue(containerLogicalWidth));
    17801777    } else
    17811778        computeInlineDirectionMargins(cb, containerLogicalWidth, logicalWidth());
     
    18001797
    18011798    if (logicalWidth.isIntrinsicOrAuto()) {
    1802         IntSize viewSize = viewportSize();
    1803         LayoutUnit marginStart = styleToUse->marginStart().calcMinValue(availableLogicalWidth, viewSize);
    1804         LayoutUnit marginEnd = styleToUse->marginEnd().calcMinValue(availableLogicalWidth, viewSize);
     1799        LayoutUnit marginStart = styleToUse->marginStart().calcMinValue(availableLogicalWidth);
     1800        LayoutUnit marginEnd = styleToUse->marginEnd().calcMinValue(availableLogicalWidth);
    18051801        logicalWidthResult = availableLogicalWidth - marginStart - marginEnd;
    18061802
     
    18131809        }
    18141810    } else // FIXME: If the containing block flow is perpendicular to our direction we need to use the available logical height instead.
    1815         logicalWidthResult = computeBorderBoxLogicalWidth(logicalWidth.calcValue(availableLogicalWidth, viewportSize()));
     1811        logicalWidthResult = computeBorderBoxLogicalWidth(logicalWidth.calcValue(availableLogicalWidth));
    18161812
    18171813    return logicalWidthResult;
     
    18801876    Length marginStartLength = style()->marginStartUsing(containingBlockStyle);
    18811877    Length marginEndLength = style()->marginEndUsing(containingBlockStyle);
    1882     IntSize viewSize = viewportSize();
    18831878
    18841879    if (isFloating() || isInline()) {
    18851880        // Inline blocks/tables and floats don't have their margins increased.
    1886         containingBlock->setMarginStartForChild(this, marginStartLength.calcMinValue(containerWidth, viewSize));
    1887         containingBlock->setMarginEndForChild(this, marginEndLength.calcMinValue(containerWidth, viewSize));
     1881        containingBlock->setMarginStartForChild(this, marginStartLength.calcMinValue(containerWidth));
     1882        containingBlock->setMarginEndForChild(this, marginEndLength.calcMinValue(containerWidth));
    18881883        return;
    18891884    }
     
    18991894    // Case Two: The object is being pushed to the start of the containing block's available logical width.
    19001895    if (marginEndLength.isAuto() && childWidth < containerWidth) {
    1901         containingBlock->setMarginStartForChild(this, marginStartLength.calcValue(containerWidth, viewSize));
     1896        containingBlock->setMarginStartForChild(this, marginStartLength.calcValue(containerWidth));
    19021897        containingBlock->setMarginEndForChild(this, containerWidth - childWidth - containingBlock->marginStartForChild(this));
    19031898        return;
     
    19081903        || (containingBlockStyle->isLeftToRightDirection() && containingBlockStyle->textAlign() == WEBKIT_RIGHT));
    19091904    if ((marginStartLength.isAuto() && childWidth < containerWidth) || pushToEndFromTextAlign) {
    1910         containingBlock->setMarginEndForChild(this, marginEndLength.calcValue(containerWidth, viewSize));
     1905        containingBlock->setMarginEndForChild(this, marginEndLength.calcValue(containerWidth));
    19111906        containingBlock->setMarginStartForChild(this, containerWidth - childWidth - containingBlock->marginEndForChild(this));
    19121907        return;
     
    19151910    // Case Four: Either no auto margins, or our width is >= the container width (css2.1, 10.3.3).  In that case
    19161911    // auto margins will just turn into 0.
    1917     containingBlock->setMarginStartForChild(this, marginStartLength.calcMinValue(containerWidth, viewSize));
    1918     containingBlock->setMarginEndForChild(this, marginEndLength.calcMinValue(containerWidth, viewSize));
     1912    containingBlock->setMarginStartForChild(this, marginStartLength.calcMinValue(containerWidth));
     1913    containingBlock->setMarginEndForChild(this, marginEndLength.calcMinValue(containerWidth));
    19191914}
    19201915
     
    21192114        else if (h.isPercent())
    21202115            logicalHeight = computePercentageLogicalHeight(h);
    2121         else if (h.isViewportRelative())
    2122             logicalHeight = h.calcValue(0, viewportSize());
    2123 
    21242116        if (logicalHeight != -1) {
    21252117            logicalHeight = computeBorderBoxLogicalHeight(logicalHeight);
     
    22032195
    22042196    if (result != -1) {
    2205         result = height.calcValue(result, viewportSize());
     2197        result = height.calcValue(result);
    22062198        if (includeBorderPadding) {
    22072199            // It is necessary to use the border-box to match WinIE's broken
     
    22602252LayoutUnit RenderBox::computeReplacedLogicalHeightUsing(Length logicalHeight) const
    22612253{
    2262     IntSize viewSize = viewportSize();
    22632254    switch (logicalHeight.type()) {
    22642255        case Fixed:
     
    22812272                LayoutUnit newHeight = block->computeContentBoxLogicalHeight(block->contentHeight());
    22822273                block->setHeight(oldHeight);
    2283                 return computeContentBoxLogicalHeight(logicalHeight.calcValue(newHeight, viewSize));
     2274                return computeContentBoxLogicalHeight(logicalHeight.calcValue(newHeight));
    22842275            }
    22852276           
     
    23022293                        // <http://bugs.webkit.org/show_bug.cgi?id=15359>
    23032294                        availableHeight = max(availableHeight, intrinsicLogicalHeight());
    2304                         return logicalHeight.calcValue(availableHeight - borderAndPaddingLogicalHeight(), viewSize);
     2295                        return logicalHeight.calcValue(availableHeight - borderAndPaddingLogicalHeight());
    23052296                    }
    23062297                    cb = cb->containingBlock();
    23072298                }
    23082299            }
    2309             return computeContentBoxLogicalHeight(logicalHeight.calcValue(availableHeight, viewSize));
     2300            return computeContentBoxLogicalHeight(logicalHeight.calcValue(availableHeight));
    23102301        }
    23112302        default:
     
    23722363    // the containing block (8.3)
    23732364    LayoutUnit cw = containingBlockLogicalWidthForContent();
    2374     IntSize viewSize = viewportSize();
    23752365
    23762366    RenderStyle* containingBlockStyle = containingBlock->style();
    2377     containingBlock->setMarginBeforeForChild(this, style()->marginBeforeUsing(containingBlockStyle).calcMinValue(cw, viewSize));
    2378     containingBlock->setMarginAfterForChild(this, style()->marginAfterUsing(containingBlockStyle).calcMinValue(cw, viewSize));
     2367    containingBlock->setMarginBeforeForChild(this, style()->marginBeforeUsing(containingBlockStyle).calcMinValue(cw));
     2368    containingBlock->setMarginAfterForChild(this, style()->marginAfterUsing(containingBlockStyle).calcMinValue(cw));
    23792369}
    23802370
     
    26992689    bool logicalLeftIsAuto = logicalLeft.isAuto();
    27002690    bool logicalRightIsAuto = logicalRight.isAuto();
    2701     IntSize viewSize = viewportSize();
    27022691
    27032692    if (!logicalLeftIsAuto && !logicalWidthIsAuto && !logicalRightIsAuto) {
     
    27172706        // case because the value is not used for any further calculations.
    27182707
    2719         logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth, viewSize);
    2720         logicalWidthValue = computeContentBoxLogicalWidth(logicalWidth.calcValue(containerLogicalWidth, viewSize));
    2721 
    2722         const LayoutUnit availableSpace = containerLogicalWidth - (logicalLeftValue + logicalWidthValue + logicalRight.calcValue(containerLogicalWidth, viewSize) + bordersPlusPadding);
     2708        logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth);
     2709        logicalWidthValue = computeContentBoxLogicalWidth(logicalWidth.calcValue(containerLogicalWidth));
     2710
     2711        const LayoutUnit availableSpace = containerLogicalWidth - (logicalLeftValue + logicalWidthValue + logicalRight.calcValue(containerLogicalWidth) + bordersPlusPadding);
    27232712
    27242713        // Margins are now the only unknown
     
    27412730        } else if (marginLogicalLeft.isAuto()) {
    27422731            // Solve for left margin
    2743             marginLogicalRightValue = marginLogicalRight.calcValue(containerLogicalWidth, viewSize);
     2732            marginLogicalRightValue = marginLogicalRight.calcValue(containerLogicalWidth);
    27442733            marginLogicalLeftValue = availableSpace - marginLogicalRightValue;
    27452734        } else if (marginLogicalRight.isAuto()) {
    27462735            // Solve for right margin
    2747             marginLogicalLeftValue = marginLogicalLeft.calcValue(containerLogicalWidth, viewSize);
     2736            marginLogicalLeftValue = marginLogicalLeft.calcValue(containerLogicalWidth);
    27482737            marginLogicalRightValue = availableSpace - marginLogicalLeftValue;
    27492738        } else {
    27502739            // Over-constrained, solve for left if direction is RTL
    2751             marginLogicalLeftValue = marginLogicalLeft.calcValue(containerLogicalWidth, viewSize);
    2752             marginLogicalRightValue = marginLogicalRight.calcValue(containerLogicalWidth, viewSize);
     2740            marginLogicalLeftValue = marginLogicalLeft.calcValue(containerLogicalWidth);
     2741            marginLogicalRightValue = marginLogicalRight.calcValue(containerLogicalWidth);
    27532742
    27542743            // Use the containing block's direction rather than the parent block's
     
    28002789
    28012790        // Calculate margins, 'auto' margins are ignored.
    2802         marginLogicalLeftValue = marginLogicalLeft.calcMinValue(containerLogicalWidth, viewSize);
    2803         marginLogicalRightValue = marginLogicalRight.calcMinValue(containerLogicalWidth, viewSize);
     2791        marginLogicalLeftValue = marginLogicalLeft.calcMinValue(containerLogicalWidth);
     2792        marginLogicalRightValue = marginLogicalRight.calcMinValue(containerLogicalWidth);
    28042793
    28052794        const LayoutUnit availableSpace = containerLogicalWidth - (marginLogicalLeftValue + marginLogicalRightValue + bordersPlusPadding);
     
    28092798        if (logicalLeftIsAuto && logicalWidthIsAuto && !logicalRightIsAuto) {
    28102799            // RULE 1: (use shrink-to-fit for width, and solve of left)
    2811             LayoutUnit logicalRightValue = logicalRight.calcValue(containerLogicalWidth, viewSize);
     2800            LayoutUnit logicalRightValue = logicalRight.calcValue(containerLogicalWidth);
    28122801
    28132802            // FIXME: would it be better to have shrink-to-fit in one step?
     
    28192808        } else if (!logicalLeftIsAuto && logicalWidthIsAuto && logicalRightIsAuto) {
    28202809            // RULE 3: (use shrink-to-fit for width, and no need solve of right)
    2821             logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth, viewSize);
     2810            logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth);
    28222811
    28232812            // FIXME: would it be better to have shrink-to-fit in one step?
     
    28282817        } else if (logicalLeftIsAuto && !logicalWidthIsAuto && !logicalRightIsAuto) {
    28292818            // RULE 4: (solve for left)
    2830             logicalWidthValue = computeContentBoxLogicalWidth(logicalWidth.calcValue(containerLogicalWidth, viewSize));
    2831             logicalLeftValue = availableSpace - (logicalWidthValue + logicalRight.calcValue(containerLogicalWidth, viewSize));
     2819            logicalWidthValue = computeContentBoxLogicalWidth(logicalWidth.calcValue(containerLogicalWidth));
     2820            logicalLeftValue = availableSpace - (logicalWidthValue + logicalRight.calcValue(containerLogicalWidth));
    28322821        } else if (!logicalLeftIsAuto && logicalWidthIsAuto && !logicalRightIsAuto) {
    28332822            // RULE 5: (solve for width)
    2834             logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth, viewSize);
    2835             logicalWidthValue = availableSpace - (logicalLeftValue + logicalRight.calcValue(containerLogicalWidth, viewSize));
     2823            logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth);
     2824            logicalWidthValue = availableSpace - (logicalLeftValue + logicalRight.calcValue(containerLogicalWidth));
    28362825        } else if (!logicalLeftIsAuto && !logicalWidthIsAuto && logicalRightIsAuto) {
    28372826            // RULE 6: (no need solve for right)
    2838             logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth, viewSize);
    2839             logicalWidthValue = computeContentBoxLogicalWidth(logicalWidth.calcValue(containerLogicalWidth, viewSize));
     2827            logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth);
     2828            logicalWidthValue = computeContentBoxLogicalWidth(logicalWidth.calcValue(containerLogicalWidth));
    28402829        }
    28412830    }
     
    30333022    bool logicalTopIsAuto = logicalTop.isAuto();
    30343023    bool logicalBottomIsAuto = logicalBottom.isAuto();
    3035     IntSize viewSize = viewportSize();
    30363024
    30373025    // Height is never unsolved for tables.
     
    30533041        // case because the value is not used for any further calculations.
    30543042
    3055         logicalHeightValue = computeContentBoxLogicalHeight(logicalHeightLength.calcValue(containerLogicalHeight, viewSize));
    3056         logicalTopValue = logicalTop.calcValue(containerLogicalHeight, viewSize);
    3057 
    3058         const LayoutUnit availableSpace = containerLogicalHeight - (logicalTopValue + logicalHeightValue + logicalBottom.calcValue(containerLogicalHeight, viewSize) + bordersPlusPadding);
     3043        logicalHeightValue = computeContentBoxLogicalHeight(logicalHeightLength.calcValue(containerLogicalHeight));
     3044        logicalTopValue = logicalTop.calcValue(containerLogicalHeight);
     3045
     3046        const LayoutUnit availableSpace = containerLogicalHeight - (logicalTopValue + logicalHeightValue + logicalBottom.calcValue(containerLogicalHeight) + bordersPlusPadding);
    30593047
    30603048        // Margins are now the only unknown
     
    30663054        } else if (marginBefore.isAuto()) {
    30673055            // Solve for top margin
    3068             marginAfterValue = marginAfter.calcValue(containerLogicalHeight, viewSize);
     3056            marginAfterValue = marginAfter.calcValue(containerLogicalHeight);
    30693057            marginBeforeValue = availableSpace - marginAfterValue;
    30703058        } else if (marginAfter.isAuto()) {
    30713059            // Solve for bottom margin
    3072             marginBeforeValue = marginBefore.calcValue(containerLogicalHeight, viewSize);
     3060            marginBeforeValue = marginBefore.calcValue(containerLogicalHeight);
    30733061            marginAfterValue = availableSpace - marginBeforeValue;
    30743062        } else {
    30753063            // Over-constrained, (no need solve for bottom)
    3076             marginBeforeValue = marginBefore.calcValue(containerLogicalHeight, viewSize);
    3077             marginAfterValue = marginAfter.calcValue(containerLogicalHeight, viewSize);
     3064            marginBeforeValue = marginBefore.calcValue(containerLogicalHeight);
     3065            marginAfterValue = marginAfter.calcValue(containerLogicalHeight);
    30783066        }
    30793067    } else {
     
    31043092
    31053093        // Calculate margins, 'auto' margins are ignored.
    3106         marginBeforeValue = marginBefore.calcMinValue(containerLogicalHeight, viewSize);
    3107         marginAfterValue = marginAfter.calcMinValue(containerLogicalHeight, viewSize);
     3094        marginBeforeValue = marginBefore.calcMinValue(containerLogicalHeight);
     3095        marginAfterValue = marginAfter.calcMinValue(containerLogicalHeight);
    31083096
    31093097        const LayoutUnit availableSpace = containerLogicalHeight - (marginBeforeValue + marginAfterValue + bordersPlusPadding);
     
    31133101            // RULE 1: (height is content based, solve of top)
    31143102            logicalHeightValue = contentLogicalHeight;
    3115             logicalTopValue = availableSpace - (logicalHeightValue + logicalBottom.calcValue(containerLogicalHeight, viewSize));
     3103            logicalTopValue = availableSpace - (logicalHeightValue + logicalBottom.calcValue(containerLogicalHeight));
    31163104        } else if (!logicalTopIsAuto && logicalHeightIsAuto && logicalBottomIsAuto) {
    31173105            // RULE 3: (height is content based, no need solve of bottom)
    3118             logicalTopValue = logicalTop.calcValue(containerLogicalHeight, viewSize);
     3106            logicalTopValue = logicalTop.calcValue(containerLogicalHeight);
    31193107            logicalHeightValue = contentLogicalHeight;
    31203108        } else if (logicalTopIsAuto && !logicalHeightIsAuto && !logicalBottomIsAuto) {
    31213109            // RULE 4: (solve of top)
    3122             logicalHeightValue = computeContentBoxLogicalHeight(logicalHeightLength.calcValue(containerLogicalHeight, viewSize));
    3123             logicalTopValue = availableSpace - (logicalHeightValue + logicalBottom.calcValue(containerLogicalHeight, viewSize));
     3110            logicalHeightValue = computeContentBoxLogicalHeight(logicalHeightLength.calcValue(containerLogicalHeight));
     3111            logicalTopValue = availableSpace - (logicalHeightValue + logicalBottom.calcValue(containerLogicalHeight));
    31243112        } else if (!logicalTopIsAuto && logicalHeightIsAuto && !logicalBottomIsAuto) {
    31253113            // RULE 5: (solve of height)
    3126             logicalTopValue = logicalTop.calcValue(containerLogicalHeight, viewSize);
    3127             logicalHeightValue = max<LayoutUnit>(0, availableSpace - (logicalTopValue + logicalBottom.calcValue(containerLogicalHeight, viewSize)));
     3114            logicalTopValue = logicalTop.calcValue(containerLogicalHeight);
     3115            logicalHeightValue = max<LayoutUnit>(0, availableSpace - (logicalTopValue + logicalBottom.calcValue(containerLogicalHeight)));
    31283116        } else if (!logicalTopIsAuto && !logicalHeightIsAuto && logicalBottomIsAuto) {
    31293117            // RULE 6: (no need solve of bottom)
    3130             logicalHeightValue = computeContentBoxLogicalHeight(logicalHeightLength.calcValue(containerLogicalHeight, viewSize));
    3131             logicalTopValue = logicalTop.calcValue(containerLogicalHeight, viewSize);
     3118            logicalHeightValue = computeContentBoxLogicalHeight(logicalHeightLength.calcValue(containerLogicalHeight));
     3119            logicalTopValue = logicalTop.calcValue(containerLogicalHeight);
    31323120        }
    31333121    }
     
    32053193    LayoutUnit logicalLeftValue = 0;
    32063194    LayoutUnit logicalRightValue = 0;
    3207     IntSize viewSize = viewportSize();
    32083195
    32093196    if (marginLogicalLeft.isAuto() && marginLogicalRight.isAuto()) {
     
    32113198        ASSERT(!(logicalLeft.isAuto() && logicalRight.isAuto()));
    32123199
    3213         logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth, viewSize);
    3214         logicalRightValue = logicalRight.calcValue(containerLogicalWidth, viewSize);
     3200        logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth);
     3201        logicalRightValue = logicalRight.calcValue(containerLogicalWidth);
    32153202
    32163203        LayoutUnit difference = availableSpace - (logicalLeftValue + logicalRightValue);
     
    32353222    \*-----------------------------------------------------------------------*/
    32363223    } else if (logicalLeft.isAuto()) {
    3237         marginLogicalLeftAlias = marginLogicalLeft.calcValue(containerLogicalWidth, viewSize);
    3238         marginLogicalRightAlias = marginLogicalRight.calcValue(containerLogicalWidth, viewSize);
    3239         logicalRightValue = logicalRight.calcValue(containerLogicalWidth, viewSize);
     3224        marginLogicalLeftAlias = marginLogicalLeft.calcValue(containerLogicalWidth);
     3225        marginLogicalRightAlias = marginLogicalRight.calcValue(containerLogicalWidth);
     3226        logicalRightValue = logicalRight.calcValue(containerLogicalWidth);
    32403227
    32413228        // Solve for 'left'
    32423229        logicalLeftValue = availableSpace - (logicalRightValue + marginLogicalLeftAlias + marginLogicalRightAlias);
    32433230    } else if (logicalRight.isAuto()) {
    3244         marginLogicalLeftAlias = marginLogicalLeft.calcValue(containerLogicalWidth, viewSize);
    3245         marginLogicalRightAlias = marginLogicalRight.calcValue(containerLogicalWidth, viewSize);
    3246         logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth, viewSize);
     3231        marginLogicalLeftAlias = marginLogicalLeft.calcValue(containerLogicalWidth);
     3232        marginLogicalRightAlias = marginLogicalRight.calcValue(containerLogicalWidth);
     3233        logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth);
    32473234
    32483235        // Solve for 'right'
    32493236        logicalRightValue = availableSpace - (logicalLeftValue + marginLogicalLeftAlias + marginLogicalRightAlias);
    32503237    } else if (marginLogicalLeft.isAuto()) {
    3251         marginLogicalRightAlias = marginLogicalRight.calcValue(containerLogicalWidth, viewSize);
    3252         logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth, viewSize);
    3253         logicalRightValue = logicalRight.calcValue(containerLogicalWidth, viewSize);
     3238        marginLogicalRightAlias = marginLogicalRight.calcValue(containerLogicalWidth);
     3239        logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth);
     3240        logicalRightValue = logicalRight.calcValue(containerLogicalWidth);
    32543241
    32553242        // Solve for 'margin-left'
    32563243        marginLogicalLeftAlias = availableSpace - (logicalLeftValue + logicalRightValue + marginLogicalRightAlias);
    32573244    } else if (marginLogicalRight.isAuto()) {
    3258         marginLogicalLeftAlias = marginLogicalLeft.calcValue(containerLogicalWidth, viewSize);
    3259         logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth, viewSize);
    3260         logicalRightValue = logicalRight.calcValue(containerLogicalWidth, viewSize);
     3245        marginLogicalLeftAlias = marginLogicalLeft.calcValue(containerLogicalWidth);
     3246        logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth);
     3247        logicalRightValue = logicalRight.calcValue(containerLogicalWidth);
    32613248
    32623249        // Solve for 'margin-right'
     
    32643251    } else {
    32653252        // Nothing is 'auto', just calculate the values.
    3266         marginLogicalLeftAlias = marginLogicalLeft.calcValue(containerLogicalWidth, viewSize);
    3267         marginLogicalRightAlias = marginLogicalRight.calcValue(containerLogicalWidth, viewSize);
    3268         logicalRightValue = logicalRight.calcValue(containerLogicalWidth, viewSize);
    3269         logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth, viewSize);
     3253        marginLogicalLeftAlias = marginLogicalLeft.calcValue(containerLogicalWidth);
     3254        marginLogicalRightAlias = marginLogicalRight.calcValue(containerLogicalWidth);
     3255        logicalRightValue = logicalRight.calcValue(containerLogicalWidth);
     3256        logicalLeftValue = logicalLeft.calcValue(containerLogicalWidth);
    32703257        // If the containing block is right-to-left, then push the left position as far to the right as possible
    32713258        if (containerDirection == RTL) {
     
    33303317    Length logicalTop = style()->logicalTop();
    33313318    Length logicalBottom = style()->logicalBottom();
    3332     IntSize viewSize = viewportSize();
    33333319
    33343320    /*-----------------------------------------------------------------------*\
     
    33743360        ASSERT(!(logicalTop.isAuto() || logicalBottom.isAuto()));
    33753361
    3376         logicalTopValue = logicalTop.calcValue(containerLogicalHeight, viewSize);
    3377         logicalBottomValue = logicalBottom.calcValue(containerLogicalHeight, viewSize);
     3362        logicalTopValue = logicalTop.calcValue(containerLogicalHeight);
     3363        logicalBottomValue = logicalBottom.calcValue(containerLogicalHeight);
    33783364
    33793365        LayoutUnit difference = availableSpace - (logicalTopValue + logicalBottomValue);
     
    33873373    \*-----------------------------------------------------------------------*/
    33883374    } else if (logicalTop.isAuto()) {
    3389         marginBeforeAlias = marginBefore.calcValue(containerLogicalHeight, viewSize);
    3390         marginAfterAlias = marginAfter.calcValue(containerLogicalHeight, viewSize);
    3391         logicalBottomValue = logicalBottom.calcValue(containerLogicalHeight, viewSize);
     3375        marginBeforeAlias = marginBefore.calcValue(containerLogicalHeight);
     3376        marginAfterAlias = marginAfter.calcValue(containerLogicalHeight);
     3377        logicalBottomValue = logicalBottom.calcValue(containerLogicalHeight);
    33923378
    33933379        // Solve for 'top'
    33943380        logicalTopValue = availableSpace - (logicalBottomValue + marginBeforeAlias + marginAfterAlias);
    33953381    } else if (logicalBottom.isAuto()) {
    3396         marginBeforeAlias = marginBefore.calcValue(containerLogicalHeight, viewSize);
    3397         marginAfterAlias = marginAfter.calcValue(containerLogicalHeight, viewSize);
    3398         logicalTopValue = logicalTop.calcValue(containerLogicalHeight, viewSize);
     3382        marginBeforeAlias = marginBefore.calcValue(containerLogicalHeight);
     3383        marginAfterAlias = marginAfter.calcValue(containerLogicalHeight);
     3384        logicalTopValue = logicalTop.calcValue(containerLogicalHeight);
    33993385
    34003386        // Solve for 'bottom'
     
    34023388        // use the value.
    34033389    } else if (marginBefore.isAuto()) {
    3404         marginAfterAlias = marginAfter.calcValue(containerLogicalHeight, viewSize);
    3405         logicalTopValue = logicalTop.calcValue(containerLogicalHeight, viewSize);
    3406         logicalBottomValue = logicalBottom.calcValue(containerLogicalHeight, viewSize);
     3390        marginAfterAlias = marginAfter.calcValue(containerLogicalHeight);
     3391        logicalTopValue = logicalTop.calcValue(containerLogicalHeight);
     3392        logicalBottomValue = logicalBottom.calcValue(containerLogicalHeight);
    34073393
    34083394        // Solve for 'margin-top'
    34093395        marginBeforeAlias = availableSpace - (logicalTopValue + logicalBottomValue + marginAfterAlias);
    34103396    } else if (marginAfter.isAuto()) {
    3411         marginBeforeAlias = marginBefore.calcValue(containerLogicalHeight, viewSize);
    3412         logicalTopValue = logicalTop.calcValue(containerLogicalHeight, viewSize);
    3413         logicalBottomValue = logicalBottom.calcValue(containerLogicalHeight, viewSize);
     3397        marginBeforeAlias = marginBefore.calcValue(containerLogicalHeight);
     3398        logicalTopValue = logicalTop.calcValue(containerLogicalHeight);
     3399        logicalBottomValue = logicalBottom.calcValue(containerLogicalHeight);
    34143400
    34153401        // Solve for 'margin-bottom'
     
    34173403    } else {
    34183404        // Nothing is 'auto', just calculate the values.
    3419         marginBeforeAlias = marginBefore.calcValue(containerLogicalHeight, viewSize);
    3420         marginAfterAlias = marginAfter.calcValue(containerLogicalHeight, viewSize);
    3421         logicalTopValue = logicalTop.calcValue(containerLogicalHeight, viewSize);
     3405        marginBeforeAlias = marginBefore.calcValue(containerLogicalHeight);
     3406        marginAfterAlias = marginAfter.calcValue(containerLogicalHeight);
     3407        logicalTopValue = logicalTop.calcValue(containerLogicalHeight);
    34223408        // NOTE: It is not necessary to solve for 'bottom' because we don't ever
    34233409        // use the value.
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r109656 r109785  
    425425        RenderBlock* cb = containingBlock();
    426426        if (!style()->right().isAuto() && !cb->style()->isLeftToRightDirection())
    427             return -style()->right().calcValue(cb->availableWidth(), viewportSize());
    428         return offset + style()->left().calcValue(cb->availableWidth(), viewportSize());
    429 
     427            return -style()->right().calcValue(cb->availableWidth());
     428        return offset + style()->left().calcValue(cb->availableWidth());
    430429    }
    431430    if (!style()->right().isAuto()) {
    432431        RenderBlock* cb = containingBlock();
    433         return offset + -style()->right().calcValue(cb->availableWidth(), viewportSize());
     432        return offset + -style()->right().calcValue(cb->availableWidth());
    434433    }
    435434    return offset;
     
    451450            || !style()->top().isPercent()
    452451            || containingBlock->stretchesToViewport()))
    453         return offset + style()->top().calcValue(containingBlock->availableHeight(), viewportSize());
     452        return offset + style()->top().calcValue(containingBlock->availableHeight());
    454453
    455454    if (!style()->bottom().isAuto()
     
    457456            || !style()->bottom().isPercent()
    458457            || containingBlock->stretchesToViewport()))
    459         return offset + -style()->bottom().calcValue(containingBlock->availableHeight(), viewportSize());
     458        return offset + -style()->bottom().calcValue(containingBlock->availableHeight());
    460459
    461460    return offset;
     
    545544    if (padding.isPercent())
    546545        w = containingBlock()->availableLogicalWidth();
    547     return padding.calcMinValue(w, viewportSize());
     546    return padding.calcMinValue(w);
    548547}
    549548
     
    554553    if (padding.isPercent())
    555554        w = containingBlock()->availableLogicalWidth();
    556     return padding.calcMinValue(w, viewportSize());
     555    return padding.calcMinValue(w);
    557556}
    558557
     
    563562    if (padding.isPercent())
    564563        w = containingBlock()->availableLogicalWidth();
    565     return padding.calcMinValue(w, viewportSize());
     564    return padding.calcMinValue(w);
    566565}
    567566
     
    572571    if (padding.isPercent())
    573572        w = containingBlock()->availableLogicalWidth();
    574     return padding.calcMinValue(w, viewportSize());
     573    return padding.calcMinValue(w);
    575574}
    576575
     
    581580    if (padding.isPercent())
    582581        w = containingBlock()->availableLogicalWidth();
    583     return padding.calcMinValue(w, viewportSize());
     582    return padding.calcMinValue(w);
    584583}
    585584
     
    590589    if (padding.isPercent())
    591590        w = containingBlock()->availableLogicalWidth();
    592     return padding.calcMinValue(w, viewportSize());
     591    return padding.calcMinValue(w);
    593592}
    594593
     
    599598    if (padding.isPercent())
    600599        w = containingBlock()->availableLogicalWidth();
    601     return padding.calcMinValue(w, viewportSize());
     600    return padding.calcMinValue(w);
    602601}
    603602
     
    608607    if (padding.isPercent())
    609608        w = containingBlock()->availableLogicalWidth();
    610     return padding.calcMinValue(w, viewportSize());
     609    return padding.calcMinValue(w);
    611610}
    612611
     
    614613    bool includeLogicalLeftEdge, bool includeLogicalRightEdge)
    615614{
    616     IntSize viewSize = viewportSize();
    617     RoundedRect border = style()->getRoundedBorderFor(borderRect, viewSize, includeLogicalLeftEdge, includeLogicalRightEdge);
     615    RoundedRect border = style()->getRoundedBorderFor(borderRect, includeLogicalLeftEdge, includeLogicalRightEdge);
    618616    if (box && (box->nextLineBox() || box->prevLineBox())) {
    619         RoundedRect segmentBorder = style()->getRoundedBorderFor(LayoutRect(0, 0, inlineBoxWidth, inlineBoxHeight), viewSize, includeLogicalLeftEdge, includeLogicalRightEdge);
     617        RoundedRect segmentBorder = style()->getRoundedBorderFor(LayoutRect(0, 0, inlineBoxWidth, inlineBoxHeight), includeLogicalLeftEdge, includeLogicalRightEdge);
    620618        border.setRadii(segmentBorder.radii());
    621619    }
     
    989987            if (layerWidth.isFixed())
    990988                w = layerWidth.value();
    991             else if (layerWidth.isPercent() || layerHeight.isViewportRelative())
    992                 w = layerWidth.calcValue(positioningAreaSize.width(), viewportSize());
     989            else if (layerWidth.isPercent())
     990                w = layerWidth.calcValue(positioningAreaSize.width());
    993991           
    994992            if (layerHeight.isFixed())
    995993                h = layerHeight.value();
    996             else if (layerHeight.isPercent() || layerHeight.isViewportRelative())
    997                 h = layerHeight.calcValue(positioningAreaSize.height(), viewportSize());
     994            else if (layerHeight.isPercent())
     995                h = layerHeight.calcValue(positioningAreaSize.height());
    998996           
    999997            // If one of the values is auto we have to use the appropriate
     
    11281126    EFillRepeat backgroundRepeatY = fillLayer->repeatY();
    11291127
    1130     LayoutUnit xPosition = fillLayer->xPosition().calcMinValue(positioningAreaSize.width() - geometry.tileSize().width(), viewportSize(), true);
     1128    LayoutUnit xPosition = fillLayer->xPosition().calcMinValue(positioningAreaSize.width() - geometry.tileSize().width(), true);
    11311129    if (backgroundRepeatX == RepeatFill)
    11321130        geometry.setPhaseX(geometry.tileSize().width() ? layoutMod(geometry.tileSize().width() - (xPosition + left), geometry.tileSize().width()) : LayoutUnit(0));
     
    11341132        geometry.setNoRepeatX(xPosition + left);
    11351133
    1136     LayoutUnit yPosition = fillLayer->yPosition().calcMinValue(positioningAreaSize.height() - geometry.tileSize().height(), viewportSize(), true);
     1134    LayoutUnit yPosition = fillLayer->yPosition().calcMinValue(positioningAreaSize.height() - geometry.tileSize().height(), true);
    11371135    if (backgroundRepeatY == RepeatFill)
    11381136        geometry.setPhaseY(geometry.tileSize().height() ? layoutMod(geometry.tileSize().height() - (yPosition + top), geometry.tileSize().height()) : LayoutUnit(0));
     
    11471145}
    11481146
    1149 static LayoutUnit computeBorderImageSide(Length borderSlice, LayoutUnit borderSide, LayoutUnit imageSide, LayoutUnit boxExtent, const IntSize& viewportSize)
     1147static LayoutUnit computeBorderImageSide(Length borderSlice, LayoutUnit borderSide, LayoutUnit imageSide, LayoutUnit boxExtent)
    11501148{
    11511149    if (borderSlice.isRelative())
     
    11531151    if (borderSlice.isAuto())
    11541152        return imageSide;
    1155     return borderSlice.calcValue(boxExtent, viewportSize);
     1153    return borderSlice.calcValue(boxExtent);
    11561154}
    11571155
     
    11901188    int imageWidth = imageSize.width() / style->effectiveZoom();
    11911189    int imageHeight = imageSize.height() / style->effectiveZoom();
    1192     IntSize viewSize = viewportSize();
    1193 
    1194     int topSlice = min<int>(imageHeight, ninePieceImage.imageSlices().top().calcValue(imageHeight, viewSize));
    1195     int rightSlice = min<int>(imageWidth, ninePieceImage.imageSlices().right().calcValue(imageWidth, viewSize));
    1196     int bottomSlice = min<int>(imageHeight, ninePieceImage.imageSlices().bottom().calcValue(imageHeight, viewSize));
    1197     int leftSlice = min<int>(imageWidth, ninePieceImage.imageSlices().left().calcValue(imageWidth, viewSize));
     1190
     1191    int topSlice = min<int>(imageHeight, ninePieceImage.imageSlices().top().calcValue(imageHeight));
     1192    int rightSlice = min<int>(imageWidth, ninePieceImage.imageSlices().right().calcValue(imageWidth));
     1193    int bottomSlice = min<int>(imageHeight, ninePieceImage.imageSlices().bottom().calcValue(imageHeight));
     1194    int leftSlice = min<int>(imageWidth, ninePieceImage.imageSlices().left().calcValue(imageWidth));
    11981195
    11991196    ENinePieceImageRule hRule = ninePieceImage.horizontalRule();
    12001197    ENinePieceImageRule vRule = ninePieceImage.verticalRule();
    1201 
    1202     LayoutUnit topWidth = computeBorderImageSide(ninePieceImage.borderSlices().top(), style->borderTopWidth(), topSlice, borderImageRect.height(), viewSize);
    1203     LayoutUnit rightWidth = computeBorderImageSide(ninePieceImage.borderSlices().right(), style->borderRightWidth(), rightSlice, borderImageRect.width(), viewSize);
    1204     LayoutUnit bottomWidth = computeBorderImageSide(ninePieceImage.borderSlices().bottom(), style->borderBottomWidth(), bottomSlice, borderImageRect.height(), viewSize);
    1205     LayoutUnit leftWidth = computeBorderImageSide(ninePieceImage.borderSlices().left(), style->borderLeftWidth(), leftSlice, borderImageRect.width(), viewSize);
     1198   
     1199    LayoutUnit topWidth = computeBorderImageSide(ninePieceImage.borderSlices().top(), style->borderTopWidth(), topSlice, borderImageRect.height());
     1200    LayoutUnit rightWidth = computeBorderImageSide(ninePieceImage.borderSlices().right(), style->borderRightWidth(), rightSlice, borderImageRect.width());
     1201    LayoutUnit bottomWidth = computeBorderImageSide(ninePieceImage.borderSlices().bottom(), style->borderBottomWidth(), bottomSlice, borderImageRect.height());
     1202    LayoutUnit leftWidth = computeBorderImageSide(ninePieceImage.borderSlices().left(), style->borderLeftWidth(), leftSlice, borderImageRect.width());
    12061203   
    12071204    // Reduce the widths if they're too large.
     
    17481745    getBorderEdgeInfo(edges, includeLogicalLeftEdge, includeLogicalRightEdge);
    17491746
    1750     RoundedRect outerBorder = style->getRoundedBorderFor(rect, viewportSize(), includeLogicalLeftEdge, includeLogicalRightEdge);
     1747    RoundedRect outerBorder = style->getRoundedBorderFor(rect, includeLogicalLeftEdge, includeLogicalRightEdge);
    17511748    RoundedRect innerBorder = style->getRoundedInnerBorderFor(rect, includeLogicalLeftEdge, includeLogicalRightEdge);
    17521749
     
    20332030    GraphicsContextStateSaver stateSaver(*graphicsContext, false);
    20342031    if (style->hasBorderRadius()) {
    2035         border.includeLogicalEdges(style->getRoundedBorderFor(border.rect(), viewportSize()).radii(),
     2032        border.includeLogicalEdges(style->getRoundedBorderFor(border.rect()).radii(),
    20362033                                   horizontal, includeLogicalLeftEdge, includeLogicalRightEdge);
    20372034        if (border.isRounded()) {
     
    26872684
    26882685    RoundedRect border = (shadowStyle == Inset) ? s->getRoundedInnerBorderFor(paintRect, includeLogicalLeftEdge, includeLogicalRightEdge)
    2689                                                    : s->getRoundedBorderFor(paintRect, viewportSize(), includeLogicalLeftEdge, includeLogicalRightEdge);
     2686                                                   : s->getRoundedBorderFor(paintRect, includeLogicalLeftEdge, includeLogicalRightEdge);
    26902687
    26912688    bool hasBorderRadius = s->hasBorderRadius();
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp

    r109656 r109785  
    497497        return mainAxisExtent - mainAxisBorderAndPaddingExtentForChild(child) - mainAxisScrollbarExtentForChild(child);
    498498    }
    499     return mainAxisLength.calcMinValue(mainAxisContentExtent(), viewportSize());
     499    return mainAxisLength.calcMinValue(mainAxisContentExtent());
    500500}
    501501
     
    554554{
    555555    LayoutUnit flexboxAvailableContentExtent = mainAxisContentExtent();
    556     IntSize viewSize = viewportSize();
    557556    for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
    558557        flexOrderValues.add(child->style()->flexOrder());
     
    572571        // computes the start/end margins.
    573572        if (isHorizontalFlow()) {
    574             child->setMarginLeft(child->style()->marginLeft().calcMinValue(flexboxAvailableContentExtent, viewSize));
    575             child->setMarginRight(child->style()->marginRight().calcMinValue(flexboxAvailableContentExtent, viewSize));
     573            child->setMarginLeft(child->style()->marginLeft().calcMinValue(flexboxAvailableContentExtent));
     574            child->setMarginRight(child->style()->marginRight().calcMinValue(flexboxAvailableContentExtent));
    576575        } else {
    577             child->setMarginTop(child->style()->marginTop().calcMinValue(flexboxAvailableContentExtent, viewSize));
    578             child->setMarginBottom(child->style()->marginBottom().calcMinValue(flexboxAvailableContentExtent, viewSize));
     576            child->setMarginTop(child->style()->marginTop().calcMinValue(flexboxAvailableContentExtent));
     577            child->setMarginBottom(child->style()->marginBottom().calcMinValue(flexboxAvailableContentExtent));
    579578        }
    580579    }
     
    609608{
    610609    childSizes.clear();
    611     IntSize viewSize = viewportSize();
     610
    612611    LayoutUnit flexboxAvailableContentExtent = mainAxisContentExtent();
    613612    for (size_t i = 0; i < children.size(); ++i) {
     
    627626
    628627                Length childLogicalMaxWidth = isHorizontalFlow() ? child->style()->maxWidth() : child->style()->maxHeight();
    629                 if (!childLogicalMaxWidth.isUndefined() && childLogicalMaxWidth.isSpecified() && childPreferredSize > childLogicalMaxWidth.calcValue(flexboxAvailableContentExtent, viewSize)) {
    630                     childPreferredSize = childLogicalMaxWidth.calcValue(flexboxAvailableContentExtent, viewSize);
     628                if (!childLogicalMaxWidth.isUndefined() && childLogicalMaxWidth.isSpecified() && childPreferredSize > childLogicalMaxWidth.calcValue(flexboxAvailableContentExtent)) {
     629                    childPreferredSize = childLogicalMaxWidth.calcValue(flexboxAvailableContentExtent);
    631630                    availableFreeSpace -= childPreferredSize - preferredMainAxisContentExtentForChild(child);
    632631                    totalPositiveFlexibility -= positiveFlexForChild(child);
     
    639638
    640639                Length childLogicalMinWidth = isHorizontalFlow() ? child->style()->minWidth() : child->style()->minHeight();
    641                 if (!childLogicalMinWidth.isUndefined() && childLogicalMinWidth.isSpecified() && childPreferredSize < childLogicalMinWidth.calcValue(flexboxAvailableContentExtent, viewSize)) {
    642                     childPreferredSize = childLogicalMinWidth.calcValue(flexboxAvailableContentExtent, viewSize);
     640                if (!childLogicalMinWidth.isUndefined() && childLogicalMinWidth.isSpecified() && childPreferredSize < childLogicalMinWidth.calcValue(flexboxAvailableContentExtent)) {
     641                    childPreferredSize = childLogicalMinWidth.calcValue(flexboxAvailableContentExtent);
    643642                    availableFreeSpace += preferredMainAxisContentExtentForChild(child) - childPreferredSize;
    644643                    totalNegativeFlexibility -= negativeFlexForChild(child);
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r109656 r109785  
    703703    if (margin.isPercent())
    704704        return margin.calcMinValue(max<LayoutUnit>(0, renderer->containingBlock()->availableLogicalWidth()));
    705     if (margin.isViewportRelative())
    706         return margin.calcValue(0, renderer->viewportSize());
    707705    return 0;
    708706}
     
    13101308        RenderStyle* s = style(firstLine);
    13111309        if (s != style())
    1312             return s->computedLineHeight(viewportSize());
    1313     }
    1314 
    1315     return style()->computedLineHeight(viewportSize());
     1310            return s->computedLineHeight();
     1311    }
     1312
     1313    return style()->computedLineHeight();
    13161314}
    13171315
  • trunk/Source/WebCore/rendering/RenderMenuList.cpp

    r109656 r109785  
    162162            float optionWidth = 0;
    163163            if (RenderStyle* optionStyle = element->renderStyle())
    164                 optionWidth += optionStyle->textIndent().calcMinValue(0, viewportSize());
     164                optionWidth += optionStyle->textIndent().calcMinValue(0);
    165165            if (!text.isEmpty())
    166166                optionWidth += style()->font().width(text);
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r109656 r109785  
    14311431    LayoutUnit ow = outlineStyle->outlineSize();
    14321432    LayoutUnit width = abs(newOutlineBox.width() - oldOutlineBox.width());
    1433     IntSize viewSize = viewportSize();
    1434 
    14351433    if (width) {
    14361434        LayoutUnit shadowLeft;
     
    14401438        LayoutUnit borderRight = isBox() ? toRenderBox(this)->borderRight() : zeroLayoutUnit;
    14411439        LayoutUnit boxWidth = isBox() ? toRenderBox(this)->width() : zeroLayoutUnit;
    1442         LayoutUnit borderWidth = max<LayoutUnit>(-outlineStyle->outlineOffset(), max(borderRight, max<LayoutUnit>(style()->borderTopRightRadius().width().calcValue(boxWidth, viewSize), style()->borderBottomRightRadius().width().calcValue(boxWidth, viewSize)))) + max(ow, shadowRight);
     1440        LayoutUnit borderWidth = max<LayoutUnit>(-outlineStyle->outlineOffset(), max(borderRight, max<LayoutUnit>(style()->borderTopRightRadius().width().calcValue(boxWidth), style()->borderBottomRightRadius().width().calcValue(boxWidth)))) + max(ow, shadowRight);
    14431441        LayoutRect rightRect(newOutlineBox.x() + min(newOutlineBox.width(), oldOutlineBox.width()) - borderWidth,
    14441442            newOutlineBox.y(),
     
    14591457        LayoutUnit borderBottom = isBox() ? toRenderBox(this)->borderBottom() : zeroLayoutUnit;
    14601458        LayoutUnit boxHeight = isBox() ? toRenderBox(this)->height() : zeroLayoutUnit;
    1461         LayoutUnit borderHeight = max<LayoutUnit>(-outlineStyle->outlineOffset(), max(borderBottom, max<LayoutUnit>(style()->borderBottomLeftRadius().height().calcValue(boxHeight, viewSize), style()->borderBottomRightRadius().height().calcValue(boxHeight, viewSize)))) + max(ow, shadowBottom);
     1459        LayoutUnit borderHeight = max<LayoutUnit>(-outlineStyle->outlineOffset(), max(borderBottom, max<LayoutUnit>(style()->borderBottomLeftRadius().height().calcValue(boxHeight), style()->borderBottomRightRadius().height().calcValue(boxHeight)))) + max(ow, shadowBottom);
    14621460        LayoutRect bottomRect(newOutlineBox.x(),
    14631461            min(newOutlineBox.maxY(), oldOutlineBox.maxY()) - borderHeight,
  • trunk/Source/WebCore/rendering/RenderObject.h

    r109658 r109785  
    847847    // Return the renderer whose background style is used to paint the root background. Should only be called on the renderer for which isRoot() is true.
    848848    RenderObject* rendererForRootBackground();
    849 
    850     IntSize viewportSize() const { return document()->viewportSize(); }
    851849
    852850protected:
  • trunk/Source/WebCore/rendering/RenderReplaced.cpp

    r109656 r109785  
    147147            // Push a clip if we have a border radius, since we want to round the foreground content that gets painted.
    148148            paintInfo.context->save();
    149             paintInfo.context->addRoundedRectClip(style()->getRoundedBorderFor(paintRect, viewportSize()));
     149            paintInfo.context->addRoundedRectClip(style()->getRoundedBorderFor(paintRect));
    150150        }
    151151    }
  • trunk/Source/WebCore/rendering/RenderScrollbarPart.cpp

    r109656 r109785  
    8080}
    8181
    82 static int calcScrollbarThicknessUsing(const Length& length, int containingLength, const IntSize& viewportSize)
     82static int calcScrollbarThicknessUsing(const Length& l, int containingLength)
    8383{
    84     if (length.isIntrinsicOrAuto())
     84    if (l.isIntrinsicOrAuto())
    8585        return ScrollbarTheme::theme()->scrollbarThickness();
    86     return length.calcMinValue(containingLength, viewportSize);
     86    return l.calcMinValue(containingLength);
    8787}
    8888
     
    9191    if (!m_scrollbar->owningRenderer())
    9292        return;
    93     IntSize viewSize = viewportSize();
    9493    int visibleSize = m_scrollbar->owningRenderer()->width() - m_scrollbar->owningRenderer()->borderLeft() - m_scrollbar->owningRenderer()->borderRight();
    95     int w = calcScrollbarThicknessUsing(style()->width(), visibleSize, viewSize);
    96     int minWidth = calcScrollbarThicknessUsing(style()->minWidth(), visibleSize, viewSize);
    97     int maxWidth = style()->maxWidth().isUndefined() ? w : calcScrollbarThicknessUsing(style()->maxWidth(), visibleSize, viewSize);
     94    int w = calcScrollbarThicknessUsing(style()->width(), visibleSize);
     95    int minWidth = calcScrollbarThicknessUsing(style()->minWidth(), visibleSize);
     96    int maxWidth = style()->maxWidth().isUndefined() ? w : calcScrollbarThicknessUsing(style()->maxWidth(), visibleSize);
    9897    setWidth(max(minWidth, min(maxWidth, w)));
    9998   
    10099    // Buttons and track pieces can all have margins along the axis of the scrollbar.
    101     m_marginLeft = style()->marginLeft().calcMinValue(visibleSize, viewSize);
    102     m_marginRight = style()->marginRight().calcMinValue(visibleSize, viewSize);
     100    m_marginLeft = style()->marginLeft().calcMinValue(visibleSize);
     101    m_marginRight = style()->marginRight().calcMinValue(visibleSize);
    103102}
    104103
     
    107106    if (!m_scrollbar->owningRenderer())
    108107        return;
    109     IntSize viewSize = viewportSize();
    110108    int visibleSize = m_scrollbar->owningRenderer()->height() -  m_scrollbar->owningRenderer()->borderTop() - m_scrollbar->owningRenderer()->borderBottom();
    111     int h = calcScrollbarThicknessUsing(style()->height(), visibleSize, viewSize);
    112     int minHeight = calcScrollbarThicknessUsing(style()->minHeight(), visibleSize, viewSize);
    113     int maxHeight = style()->maxHeight().isUndefined() ? h : calcScrollbarThicknessUsing(style()->maxHeight(), visibleSize, viewSize);
     109    int h = calcScrollbarThicknessUsing(style()->height(), visibleSize);
     110    int minHeight = calcScrollbarThicknessUsing(style()->minHeight(), visibleSize);
     111    int maxHeight = style()->maxHeight().isUndefined() ? h : calcScrollbarThicknessUsing(style()->maxHeight(), visibleSize);
    114112    setHeight(max(minHeight, min(maxHeight, h)));
    115113
    116114    // Buttons and track pieces can all have margins along the axis of the scrollbar.
    117     m_marginTop = style()->marginTop().calcMinValue(visibleSize, viewSize);
    118     m_marginBottom = style()->marginBottom().calcMinValue(visibleSize, viewSize);
     115    m_marginTop = style()->marginTop().calcMinValue(visibleSize);
     116    m_marginBottom = style()->marginBottom().calcMinValue(visibleSize);
    119117}
    120118
  • trunk/Source/WebCore/rendering/RenderTable.cpp

    r109656 r109785  
    223223
    224224    RenderBlock* cb = containingBlock();
    225     IntSize viewSize = viewportSize();
    226225
    227226    LayoutUnit availableLogicalWidth = containingBlockLogicalWidthForContent();
     
    234233    else {
    235234        // Subtract out any fixed margins from our available width for auto width tables.
    236         LayoutUnit marginStart = style()->marginStart().calcMinValue(availableLogicalWidth, viewSize);
    237         LayoutUnit marginEnd = style()->marginEnd().calcMinValue(availableLogicalWidth, viewSize);
     235        LayoutUnit marginStart = style()->marginStart().calcMinValue(availableLogicalWidth);
     236        LayoutUnit marginEnd = style()->marginEnd().calcMinValue(availableLogicalWidth);
    238237        LayoutUnit marginTotal = marginStart + marginEnd;
    239 
     238       
    240239        // Subtract out our margins to get the available content width.
    241240        LayoutUnit availableContentLogicalWidth = max<LayoutUnit>(0, containerWidthInInlineDirection - marginTotal);
     
    263262        computeInlineDirectionMargins(cb, availableLogicalWidth, logicalWidth());
    264263    else {
    265         setMarginStart(style()->marginStart().calcMinValue(availableLogicalWidth, viewSize));
    266         setMarginEnd(style()->marginEnd().calcMinValue(availableLogicalWidth, viewSize));
     264        setMarginStart(style()->marginStart().calcMinValue(availableLogicalWidth));
     265        setMarginEnd(style()->marginEnd().calcMinValue(availableLogicalWidth));
    267266    }
    268267}
     
    278277        borders = borderStart() + borderEnd() + (collapseBorders() ? 0 : paddingStart() + paddingEnd());
    279278    }
    280     return styleLogicalWidth.calcMinValue(availableWidth, viewportSize()) + borders;
     279    return styleLogicalWidth.calcMinValue(availableWidth) + borders;
    281280}
    282281
  • trunk/Source/WebCore/rendering/RenderTableCell.cpp

    r109656 r109785  
    9696    LayoutUnit adjustedLogicalHeight = logicalHeight() - (intrinsicPaddingBefore() + intrinsicPaddingAfter());
    9797
    98     LayoutUnit styleLogicalHeight = style()->logicalHeight().calcValue(0, viewportSize());
     98    LayoutUnit styleLogicalHeight = style()->logicalHeight().calcValue(0);
    9999    if (document()->inQuirksMode() || style()->boxSizing() == BORDER_BOX) {
    100100        // Explicit heights use the border box in quirks mode.
  • trunk/Source/WebCore/rendering/RenderTableSection.cpp

    r109656 r109785  
    333333    m_rowPos.resize(m_grid.size() + 1);
    334334    m_rowPos[0] = spacing;
    335     IntSize viewSize = viewportSize();
    336335
    337336    for (unsigned r = 0; r < m_grid.size(); r++) {
     
    340339
    341340        // Our base size is the biggest logical height from our cells' styles (excluding row spanning cells).
    342         m_rowPos[r + 1] = max(m_rowPos[r] + m_grid[r].logicalHeight.calcMinValue(0, viewSize), 0);
     341        m_rowPos[r + 1] = max(m_rowPos[r] + m_grid[r].logicalHeight.calcMinValue(0), 0);
    343342
    344343        Row& row = m_grid[r].row;
  • trunk/Source/WebCore/rendering/RenderText.h

    r109656 r109785  
    9898    virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidthToEndOfLine = 0);
    9999
    100     virtual LayoutUnit marginLeft() const { return style()->marginLeft().calcMinValue(0, viewportSize()); }
    101     virtual LayoutUnit marginRight() const { return style()->marginRight().calcMinValue(0, viewportSize()); }
     100    virtual LayoutUnit marginLeft() const { return style()->marginLeft().calcMinValue(0); }
     101    virtual LayoutUnit marginRight() const { return style()->marginRight().calcMinValue(0); }
    102102
    103103    virtual LayoutRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
  • trunk/Source/WebCore/rendering/RenderThemeMac.mm

    r109656 r109785  
    10731073    GraphicsContextStateSaver stateSaver(*paintInfo.context);
    10741074
    1075     RoundedRect border = o->style()->getRoundedBorderFor(r, o->viewportSize());
     1075    RoundedRect border = o->style()->getRoundedBorderFor(r);
    10761076    int radius = border.radii().topLeft().width();
    10771077
  • trunk/Source/WebCore/rendering/RenderWidget.cpp

    r109656 r109785  
    271271        // Push a clip if we have a border radius, since we want to round the foreground content that gets painted.
    272272        paintInfo.context->save();
    273         paintInfo.context->addRoundedRectClip(style()->getRoundedBorderFor(borderRect, viewportSize()));
     273        paintInfo.context->addRoundedRectClip(style()->getRoundedBorderFor(borderRect));
    274274    }
    275275
  • trunk/Source/WebCore/rendering/RootInlineBox.cpp

    r109656 r109785  
    845845            verticalPosition += -renderer->lineHeight(firstLine, lineDirection) / 2 + renderer->baselinePosition(baselineType(), firstLine, lineDirection);
    846846        else if (verticalAlign == LENGTH)
    847             verticalPosition -= renderer->style()->verticalAlignLength().calcValue(renderer->lineHeight(firstLine, lineDirection), renderer->viewportSize());
     847            verticalPosition -= renderer->style()->verticalAlignLength().calcValue(renderer->lineHeight(firstLine, lineDirection));
    848848    }
    849849
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r109656 r109785  
    843843}
    844844
    845 static RoundedRect::Radii calcRadiiFor(const BorderData& border, LayoutSize size, const IntSize& viewportSize)
     845static RoundedRect::Radii calcRadiiFor(const BorderData& border, LayoutSize size)
    846846{
    847847    return RoundedRect::Radii(
    848         LayoutSize(border.topLeft().width().calcValue(size.width(), viewportSize),
    849                    border.topLeft().height().calcValue(size.height(), viewportSize)),
    850         LayoutSize(border.topRight().width().calcValue(size.width(), viewportSize),
    851                    border.topRight().height().calcValue(size.height(), viewportSize)),
    852         LayoutSize(border.bottomLeft().width().calcValue(size.width(), viewportSize),
    853                    border.bottomLeft().height().calcValue(size.height(), viewportSize)),
    854         LayoutSize(border.bottomRight().width().calcValue(size.width(), viewportSize),
    855                    border.bottomRight().height().calcValue(size.height(), viewportSize)));
     848        LayoutSize(border.topLeft().width().calcValue(size.width()),
     849                   border.topLeft().height().calcValue(size.height())),
     850        LayoutSize(border.topRight().width().calcValue(size.width()),
     851                   border.topRight().height().calcValue(size.height())),
     852        LayoutSize(border.bottomLeft().width().calcValue(size.width()),
     853                   border.bottomLeft().height().calcValue(size.height())),
     854        LayoutSize(border.bottomRight().width().calcValue(size.width()),
     855                   border.bottomRight().height().calcValue(size.height())));
    856856}
    857857
     
    888888}
    889889
    890 RoundedRect RenderStyle::getRoundedBorderFor(const LayoutRect& borderRect, IntSize viewportSize, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
     890RoundedRect RenderStyle::getRoundedBorderFor(const LayoutRect& borderRect, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
    891891{
    892892    RoundedRect roundedRect(pixelSnappedIntRect(borderRect));
    893893    if (hasBorderRadius()) {
    894         RoundedRect::Radii radii = calcRadiiFor(surround->border, borderRect.size(), viewportSize);
     894        RoundedRect::Radii radii = calcRadiiFor(surround->border, borderRect.size());
    895895        radii.scale(calcConstraintScaleFor(borderRect, radii));
    896896        roundedRect.includeLogicalEdges(radii, isHorizontalWritingMode(), includeLogicalLeftEdge, includeLogicalRightEdge);
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r109656 r109785  
    618618
    619619    Length lineHeight() const { return inherited->line_height; }
    620     int computedLineHeight(IntSize viewportSize = IntSize()) const
     620    int computedLineHeight() const
    621621    {
    622622        const Length& lh = inherited->line_height;
     
    628628        if (lh.isPercent())
    629629            return lh.calcMinValue(fontSize());
    630 
    631         if (lh.isViewportRelative())
    632             return lh.calcValue(0, viewportSize);
    633630
    634631        return lh.value();
     
    10621059    }
    10631060   
    1064     RoundedRect getRoundedBorderFor(const LayoutRect& borderRect, IntSize viewportSize = IntSize(), bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
     1061    RoundedRect getRoundedBorderFor(const LayoutRect& borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
    10651062    RoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
    10661063
  • trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp

    r109656 r109785  
    152152}
    153153
    154 static inline LayoutUnit resolveLengthAttributeForSVG(const Length& length, float scale, float maxSize, const IntSize& viewportSize)
    155 {
    156     return static_cast<LayoutUnit>(length.calcValue(maxSize, viewportSize) * (length.isFixed() ? scale : 1));
     154static inline LayoutUnit resolveLengthAttributeForSVG(const Length& length, float scale, float maxSize)
     155{
     156    return static_cast<LayoutUnit>(length.calcValue(maxSize) * (length.isFixed() ? scale : 1));
    157157}
    158158
     
    170170
    171171    if (svg->widthAttributeEstablishesViewport())
    172         return resolveLengthAttributeForSVG(svg->intrinsicWidth(SVGSVGElement::IgnoreCSSProperties), style()->effectiveZoom(), containingBlock()->availableLogicalWidth(), viewportSize());
     172        return resolveLengthAttributeForSVG(svg->intrinsicWidth(SVGSVGElement::IgnoreCSSProperties), style()->effectiveZoom(), containingBlock()->availableLogicalWidth());
    173173
    174174    // Only SVGs embedded in <object> reach this point.
     
    201201            RenderBlock::removePercentHeightDescendant(const_cast<RenderSVGRoot*>(this));
    202202
    203         return resolveLengthAttributeForSVG(height, style()->effectiveZoom(), containingBlock()->availableLogicalHeight(), viewportSize());
     203        return resolveLengthAttributeForSVG(height, style()->effectiveZoom(), containingBlock()->availableLogicalHeight());
    204204    }
    205205
Note: See TracChangeset for help on using the changeset viewer.