<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[169407] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/169407">169407</a></dd>
<dt>Author</dt> <dd>bjonesbe@adobe.com</dd>
<dt>Date</dt> <dd>2014-05-27 18:33:26 -0700 (Tue, 27 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>vw/vh units used as font/line-height values don't scale with the viewport
https://bugs.webkit.org/show_bug.cgi?id=87846

Reviewed by Darin Adler.

Source/WebCore:
This patch moves the resolution of viewport units to style recalc
time. Currently viewport units are left unresolved during style
recalcs, which leads to many problems with viewport units. Moving the
resolution will fix these problems, as well as reduce the plumbing
that goes on.

This patch touches a lot of files since the valueForLength functions
no longer need a RenderView. The interesting changes are in:

- CSSToLengthConversionData -&gt; CSSPrimitiveValue: for moving
    resolution to style recalc time.
- Length / LengthFunctions: no longer needs to know about viewport
    units.
- FrameView -&gt; Document -&gt; StyleResolver: for scheduling style recalcs
    upon resize

Note that getComputedStyle will now return pixel values when viewport
units are used. This behavior matches Firefox and the css3-cascade
spec.

This is based on a Blink patch by timloh@chromium.org.

Tests: css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html
       css3/viewport-percentage-lengths/viewport-percentage-lengths-calc.html
       css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html
       css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html
       css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html

* WebCore.exp.in: Remove RenderView argument to floatValueForLength.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getAttributeSetForAccessibilityObject): Remove RenderView argument.
* css/BasicShapeFunctions.cpp:
(WebCore::convertToLength): Ditto.
(WebCore::floatValueForCenterCoordinate): Ditto.
* css/BasicShapeFunctions.h: Ditto.
* css/CSSCalculationValue.cpp:
(WebCore::unitCategory): Remove special handling for viewport units,
    as they get resolved to pixels.
(WebCore::createCSS): Ditto.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::positionOffsetValue): Remove RendewView argument.
(WebCore::getBorderRadiusCornerValues): Remove handling of viewport
    units, as they are already resolve to pixels here.
(WebCore::getBorderRadiusCornerValue): Remove RenderView argument.
(WebCore::getBorderRadiusShorthandValue): Ditto.
(WebCore::specifiedValueForGridTrackBreadth): Remove handling of
    viewport units, as they are already resolved to pixels here.
(WebCore::specifiedValueForGridTrackSize): Remove RenderView argument.
(WebCore::valueForGridTrackList): Ditto.
(WebCore::lineHeightFromStyle): Ditto.
(WebCore::ComputedStyleExtractor::propertyValue): Ditto.
* css/CSSGradientValue.cpp:
(WebCore::CSSLinearGradientValue::createGradient): Pass RenderView to
    CSSToLengthConversionData constructor.
(WebCore::CSSRadialGradientValue::createGradient): Ditto.
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::unitCategory): Remove handling of
    viewport units, as they get resolved to pixels.
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Ditto.
(WebCore::CSSPrimitiveValue::init): Ditto.
(WebCore::CSSPrimitiveValue::computeLengthDouble): Resolve viewport
    units to pixels.
(WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory): Remove
handling of viewport units, since they get resolved to pixels.
(WebCore::CSSPrimitiveValue::viewportPercentageLength): Deleted.
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isLength): Remove special handling of
    viewport units, since they get resolved to pixels.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::convertToLength): Ditto.
* css/CSSToLengthConversionData.cpp:
(WebCore::CSSToLengthConversionData::viewportWidthFactor): Caclulate
    conversion factor for viewport units to pixels. Note this does not
    set hasViewportUnits on the RenderStyle if computing the font
    size, because in the font size case, the RenderStyle is the
    parent's style, not the current renderer's style.
(WebCore::CSSToLengthConversionData::viewportHeightFactor): Ditto.
(WebCore::CSSToLengthConversionData::viewportMinFactor): Ditto.
(WebCore::CSSToLengthConversionData::viewportMaxFactor): Ditto.
* css/CSSToLengthConversionData.h:
(WebCore::CSSToLengthConversionData::CSSToLengthConversionData): Add
    RenderView parameter, and make RenderStyle non-const so that
    hasViewportUnits can be set on the Style..
(WebCore::CSSToLengthConversionData::style): style is now non-const.
(WebCore::CSSToLengthConversionData::copyWithAdjustedZoom): Handle
    RenderView argument.
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapFillXPosition): Remove handling of
    viewport units, as they are already resolved to pixels here.
(WebCore::CSSToStyleMap::mapFillYPosition): Ditto.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyLength::applyValue): Ditto.
(WebCore::ApplyPropertyBorderRadius::applyValue): Ditto.
(WebCore::ApplyPropertyComputeLength::applyValue): Ditto.
(WebCore::ApplyPropertyFontSize::applyValue): Ditto.
(WebCore::ApplyPropertyLineHeight::applyValue): Ditto.
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): Ditto.
(WebCore::ApplyPropertyWordSpacing::applyValue): Ditto.
(WebCore::ApplyPropertyVerticalAlign::applyValue): Ditto.
(WebCore::ApplyPropertyTextIndent::applyValue): Ditto.
* css/LengthFunctions.cpp:
(WebCore::minimumIntValueForLength): Remove RenderView argument.
(WebCore::intValueForLength): Remove RenderView argument and
    roundPecentages.
(WebCore::minimumValueForLength): Remove RenderView argument, and
    special handling of viewport units.
(WebCore::valueForLength): Ditto.
(WebCore::floatValueForLength): Ditto.
(WebCore::floatSizeForLengthSize): Remove RenderView argument.
* css/LengthFunctions.h: Ditto.
* css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::eval): Add RenderView argument for
    CSSToLengthConversionData constuctor.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::clear): Change to 0 arg constructor
    for CSSToLengthConversionData.
(WebCore::StyleResolver::State::updateConversionData): In order to get
    the RenderView, we need to have a valid Element set on the state.
    Since this means that we need to set the conversion data in more
    places, move the contruction of conversion data into this helper
    method.
(WebCore::StyleResolver::State::initElement): Make sure conversion
    data is up to date.
(WebCore::StyleResolver::State::initForStyleResolve): Ditto.
(WebCore::StyleResolver::State::setStyle): When the style is set, we
    need to make sure to update the conversion data.
(WebCore::StyleResolver::styleForElement): If the style has viewport
    units, flage the document so that we can make sure to recalc the
    viewport unit values when the viewport is resized.
(WebCore::StyleResolver::pseudoStyleForElement): Ditto.
(WebCore::StyleResolver::updateFont): Make sure the font having
    viewport units updates the style.
(WebCore::StyleResolver::convertToIntLength): Remove handling of
viewport units, as they are resolved to pixels.
(WebCore::StyleResolver::convertToFloatLength): Ditto.
(WebCore::StyleResolver::clearCachedPropertiesAffectedByViewportUnits):
    Invalidate the matched properties cache for styles with viewport
    units when the viewport is resized.
(WebCore::createGridTrackBreadth): Remove handling of viewport units,
    as they are resolved to pixels.
(WebCore::StyleResolver::applyProperty): Ditto.
(WebCore::StyleResolver::hasMediaQueriesAffectedByViewportChange):
    Rename to be less confusing, since it has nothing to do with
    viewport units.
(WebCore::StyleResolver::createFilterOperations): Remove handling of
    viewport units, as they are resolved to pixels.
(WebCore::StyleResolver::affectedByViewportChange): Deleted.
(WebCore::StyleResolver::viewportPercentageValue): Deleted.
* css/StyleResolver.h:
(WebCore::StyleResolver::State::State): C++11 cleanup: 0 -&gt; nullptr.
(WebCore::StyleResolver::State::setFontSizeHasViewportUnits): Set if
    the font size is specified in viewport units.
(WebCore::StyleResolver::State::fontSizeHasViewportUnits): Ditto.
(WebCore::StyleResolver::State::setStyle): Deleted.
* css/TransformFunctions.cpp:
(WebCore::convertToFloatLength): Remove handling of viewport units,
    since they are resolved to pixels.
* dom/Document.cpp:
(WebCore::Document::Document): Add flag to determine if some style in
    the document has viewport units.
(WebCore::Document::pageSizeAndMarginsInPixels): Remove RenderView
    argument.
(WebCore::Document::updateViewportUnitsOnResize): Mark elements with
    viewport units for style recalc when the viewport size has
    changed.
* dom/Document.h:
(WebCore::Document::setHasStyleWithViewportUnits): Flag to determine
    if some style in the document has viewport units.
(WebCore::Document::hasStyleWithViewportUnits): Ditto.
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::getRegion): Remove RenderView argument.
* page/FrameView.cpp:
(WebCore::FrameView::layout): When the viewport is resized, call
    updateViewportUnitsOnResize on the document.
* platform/Length.h:
(WebCore::Length::isSpecified): Remove handling of viewport units,
    since they are now resolved to pixels.
(WebCore::Length::viewportPercentageLength): Deleted.
(WebCore::Length::isViewportPercentage): Deleted.
* rendering/ClipPathOperation.h:
(WebCore::ShapeClipPathOperation::pathForReferenceRect): Remove
    RenderView argument.
(WebCore::BoxClipPathOperation::pathForReferenceRect): Ditto.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateBlockChildDirtyBitsBeforeLayout): Remove
    handling of viewport units, since they get updated by
    updateViewportUnitsOnResize when the viewport is resized.
(WebCore::RenderBlock::nodeAtPoint): Remove RenderView argument.
(WebCore::RenderBlock::lineHeight): Ditto.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations): Remove RenderView argument.
(WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
    Remove handling of viewport units, as they are resolved to pixels.
(WebCore::RenderBox::computePercentageLogicalHeight): Ditto.
(WebCore::RenderBox::computeReplacedLogicalWidthUsing): Ditto.
(WebCore::RenderBox::computeReplacedLogicalHeightUsing): Ditto.
(WebCore::RenderBox::hasViewportPercentageLogicalHeight): Deleted.
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::getBackgroundRoundedRect): Remove
    RenderView argument.
(WebCore::RenderBoxModelObject::calculateFillTileSize): Remove
    handling of viewport units, as they are resolved to pixels.
(WebCore::computeBorderImageSide): Remove RenderView argument.
(WebCore::RenderBoxModelObject::paintNinePieceImage): Ditto.
(WebCore::RenderBoxModelObject::paintBorder): Ditto.
(WebCore::RenderBoxModelObject::paintBoxShadow): Ditto.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::repaintAfterLayoutIfNeeded): Ditto.
* rendering/RenderElement.h:
(WebCore::RenderElement::valueForLength): Remove unused
    roundPercentages argument.
(WebCore::RenderElement::minimumValueForLength): Remove unused
    RoundPercentages and RenderView arguments.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutGridItems): Remove handling of viewport
    units as they are resolved to pixels.
* rendering/RenderInline.cpp:
(WebCore::computeMargin): Ditto.
(WebCore::RenderInline::lineHeight): Remove RenderView argument.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupClipPath): Ditto.
* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::lineHeight): Ditto.
* rendering/RenderScrollbarPart.cpp:
(WebCore::calcScrollbarThicknessUsing): Ditto.
(WebCore::RenderScrollbarPart::computeScrollbarWidth): Ditto.
(WebCore::RenderScrollbarPart::computeScrollbarHeight): Ditto.
* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
    Remove handling of viewport units, since they are resolved to
    pixels.
(WebCore::RenderTable::computePreferredLogicalWidths): Now that
    viewport unit values are resolved to pixels at style recalc time,
    no special checking is needed to handle them, so update the
    comment to reflect that.
* rendering/RenderThemeIOS.mm:
(WebCore::applyCommonButtonPaddingToStyle): Add RenderView argument to
    CSSToLengthConversionData constructor.
(WebCore::RenderThemeIOS::adjustButtonStyle): Ditto.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMenuListButtonGradients): Remove
    RenderView argument.
* rendering/RenderView.cpp:
(WebCore::RenderView::layout): Remove handling of viewport units,
    since they are resolved to pixels.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::ascentAndDescentForBox): Remove RenderView
    argument.
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape): Remove RenderView argument.
* rendering/shapes/Shape.h:
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computedShape): Ditto.
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeCircle::floatValueForRadiusInBox): Ditto.
(WebCore::BasicShapeCircle::path): Ditto.
(WebCore::BasicShapeEllipse::floatValueForRadiusInBox): Ditto.
(WebCore::BasicShapeEllipse::path): Ditto.
(WebCore::BasicShapePolygon::path): Ditto.
(WebCore::floatSizeForLengthSize): Ditto.
(WebCore::BasicShapeInset::path): Ditto.
* rendering/style/BasicShapes.h:
* rendering/style/RenderStyle.cpp:
(WebCore::calcRadiiFor): Ditto.
(WebCore::RenderStyle::getRoundedBorderFor): Ditto.
(WebCore::RenderStyle::computedLineHeight): Remove handling of
    viewport units since they are resolved to pixels.
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::setHasViewportUnits): Set if this style has
a property set with viewport units.
(WebCore::RenderStyle::hasViewportUnits): Ditto.
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::resolveLengthAttributeForSVG): Remove RenderView argument.
(WebCore::RenderSVGRoot::computeReplacedLogicalWidth): Ditto.
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Ditto.
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent): Ditto.

LayoutTests:
Update existing tests to work with the proper behavior of viewport
units.

Add tests for some of the things fixed by this patch: handling of
viewport units in font sizes, with calc, and when the viewport is
resized without a reload.

The anonymous block and percent size child tests make sure that the
viewport unit updates still work properly when there is another
relative unit the depends on the size specified in viewport units.

* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle-expected.txt:
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle.html:
* css3/viewport-percentage-lengths/resources/resize-test.js: Added.
(resizeTest):
(standardResizeTest):
* css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block-expected.txt: Added.
* css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html: Added.
* css3/viewport-percentage-lengths/viewport-percentage-lengths-calc-expected.txt: Added.
* css3/viewport-percentage-lengths/viewport-percentage-lengths-calc.html: Added.
* css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child-expected.txt: Added.
* css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html: Added.
* css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt: Added.
* css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html: Added.
* css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt: Added.
* css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html: Added.
* fast/canvas/draw-focus-if-needed-expected.txt: Removed.
* fast/canvas/draw-focus-if-needed.html: Removed.
* fast/masking/parsing-clip-path-shape-expected.txt:
* fast/masking/parsing-clip-path-shape.html:
* fast/shapes/parsing/parsing-shape-lengths-expected.txt:
* fast/shapes/parsing/parsing-shape-lengths.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthscss3viewportpercentagelengthsgetStyleexpectedtxt">trunk/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthscss3viewportpercentagelengthsgetStylehtml">trunk/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle.html</a></li>
<li><a href="#trunkLayoutTestsfastmaskingparsingclippathshapeexpectedtxt">trunk/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmaskingparsingclippathshapehtml">trunk/LayoutTests/fast/masking/parsing-clip-path-shape.html</a></li>
<li><a href="#trunkLayoutTestsfastshapesparsingparsingshapelengthsexpectedtxt">trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastshapesparsingparsingshapelengthshtml">trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatkWebKitAccessibleInterfaceTextcpp">trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp</a></li>
<li><a href="#trunkSourceWebCorecssBasicShapeFunctionscpp">trunk/Source/WebCore/css/BasicShapeFunctions.cpp</a></li>
<li><a href="#trunkSourceWebCorecssBasicShapeFunctionsh">trunk/Source/WebCore/css/BasicShapeFunctions.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSCalculationValuecpp">trunk/Source/WebCore/css/CSSCalculationValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSGradientValuecpp">trunk/Source/WebCore/css/CSSGradientValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSGradientValueh">trunk/Source/WebCore/css/CSSGradientValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValuecpp">trunk/Source/WebCore/css/CSSPrimitiveValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueh">trunk/Source/WebCore/css/CSSPrimitiveValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueMappingsh">trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSToLengthConversionDatacpp">trunk/Source/WebCore/css/CSSToLengthConversionData.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSToLengthConversionDatah">trunk/Source/WebCore/css/CSSToLengthConversionData.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSToStyleMapcpp">trunk/Source/WebCore/css/CSSToStyleMap.cpp</a></li>
<li><a href="#trunkSourceWebCorecssDeprecatedStyleBuildercpp">trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorecssLengthFunctionscpp">trunk/Source/WebCore/css/LengthFunctions.cpp</a></li>
<li><a href="#trunkSourceWebCorecssLengthFunctionsh">trunk/Source/WebCore/css/LengthFunctions.h</a></li>
<li><a href="#trunkSourceWebCorecssMediaQueryEvaluatorcpp">trunk/Source/WebCore/css/MediaQueryEvaluator.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolverh">trunk/Source/WebCore/css/StyleResolver.h</a></li>
<li><a href="#trunkSourceWebCorecssTransformFunctionscpp">trunk/Source/WebCore/css/TransformFunctions.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAreaElementcpp">trunk/Source/WebCore/html/HTMLAreaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformLengthh">trunk/Source/WebCore/platform/Length.h</a></li>
<li><a href="#trunkSourceWebCorerenderingClipPathOperationh">trunk/Source/WebCore/rendering/ClipPathOperation.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxh">trunk/Source/WebCore/rendering/RenderBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxModelObjectcpp">trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderElementcpp">trunk/Source/WebCore/rendering/RenderElement.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderElementh">trunk/Source/WebCore/rendering/RenderElement.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderGridcpp">trunk/Source/WebCore/rendering/RenderGrid.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderInlinecpp">trunk/Source/WebCore/rendering/RenderInline.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLineBreakcpp">trunk/Source/WebCore/rendering/RenderLineBreak.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderScrollbarPartcpp">trunk/Source/WebCore/rendering/RenderScrollbarPart.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTablecpp">trunk/Source/WebCore/rendering/RenderTable.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeIOSmm">trunk/Source/WebCore/rendering/RenderThemeIOS.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeMacmm">trunk/Source/WebCore/rendering/RenderThemeMac.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewcpp">trunk/Source/WebCore/rendering/RenderView.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRootInlineBoxcpp">trunk/Source/WebCore/rendering/RootInlineBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapecpp">trunk/Source/WebCore/rendering/shapes/Shape.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapeh">trunk/Source/WebCore/rendering/shapes/Shape.h</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapeOutsideInfocpp">trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleBasicShapescpp">trunk/Source/WebCore/rendering/style/BasicShapes.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleBasicShapesh">trunk/Source/WebCore/rendering/style/BasicShapes.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGRootcpp">trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRenderingContextcpp">trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsresourcesresizetestjs">trunk/LayoutTests/css3/viewport-percentage-lengths/resources/resize-test.js</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsanonymousblockexpectedtxt">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsanonymousblockhtml">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthscalcexpectedtxt">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-calc-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthscalchtml">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-calc.html</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthspercentsizechildexpectedtxt">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthspercentsizechildhtml">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsrelativefontsizeexpectedtxt">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsrelativefontsizehtml">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsresizeexpectedtxt">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsresizehtml">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcanvasdrawfocusifneededexpectedtxt">trunk/LayoutTests/fast/canvas/draw-focus-if-needed-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcanvasdrawfocusifneededhtml">trunk/LayoutTests/fast/canvas/draw-focus-if-needed.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/LayoutTests/ChangeLog        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2014-05-27  Bem Jones-Bey  &lt;bjonesbe@adobe.com&gt;
+
+        vw/vh units used as font/line-height values don't scale with the viewport
+        https://bugs.webkit.org/show_bug.cgi?id=87846
+
+        Reviewed by Darin Adler.
+
+        Update existing tests to work with the proper behavior of viewport
+        units.
+
+        Add tests for some of the things fixed by this patch: handling of
+        viewport units in font sizes, with calc, and when the viewport is
+        resized without a reload.
+
+        The anonymous block and percent size child tests make sure that the
+        viewport unit updates still work properly when there is another
+        relative unit the depends on the size specified in viewport units.
+
+        * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle-expected.txt:
+        * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle.html:
+        * css3/viewport-percentage-lengths/resources/resize-test.js: Added.
+        (resizeTest):
+        (standardResizeTest):
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block-expected.txt: Added.
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html: Added.
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-calc-expected.txt: Added.
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-calc.html: Added.
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child-expected.txt: Added.
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html: Added.
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt: Added.
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html: Added.
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt: Added.
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html: Added.
+        * fast/canvas/draw-focus-if-needed-expected.txt: Removed.
+        * fast/canvas/draw-focus-if-needed.html: Removed.
+        * fast/masking/parsing-clip-path-shape-expected.txt:
+        * fast/masking/parsing-clip-path-shape.html:
+        * fast/shapes/parsing/parsing-shape-lengths-expected.txt:
+        * fast/shapes/parsing/parsing-shape-lengths.html:
+
</ins><span class="cx"> 2014-05-27  Zoltan Horvath  &lt;zoltan@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSS Shapes] serialization of the computed value should omit the default radii
</span></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthscss3viewportpercentagelengthsgetStyleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle-expected.txt (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle-expected.txt        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle-expected.txt        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> PASS style.getPropertyValue(&quot;width&quot;) is '240px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;font-size&quot;) is '24px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;line-height&quot;) is '32px'
</span><del>-PASS style.getPropertyValue(&quot;text-indent&quot;) is '2vw'
</del><ins>+PASS style.getPropertyValue(&quot;text-indent&quot;) is '16px'
</ins><span class="cx"> PASS style.getPropertyValue(&quot;margin-left&quot;) is '16px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;margin-right&quot;) is '16px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;margin-top&quot;) is '16px'
</span><span class="lines">@@ -17,10 +17,10 @@
</span><span class="cx"> PASS style.getPropertyValue(&quot;border-top-right-radius&quot;) is '8px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;border-bottom-left-radius&quot;) is '8px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;border-bottom-right-radius&quot;) is '8px'
</span><del>-PASS style.getPropertyValue(&quot;min-height&quot;) is '10vw'
-PASS style.getPropertyValue(&quot;min-width&quot;) is '10vw'
-PASS style.getPropertyValue(&quot;max-height&quot;) is '60vw'
-PASS style.getPropertyValue(&quot;max-width&quot;) is '60vw'
</del><ins>+PASS style.getPropertyValue(&quot;min-height&quot;) is '80px'
+PASS style.getPropertyValue(&quot;min-width&quot;) is '80px'
+PASS style.getPropertyValue(&quot;max-height&quot;) is '480px'
+PASS style.getPropertyValue(&quot;max-width&quot;) is '480px'
</ins><span class="cx"> PASS style.getPropertyValue(&quot;top&quot;) is '80px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;bottom&quot;) is '80px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;left&quot;) is '80px'
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> PASS style.getPropertyValue(&quot;width&quot;) is '180px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;font-size&quot;) is '18px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;line-height&quot;) is '24px'
</span><del>-PASS style.getPropertyValue(&quot;text-indent&quot;) is '2vh'
</del><ins>+PASS style.getPropertyValue(&quot;text-indent&quot;) is '12px'
</ins><span class="cx"> PASS style.getPropertyValue(&quot;margin-left&quot;) is '12px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;margin-right&quot;) is '12px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;margin-top&quot;) is '12px'
</span><span class="lines">@@ -44,10 +44,10 @@
</span><span class="cx"> PASS style.getPropertyValue(&quot;border-top-right-radius&quot;) is '6px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;border-bottom-left-radius&quot;) is '6px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;border-bottom-right-radius&quot;) is '6px'
</span><del>-PASS style.getPropertyValue(&quot;min-height&quot;) is '10vh'
-PASS style.getPropertyValue(&quot;min-width&quot;) is '10vh'
-PASS style.getPropertyValue(&quot;max-height&quot;) is '60vh'
-PASS style.getPropertyValue(&quot;max-width&quot;) is '60vh'
</del><ins>+PASS style.getPropertyValue(&quot;min-height&quot;) is '60px'
+PASS style.getPropertyValue(&quot;min-width&quot;) is '60px'
+PASS style.getPropertyValue(&quot;max-height&quot;) is '360px'
+PASS style.getPropertyValue(&quot;max-width&quot;) is '360px'
</ins><span class="cx"> PASS style.getPropertyValue(&quot;top&quot;) is '60px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;bottom&quot;) is '60px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;left&quot;) is '60px'
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> PASS style.getPropertyValue(&quot;width&quot;) is '180px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;font-size&quot;) is '18px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;line-height&quot;) is '24px'
</span><del>-PASS style.getPropertyValue(&quot;text-indent&quot;) is '2vmin'
</del><ins>+PASS style.getPropertyValue(&quot;text-indent&quot;) is '12px'
</ins><span class="cx"> PASS style.getPropertyValue(&quot;margin-left&quot;) is '12px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;margin-right&quot;) is '12px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;margin-top&quot;) is '12px'
</span><span class="lines">@@ -71,10 +71,10 @@
</span><span class="cx"> PASS style.getPropertyValue(&quot;border-top-right-radius&quot;) is '6px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;border-bottom-left-radius&quot;) is '6px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;border-bottom-right-radius&quot;) is '6px'
</span><del>-PASS style.getPropertyValue(&quot;min-height&quot;) is '10vmin'
-PASS style.getPropertyValue(&quot;min-width&quot;) is '10vmin'
-PASS style.getPropertyValue(&quot;max-height&quot;) is '60vmin'
-PASS style.getPropertyValue(&quot;max-width&quot;) is '60vmin'
</del><ins>+PASS style.getPropertyValue(&quot;min-height&quot;) is '60px'
+PASS style.getPropertyValue(&quot;min-width&quot;) is '60px'
+PASS style.getPropertyValue(&quot;max-height&quot;) is '360px'
+PASS style.getPropertyValue(&quot;max-width&quot;) is '360px'
</ins><span class="cx"> PASS style.getPropertyValue(&quot;top&quot;) is '60px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;bottom&quot;) is '60px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;left&quot;) is '60px'
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx"> PASS style.getPropertyValue(&quot;width&quot;) is '240px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;font-size&quot;) is '24px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;line-height&quot;) is '32px'
</span><del>-PASS style.getPropertyValue(&quot;text-indent&quot;) is '2vmax'
</del><ins>+PASS style.getPropertyValue(&quot;text-indent&quot;) is '16px'
</ins><span class="cx"> PASS style.getPropertyValue(&quot;margin-left&quot;) is '16px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;margin-right&quot;) is '16px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;margin-top&quot;) is '16px'
</span><span class="lines">@@ -98,10 +98,10 @@
</span><span class="cx"> PASS style.getPropertyValue(&quot;border-top-right-radius&quot;) is '8px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;border-bottom-left-radius&quot;) is '8px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;border-bottom-right-radius&quot;) is '8px'
</span><del>-PASS style.getPropertyValue(&quot;min-height&quot;) is '10vmax'
-PASS style.getPropertyValue(&quot;min-width&quot;) is '10vmax'
-PASS style.getPropertyValue(&quot;max-height&quot;) is '60vmax'
-PASS style.getPropertyValue(&quot;max-width&quot;) is '60vmax'
</del><ins>+PASS style.getPropertyValue(&quot;min-height&quot;) is '80px'
+PASS style.getPropertyValue(&quot;min-width&quot;) is '80px'
+PASS style.getPropertyValue(&quot;max-height&quot;) is '480px'
+PASS style.getPropertyValue(&quot;max-width&quot;) is '480px'
</ins><span class="cx"> PASS style.getPropertyValue(&quot;top&quot;) is '80px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;bottom&quot;) is '80px'
</span><span class="cx"> PASS style.getPropertyValue(&quot;left&quot;) is '80px'
</span></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthscss3viewportpercentagelengthsgetStylehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle.html (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle.html        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle.html        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -149,130 +149,146 @@
</span><span class="cx"> // These have to be global for the test helpers to see them.
</span><span class="cx"> var element, style;
</span><span class="cx"> 
</span><ins>+function vw(x) {
+    return &quot;'&quot; + Math.floor(x * window.innerWidth / 100) + &quot;px'&quot;;
+}
+
+function vh(x) {
+    return &quot;'&quot; + Math.floor(x * window.innerHeight / 100) + &quot;px'&quot;;
+}
+
+function vmin(x) {
+    return &quot;'&quot; + Math.floor(x * Math.min(window.innerWidth, window.innerHeight) / 100) + &quot;px'&quot;;
+}
+
+function vmax(x) {
+    return &quot;'&quot; + Math.floor(x * Math.max(window.innerWidth, window.innerHeight) / 100) + &quot;px'&quot;;
+}
+
</ins><span class="cx"> function getTheStyle() {
</span><span class="cx">     debug(&quot;Test for vw&quot;)
</span><span class="cx">     element = document.getElementById(&quot;element-container-vw&quot;);
</span><span class="cx">     style = window.getComputedStyle(element,null);
</span><span class="cx">     var viewportWidth = window.innerWidth;
</span><del>-    shouldBe('style.getPropertyValue(&quot;height&quot;)', &quot;'&quot; + Math.floor(30 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;width&quot;)', &quot;'&quot; + Math.floor(30 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;font-size&quot;)', &quot;'&quot; + Math.floor(3 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;line-height&quot;)', &quot;'&quot; + Math.floor(4 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;text-indent&quot;)', &quot;'2vw'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-left&quot;)', &quot;'&quot; + Math.floor(2 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-right&quot;)', &quot;'&quot; + Math.floor(2 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-top&quot;)', &quot;'&quot; + Math.floor(2 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-bottom&quot;)', &quot;'&quot; + Math.floor(2 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-top-left-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-top-right-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-bottom-left-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-bottom-right-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;min-height&quot;)', &quot;'10vw'&quot;);
-    shouldBe('style.getPropertyValue(&quot;min-width&quot;)', &quot;'10vw'&quot;);
-    shouldBe('style.getPropertyValue(&quot;max-height&quot;)', &quot;'60vw'&quot;);
-    shouldBe('style.getPropertyValue(&quot;max-width&quot;)', &quot;'60vw'&quot;);
</del><ins>+    shouldBe('style.getPropertyValue(&quot;height&quot;)', vw(30));
+    shouldBe('style.getPropertyValue(&quot;width&quot;)', vw(30));
+    shouldBe('style.getPropertyValue(&quot;font-size&quot;)', vw(3));
+    shouldBe('style.getPropertyValue(&quot;line-height&quot;)', vw(4));
+    shouldBe('style.getPropertyValue(&quot;text-indent&quot;)', vw(2));
+    shouldBe('style.getPropertyValue(&quot;margin-left&quot;)', vw(2));
+    shouldBe('style.getPropertyValue(&quot;margin-right&quot;)', vw(2));
+    shouldBe('style.getPropertyValue(&quot;margin-top&quot;)', vw(2));
+    shouldBe('style.getPropertyValue(&quot;margin-bottom&quot;)', vw(2));
+    shouldBe('style.getPropertyValue(&quot;border-top-left-radius&quot;)', vw(1));
+    shouldBe('style.getPropertyValue(&quot;border-top-right-radius&quot;)', vw(1));
+    shouldBe('style.getPropertyValue(&quot;border-bottom-left-radius&quot;)', vw(1));
+    shouldBe('style.getPropertyValue(&quot;border-bottom-right-radius&quot;)', vw(1));
+    shouldBe('style.getPropertyValue(&quot;min-height&quot;)', vw(10));
+    shouldBe('style.getPropertyValue(&quot;min-width&quot;)', vw(10));
+    shouldBe('style.getPropertyValue(&quot;max-height&quot;)', vw(60));
+    shouldBe('style.getPropertyValue(&quot;max-width&quot;)', vw(60));
</ins><span class="cx">     element.id = &quot;element-container-absolute-vw&quot;;
</span><del>-    shouldBe('style.getPropertyValue(&quot;top&quot;)', &quot;'&quot; + Math.floor(10 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;bottom&quot;)', &quot;'&quot; + Math.floor(10 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;left&quot;)', &quot;'&quot; + Math.floor(10 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;right&quot;)', &quot;'&quot; + Math.floor(10 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-left&quot;)', &quot;'&quot; + Math.floor(2 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-right&quot;)', &quot;'&quot; + Math.floor(2 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-top&quot;)', &quot;'&quot; + Math.floor(2 * viewportWidth / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-bottom&quot;)', &quot;'&quot; + Math.floor(2 * viewportWidth / 100) + &quot;px'&quot;);
</del><ins>+    shouldBe('style.getPropertyValue(&quot;top&quot;)', vw(10));
+    shouldBe('style.getPropertyValue(&quot;bottom&quot;)', vw(10));
+    shouldBe('style.getPropertyValue(&quot;left&quot;)', vw(10));
+    shouldBe('style.getPropertyValue(&quot;right&quot;)', vw(10));
+    shouldBe('style.getPropertyValue(&quot;padding-left&quot;)', vw(2));
+    shouldBe('style.getPropertyValue(&quot;padding-right&quot;)', vw(2));
+    shouldBe('style.getPropertyValue(&quot;padding-top&quot;)', vw(2));
+    shouldBe('style.getPropertyValue(&quot;padding-bottom&quot;)', vw(2));
</ins><span class="cx"> 
</span><span class="cx">     debug(&quot;\nTest for vh&quot;)
</span><span class="cx">     element.id = &quot;element-container-vh&quot;;
</span><span class="cx">     style = window.getComputedStyle(element,null);
</span><span class="cx">     var viewportHeight = window.innerHeight;
</span><del>-    shouldBe('style.getPropertyValue(&quot;height&quot;)', &quot;'&quot; + Math.floor(30 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;width&quot;)', &quot;'&quot; + Math.floor(30 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;font-size&quot;)', &quot;'&quot; + Math.floor(3 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;line-height&quot;)', &quot;'&quot; + Math.floor(4 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;text-indent&quot;)', &quot;'2vh'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-left&quot;)', &quot;'&quot; + Math.floor(2 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-right&quot;)', &quot;'&quot; + Math.floor(2 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-top&quot;)', &quot;'&quot; + Math.floor(2 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-bottom&quot;)', &quot;'&quot; + Math.floor(2 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-top-left-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-top-right-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-bottom-left-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-bottom-right-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;min-height&quot;)', &quot;'10vh'&quot;);
-    shouldBe('style.getPropertyValue(&quot;min-width&quot;)', &quot;'10vh'&quot;);
-    shouldBe('style.getPropertyValue(&quot;max-height&quot;)', &quot;'60vh'&quot;);
-    shouldBe('style.getPropertyValue(&quot;max-width&quot;)', &quot;'60vh'&quot;);
</del><ins>+    shouldBe('style.getPropertyValue(&quot;height&quot;)', vh(30));
+    shouldBe('style.getPropertyValue(&quot;width&quot;)', vh(30));
+    shouldBe('style.getPropertyValue(&quot;font-size&quot;)', vh(3));
+    shouldBe('style.getPropertyValue(&quot;line-height&quot;)', vh(4));
+    shouldBe('style.getPropertyValue(&quot;text-indent&quot;)', vh(2));
+    shouldBe('style.getPropertyValue(&quot;margin-left&quot;)', vh(2));
+    shouldBe('style.getPropertyValue(&quot;margin-right&quot;)', vh(2));
+    shouldBe('style.getPropertyValue(&quot;margin-top&quot;)', vh(2));
+    shouldBe('style.getPropertyValue(&quot;margin-bottom&quot;)', vh(2));
+    shouldBe('style.getPropertyValue(&quot;border-top-left-radius&quot;)', vh(1));
+    shouldBe('style.getPropertyValue(&quot;border-top-right-radius&quot;)', vh(1));
+    shouldBe('style.getPropertyValue(&quot;border-bottom-left-radius&quot;)', vh(1));
+    shouldBe('style.getPropertyValue(&quot;border-bottom-right-radius&quot;)', vh(1));
+    shouldBe('style.getPropertyValue(&quot;min-height&quot;)', vh(10));
+    shouldBe('style.getPropertyValue(&quot;min-width&quot;)', vh(10));
+    shouldBe('style.getPropertyValue(&quot;max-height&quot;)', vh(60));
+    shouldBe('style.getPropertyValue(&quot;max-width&quot;)', vh(60));
</ins><span class="cx">     element.id = &quot;element-container-absolute-vh&quot;;
</span><del>-    shouldBe('style.getPropertyValue(&quot;top&quot;)', &quot;'&quot; + Math.floor(10 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;bottom&quot;)', &quot;'&quot; + Math.floor(10 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;left&quot;)', &quot;'&quot; + Math.floor(10 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;right&quot;)', &quot;'&quot; + Math.floor(10 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-left&quot;)', &quot;'&quot; + Math.floor(2 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-right&quot;)', &quot;'&quot; + Math.floor(2 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-top&quot;)', &quot;'&quot; + Math.floor(2 * viewportHeight / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-bottom&quot;)', &quot;'&quot; + Math.floor(2 * viewportHeight / 100) + &quot;px'&quot;);
</del><ins>+    shouldBe('style.getPropertyValue(&quot;top&quot;)', vh(10));
+    shouldBe('style.getPropertyValue(&quot;bottom&quot;)', vh(10));
+    shouldBe('style.getPropertyValue(&quot;left&quot;)', vh(10));
+    shouldBe('style.getPropertyValue(&quot;right&quot;)', vh(10));
+    shouldBe('style.getPropertyValue(&quot;padding-left&quot;)', vh(2));
+    shouldBe('style.getPropertyValue(&quot;padding-right&quot;)', vh(2));
+    shouldBe('style.getPropertyValue(&quot;padding-top&quot;)', vh(2));
+    shouldBe('style.getPropertyValue(&quot;padding-bottom&quot;)', vh(2));
</ins><span class="cx"> 
</span><span class="cx">     debug(&quot;\nTest for vmin&quot;)
</span><span class="cx">     element.id = &quot;element-container-vmin&quot;;
</span><span class="cx">     style = window.getComputedStyle(element,null);
</span><span class="cx">     var viewportMinLength = Math.min(window.innerWidth, window.innerHeight);
</span><del>-    shouldBe('style.getPropertyValue(&quot;height&quot;)', &quot;'&quot; + Math.floor(30 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;width&quot;)', &quot;'&quot; + Math.floor(30 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;font-size&quot;)', &quot;'&quot; + Math.floor(3 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;line-height&quot;)', &quot;'&quot; + Math.floor(4 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;text-indent&quot;)', &quot;'2vmin'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-left&quot;)', &quot;'&quot; + Math.floor(2 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-right&quot;)', &quot;'&quot; + Math.floor(2 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-top&quot;)', &quot;'&quot; + Math.floor(2 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-bottom&quot;)', &quot;'&quot; + Math.floor(2 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-top-left-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-top-right-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-bottom-left-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-bottom-right-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;min-height&quot;)', &quot;'10vmin'&quot;);
-    shouldBe('style.getPropertyValue(&quot;min-width&quot;)', &quot;'10vmin'&quot;);
-    shouldBe('style.getPropertyValue(&quot;max-height&quot;)', &quot;'60vmin'&quot;);
-    shouldBe('style.getPropertyValue(&quot;max-width&quot;)', &quot;'60vmin'&quot;);
</del><ins>+    shouldBe('style.getPropertyValue(&quot;height&quot;)', vmin(30));
+    shouldBe('style.getPropertyValue(&quot;width&quot;)', vmin(30));
+    shouldBe('style.getPropertyValue(&quot;font-size&quot;)', vmin(3));
+    shouldBe('style.getPropertyValue(&quot;line-height&quot;)', vmin(4));
+    shouldBe('style.getPropertyValue(&quot;text-indent&quot;)', vmin(2));
+    shouldBe('style.getPropertyValue(&quot;margin-left&quot;)', vmin(2));
+    shouldBe('style.getPropertyValue(&quot;margin-right&quot;)', vmin(2));
+    shouldBe('style.getPropertyValue(&quot;margin-top&quot;)', vmin(2));
+    shouldBe('style.getPropertyValue(&quot;margin-bottom&quot;)', vmin(2));
+    shouldBe('style.getPropertyValue(&quot;border-top-left-radius&quot;)', vmin(1));
+    shouldBe('style.getPropertyValue(&quot;border-top-right-radius&quot;)', vmin(1));
+    shouldBe('style.getPropertyValue(&quot;border-bottom-left-radius&quot;)', vmin(1));
+    shouldBe('style.getPropertyValue(&quot;border-bottom-right-radius&quot;)', vmin(1));
+    shouldBe('style.getPropertyValue(&quot;min-height&quot;)', vmin(10));
+    shouldBe('style.getPropertyValue(&quot;min-width&quot;)', vmin(10));
+    shouldBe('style.getPropertyValue(&quot;max-height&quot;)', vmin(60));
+    shouldBe('style.getPropertyValue(&quot;max-width&quot;)', vmin(60));
</ins><span class="cx">     element.id = &quot;element-container-absolute-vmin&quot;;
</span><del>-    shouldBe('style.getPropertyValue(&quot;top&quot;)', &quot;'&quot; + Math.floor(10 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;bottom&quot;)', &quot;'&quot; + Math.floor(10 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;left&quot;)', &quot;'&quot; + Math.floor(10 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;right&quot;)', &quot;'&quot; + Math.floor(10 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-left&quot;)', &quot;'&quot; + Math.floor(2 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-right&quot;)', &quot;'&quot; + Math.floor(2 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-top&quot;)', &quot;'&quot; + Math.floor(2 * viewportMinLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-bottom&quot;)', &quot;'&quot; + Math.floor(2 * viewportMinLength / 100) + &quot;px'&quot;);
</del><ins>+    shouldBe('style.getPropertyValue(&quot;top&quot;)', vmin(10));
+    shouldBe('style.getPropertyValue(&quot;bottom&quot;)', vmin(10));
+    shouldBe('style.getPropertyValue(&quot;left&quot;)', vmin(10));
+    shouldBe('style.getPropertyValue(&quot;right&quot;)', vmin(10));
+    shouldBe('style.getPropertyValue(&quot;padding-left&quot;)', vmin(2));
+    shouldBe('style.getPropertyValue(&quot;padding-right&quot;)', vmin(2));
+    shouldBe('style.getPropertyValue(&quot;padding-top&quot;)', vmin(2));
+    shouldBe('style.getPropertyValue(&quot;padding-bottom&quot;)', vmin(2));
</ins><span class="cx"> 
</span><span class="cx">     debug(&quot;\nTest for vmax&quot;)
</span><span class="cx">     element.id = &quot;element-container-vmax&quot;;
</span><span class="cx">     style = window.getComputedStyle(element,null);
</span><span class="cx">     var viewportMaxLength = Math.max(window.innerWidth, window.innerHeight);
</span><del>-    shouldBe('style.getPropertyValue(&quot;height&quot;)', &quot;'&quot; + Math.floor(30 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;width&quot;)', &quot;'&quot; + Math.floor(30 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;font-size&quot;)', &quot;'&quot; + Math.floor(3 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;line-height&quot;)', &quot;'&quot; + Math.floor(4 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;text-indent&quot;)', &quot;'2vmax'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-left&quot;)', &quot;'&quot; + Math.floor(2 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-right&quot;)', &quot;'&quot; + Math.floor(2 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-top&quot;)', &quot;'&quot; + Math.floor(2 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;margin-bottom&quot;)', &quot;'&quot; + Math.floor(2 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-top-left-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-top-right-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-bottom-left-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;border-bottom-right-radius&quot;)', &quot;'&quot; + Math.floor(1 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;min-height&quot;)', &quot;'10vmax'&quot;);
-    shouldBe('style.getPropertyValue(&quot;min-width&quot;)', &quot;'10vmax'&quot;);
-    shouldBe('style.getPropertyValue(&quot;max-height&quot;)', &quot;'60vmax'&quot;);
-    shouldBe('style.getPropertyValue(&quot;max-width&quot;)', &quot;'60vmax'&quot;);
</del><ins>+    shouldBe('style.getPropertyValue(&quot;height&quot;)', vmax(30));
+    shouldBe('style.getPropertyValue(&quot;width&quot;)', vmax(30));
+    shouldBe('style.getPropertyValue(&quot;font-size&quot;)', vmax(3));
+    shouldBe('style.getPropertyValue(&quot;line-height&quot;)', vmax(4));
+    shouldBe('style.getPropertyValue(&quot;text-indent&quot;)', vmax(2));
+    shouldBe('style.getPropertyValue(&quot;margin-left&quot;)', vmax(2));
+    shouldBe('style.getPropertyValue(&quot;margin-right&quot;)', vmax(2));
+    shouldBe('style.getPropertyValue(&quot;margin-top&quot;)', vmax(2));
+    shouldBe('style.getPropertyValue(&quot;margin-bottom&quot;)', vmax(2));
+    shouldBe('style.getPropertyValue(&quot;border-top-left-radius&quot;)', vmax(1));
+    shouldBe('style.getPropertyValue(&quot;border-top-right-radius&quot;)', vmax(1));
+    shouldBe('style.getPropertyValue(&quot;border-bottom-left-radius&quot;)', vmax(1));
+    shouldBe('style.getPropertyValue(&quot;border-bottom-right-radius&quot;)', vmax(1));
+    shouldBe('style.getPropertyValue(&quot;min-height&quot;)', vmax(10));
+    shouldBe('style.getPropertyValue(&quot;min-width&quot;)', vmax(10));
+    shouldBe('style.getPropertyValue(&quot;max-height&quot;)', vmax(60));
+    shouldBe('style.getPropertyValue(&quot;max-width&quot;)', vmax(60));
</ins><span class="cx">     element.id = &quot;element-container-absolute-vmax&quot;;
</span><del>-    shouldBe('style.getPropertyValue(&quot;top&quot;)', &quot;'&quot; + Math.floor(10 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;bottom&quot;)', &quot;'&quot; + Math.floor(10 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;left&quot;)', &quot;'&quot; + Math.floor(10 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;right&quot;)', &quot;'&quot; + Math.floor(10 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-left&quot;)', &quot;'&quot; + Math.floor(2 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-right&quot;)', &quot;'&quot; + Math.floor(2 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-top&quot;)', &quot;'&quot; + Math.floor(2 * viewportMaxLength / 100) + &quot;px'&quot;);
-    shouldBe('style.getPropertyValue(&quot;padding-bottom&quot;)', &quot;'&quot; + Math.floor(2 * viewportMaxLength / 100) + &quot;px'&quot;);
</del><ins>+    shouldBe('style.getPropertyValue(&quot;top&quot;)', vmax(10));
+    shouldBe('style.getPropertyValue(&quot;bottom&quot;)', vmax(10));
+    shouldBe('style.getPropertyValue(&quot;left&quot;)', vmax(10));
+    shouldBe('style.getPropertyValue(&quot;right&quot;)', vmax(10));
+    shouldBe('style.getPropertyValue(&quot;padding-left&quot;)', vmax(2));
+    shouldBe('style.getPropertyValue(&quot;padding-right&quot;)', vmax(2));
+    shouldBe('style.getPropertyValue(&quot;padding-top&quot;)', vmax(2));
+    shouldBe('style.getPropertyValue(&quot;padding-bottom&quot;)', vmax(2));
</ins><span class="cx"> }
</span><span class="cx"> getTheStyle();
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsresourcesresizetestjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/viewport-percentage-lengths/resources/resize-test.js (0 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/resources/resize-test.js                                (rev 0)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/resources/resize-test.js        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function resizeTest(sizes, testfn) {
+    if (!sizes.length) {
+        if (window.testRunner)
+            testRunner.notifyDone();
+        return;
+    }
+
+    var size = sizes.shift();
+    var width = size[0];
+    var height = size[1];
+    window.resizeTo(width, height);
+    window.setTimeout(function () {
+        shouldBe(&quot;window.outerWidth&quot;, &quot;&quot; + width);
+        shouldBe(&quot;window.outerHeight&quot;, &quot;&quot; + height);
+        testfn(size);
+        resizeTest(sizes, testfn);
+    }, 0);
+}
+
+function standardResizeTest(testfn) {
+    resizeTest([[800, 600], [900, 600], [900, 640], [500, 640], [800, 600]], testfn);
+}
</ins></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsanonymousblockexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block-expected.txt (0 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block-expected.txt                                (rev 0)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block-expected.txt        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+Test viewport unit sizes work when an anonymous block is involved.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS window.outerWidth is 800
+PASS window.outerHeight is 600
+PASS getComputedStyle(container).width is '400px'
+PASS getComputedStyle(container).height is '300px'
+PASS getComputedStyle(random).width is '200px'
+PASS window.innerWidth/2 is &gt;= document.getElementById('firstContent').offsetWidth
+PASS window.innerWidth/2 is &gt;= document.getElementById('secondContent').offsetWidth
+PASS window.outerWidth is 900
+PASS window.outerHeight is 600
+PASS getComputedStyle(container).width is '400px'
+PASS getComputedStyle(container).height is '300px'
+PASS getComputedStyle(random).width is '200px'
+PASS window.innerWidth/2 is &gt;= document.getElementById('firstContent').offsetWidth
+PASS window.innerWidth/2 is &gt;= document.getElementById('secondContent').offsetWidth
+PASS window.outerWidth is 900
+PASS window.outerHeight is 640
+PASS getComputedStyle(container).width is '400px'
+PASS getComputedStyle(container).height is '300px'
+PASS getComputedStyle(random).width is '200px'
+PASS window.innerWidth/2 is &gt;= document.getElementById('firstContent').offsetWidth
+PASS window.innerWidth/2 is &gt;= document.getElementById('secondContent').offsetWidth
+PASS window.outerWidth is 500
+PASS window.outerHeight is 640
+PASS getComputedStyle(container).width is '400px'
+PASS getComputedStyle(container).height is '300px'
+PASS getComputedStyle(random).width is '200px'
+PASS window.innerWidth/2 is &gt;= document.getElementById('firstContent').offsetWidth
+PASS window.innerWidth/2 is &gt;= document.getElementById('secondContent').offsetWidth
+PASS window.outerWidth is 800
+PASS window.outerHeight is 600
+PASS getComputedStyle(container).width is '400px'
+PASS getComputedStyle(container).height is '300px'
+PASS getComputedStyle(random).width is '200px'
+PASS window.innerWidth/2 is &gt;= document.getElementById('firstContent').offsetWidth
+PASS window.innerWidth/2 is &gt;= document.getElementById('secondContent').offsetWidth
+This is enough text content that it will wrap around in this container. We need lots of it to account for variances in font sizes.
+This is some content in an inner div.
+And here is some more content that will also wrap around in this container. We need lots of it to account for variances in font sizes.
</ins></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsanonymousblockhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html (0 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html                                (rev 0)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;style&gt;
+    #container {
+        width: 50vw;
+        height: 50vh;
+        border: 1px solid black;
+    }
+    #random {
+        width: 50%;
+        background-color: orange;
+    }
+&lt;/style&gt;
+&lt;body&gt;
+    &lt;div id=&quot;container&quot;&gt;
+        &lt;span id=&quot;firstContent&quot;&gt;This is enough text content that it will wrap around in this container. We need lots of it to account for variances in font sizes.&lt;/span&gt;
+        &lt;div id=&quot;random&quot;&gt;
+            This is some content in an inner div.
+        &lt;/div&gt;
+        &lt;span id=&quot;secondContent&quot;&gt;And here is some more content that will also wrap around in this container. We need lots of it to account for variances in font sizes.&lt;/span&gt;
+    &lt;/div&gt;
+&lt;/body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+description(&quot;Test viewport unit sizes work when an anonymous block is involved.&quot;);
+
+function resizeTest(sizes) {
+    if (!sizes.length) {
+        testRunner.notifyDone();
+        return;
+    }
+
+    var size = sizes.shift();
+    var width = size[0];
+    var height = size[1];
+    window.resizeTo(width, height);
+    window.setTimeout(function () {
+        var min = Math.min(window.innerWidth, window.innerHeight);
+        var max = Math.max(window.innerWidth, window.innerHeight);
+        shouldBe(&quot;window.outerWidth&quot;, &quot;&quot; + width);
+        shouldBe(&quot;window.outerHeight&quot;, &quot;&quot; + height);
+        shouldBe(&quot;getComputedStyle(container).width&quot;, &quot;'&quot; + window.innerWidth/2 + &quot;px'&quot;);
+        shouldBe(&quot;getComputedStyle(container).height&quot;, &quot;'&quot; + window.innerHeight/2 + &quot;px'&quot;);
+        shouldBe(&quot;getComputedStyle(random).width&quot;, &quot;'&quot; + window.innerWidth/4 + &quot;px'&quot;);
+        shouldBeGreaterThanOrEqual(&quot;window.innerWidth/2&quot;, &quot;document.getElementById('firstContent').offsetWidth&quot;);
+        shouldBeGreaterThanOrEqual(&quot;window.innerWidth/2&quot;, &quot;document.getElementById('secondContent').offsetWidth&quot;);
+        resizeTest(sizes);
+    }, 0);
+}
+
+resizeTest([[800, 600], [900, 600], [900, 640], [500, 640], [800, 600]]);
+
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthscalcexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-calc-expected.txt (0 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-calc-expected.txt                                (rev 0)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-calc-expected.txt        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Test for calc support with viewport units.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS style.getPropertyValue(&quot;width&quot;) is '400px'
+PASS style.getPropertyValue(&quot;height&quot;) is '450px'
+PASS style.getPropertyValue(&quot;margin-top&quot;) is '160px'
+PASS style.getPropertyValue(&quot;margin-bottom&quot;) is '190px'
+PASS style.getPropertyValue(&quot;margin-left&quot;) is '400px'
+PASS style.getPropertyValue(&quot;margin-right&quot;) is '200px'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthscalchtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-calc.html (0 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-calc.html                                (rev 0)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-calc.html        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;style&gt;
+    body {
+        width: 100vw;
+        height: 100vh;
+    }
+    #target {
+        width: calc(100vw - 50vw);
+        height: calc(25vh + 50vh);
+        margin-top: calc(25vh + 10px);
+        margin-bottom: calc(25vw - 10px);
+        margin-left: calc(25vw + 25%);
+        margin-right: calc(50vw - 25%);
+    }
+&lt;/style&gt;
+&lt;html&gt;
+    &lt;div id=&quot;target&quot;&gt;&lt;/div&gt;
+&lt;/html&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function vw(x) {
+    return x * window.innerWidth / 100;
+}
+
+function vh(x) {
+    return x * window.innerHeight / 100;
+}
+
+function px(n) {
+    return &quot;'&quot; + n + &quot;px'&quot;;
+}
+
+if (window.testRunner)
+    testRunner.dumpAsText();
+
+description(&quot;Test for calc support with viewport units.&quot;);
+
+target = document.getElementById(&quot;target&quot;);
+style = window.getComputedStyle(target,null);
+shouldBe('style.getPropertyValue(&quot;width&quot;)', px(vw(100) - vw(50)));
+shouldBe('style.getPropertyValue(&quot;height&quot;)', px(vh(25) + vh(50)));
+shouldBe('style.getPropertyValue(&quot;margin-top&quot;)', px(vh(25) + 10));
+shouldBe('style.getPropertyValue(&quot;margin-bottom&quot;)', px(vw(25) - 10));
+shouldBe('style.getPropertyValue(&quot;margin-left&quot;)', px(vw(25) + vw(25)));
+shouldBe('style.getPropertyValue(&quot;margin-right&quot;)', px(vw(50) - vw(25)));
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthspercentsizechildexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child-expected.txt (0 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child-expected.txt                                (rev 0)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child-expected.txt        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+Test that percentage dimensions work in a child with a parent with viewport unit dimensions.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS window.outerWidth is 800
+PASS window.outerHeight is 600
+PASS getComputedStyle(container).width is '400px'
+PASS getComputedStyle(container).height is '300px'
+PASS getComputedStyle(percent).width is '200px'
+PASS getComputedStyle(percent).height is '150px'
+PASS window.outerWidth is 900
+PASS window.outerHeight is 600
+PASS getComputedStyle(container).width is '400px'
+PASS getComputedStyle(container).height is '300px'
+PASS getComputedStyle(percent).width is '200px'
+PASS getComputedStyle(percent).height is '150px'
+PASS window.outerWidth is 900
+PASS window.outerHeight is 640
+PASS getComputedStyle(container).width is '400px'
+PASS getComputedStyle(container).height is '300px'
+PASS getComputedStyle(percent).width is '200px'
+PASS getComputedStyle(percent).height is '150px'
+PASS window.outerWidth is 500
+PASS window.outerHeight is 640
+PASS getComputedStyle(container).width is '400px'
+PASS getComputedStyle(container).height is '300px'
+PASS getComputedStyle(percent).width is '200px'
+PASS getComputedStyle(percent).height is '150px'
+PASS window.outerWidth is 800
+PASS window.outerHeight is 600
+PASS getComputedStyle(container).width is '400px'
+PASS getComputedStyle(container).height is '300px'
+PASS getComputedStyle(percent).width is '200px'
+PASS getComputedStyle(percent).height is '150px'
+
</ins></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthspercentsizechildhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html (0 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html                                (rev 0)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;style&gt;
+    #container {
+        width: 50vw;
+        height: 50vh;
+    }
+    #percent {
+        width: 50%;
+        height: 50%;
+    }
+&lt;/style&gt;
+&lt;body&gt;
+    &lt;div id=&quot;container&quot;&gt;
+        &lt;div id=&quot;percent&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/resize-test.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description(&quot;Test that percentage dimensions work in a child with a parent with viewport unit dimensions.&quot;);
+
+standardResizeTest(function (sizes) {
+    shouldBe(&quot;getComputedStyle(container).width&quot;, &quot;'&quot; + window.innerWidth/2 + &quot;px'&quot;);
+    shouldBe(&quot;getComputedStyle(container).height&quot;, &quot;'&quot; + window.innerHeight/2 + &quot;px'&quot;);
+    shouldBe(&quot;getComputedStyle(percent).width&quot;, &quot;'&quot; + window.innerWidth/4 + &quot;px'&quot;);
+    shouldBe(&quot;getComputedStyle(percent).height&quot;, &quot;'&quot; + window.innerHeight/4 + &quot;px'&quot;);
+});
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsrelativefontsizeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt (0 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt                                (rev 0)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+Test that relative font sizes work when the parent is in viewport units.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS window.outerWidth is 800
+PASS window.outerHeight is 600
+PASS getComputedStyle(container).fontSize is '40px'
+PASS getComputedStyle(ems).fontSize is '160px'
+PASS getComputedStyle(percent).fontSize is '20px'
+PASS window.outerWidth is 900
+PASS window.outerHeight is 600
+PASS getComputedStyle(container).fontSize is '40px'
+PASS getComputedStyle(ems).fontSize is '160px'
+PASS getComputedStyle(percent).fontSize is '20px'
+PASS window.outerWidth is 900
+PASS window.outerHeight is 640
+PASS getComputedStyle(container).fontSize is '40px'
+PASS getComputedStyle(ems).fontSize is '160px'
+PASS getComputedStyle(percent).fontSize is '20px'
+PASS window.outerWidth is 500
+PASS window.outerHeight is 640
+PASS getComputedStyle(container).fontSize is '40px'
+PASS getComputedStyle(ems).fontSize is '160px'
+PASS getComputedStyle(percent).fontSize is '20px'
+PASS window.outerWidth is 800
+PASS window.outerHeight is 600
+PASS getComputedStyle(container).fontSize is '40px'
+PASS getComputedStyle(ems).fontSize is '160px'
+PASS getComputedStyle(percent).fontSize is '20px'
+
</ins></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsrelativefontsizehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html (0 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html                                (rev 0)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;style&gt;
+    #container {
+        font-size: 5vw;
+    }
+    #ems {
+        font-size: 4em;
+    }
+    #percent {
+        font-size: 50%;
+    }
+&lt;/style&gt;
+&lt;body&gt;
+    &lt;div id=&quot;container&quot;&gt;
+        &lt;div id=&quot;ems&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;percent&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/resize-test.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description(&quot;Test that relative font sizes work when the parent is in viewport units.&quot;);
+
+standardResizeTest(function (size) {
+        shouldBe(&quot;getComputedStyle(container).fontSize&quot;, &quot;'&quot; + Math.round(window.innerWidth/20) + &quot;px'&quot;);
+        shouldBe(&quot;getComputedStyle(ems).fontSize&quot;, &quot;'&quot; + Math.round(window.innerWidth/5) + &quot;px'&quot;);
+        shouldBe(&quot;getComputedStyle(percent).fontSize&quot;, &quot;'&quot; + Math.round(window.innerWidth/40) + &quot;px'&quot;);
+});
+
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsresizeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt (0 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt                                (rev 0)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+Test that viewport lengths and font sizes properly resize with the viewport.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS window.outerWidth is 800
+PASS window.outerHeight is 600
+PASS getComputedStyle(test).fontSize is '30px'
+PASS getComputedStyle(test).width is '400px'
+PASS getComputedStyle(testpseudo, ':after').marginLeft is '120px'
+PASS getComputedStyle(testpseudo, ':after').paddingRight is '200px'
+PASS window.outerWidth is 900
+PASS window.outerHeight is 600
+PASS getComputedStyle(test).fontSize is '30px'
+PASS getComputedStyle(test).width is '400px'
+PASS getComputedStyle(testpseudo, ':after').marginLeft is '120px'
+PASS getComputedStyle(testpseudo, ':after').paddingRight is '200px'
+PASS window.outerWidth is 900
+PASS window.outerHeight is 640
+PASS getComputedStyle(test).fontSize is '30px'
+PASS getComputedStyle(test).width is '400px'
+PASS getComputedStyle(testpseudo, ':after').marginLeft is '120px'
+PASS getComputedStyle(testpseudo, ':after').paddingRight is '200px'
+PASS window.outerWidth is 500
+PASS window.outerHeight is 640
+PASS getComputedStyle(test).fontSize is '30px'
+PASS getComputedStyle(test).width is '400px'
+PASS getComputedStyle(testpseudo, ':after').marginLeft is '120px'
+PASS getComputedStyle(testpseudo, ':after').paddingRight is '200px'
+PASS window.outerWidth is 800
+PASS window.outerHeight is 600
+PASS getComputedStyle(test).fontSize is '30px'
+PASS getComputedStyle(test).width is '400px'
+PASS getComputedStyle(testpseudo, ':after').marginLeft is '120px'
+PASS getComputedStyle(testpseudo, ':after').paddingRight is '200px'
+
</ins></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsresizehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html (0 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html                                (rev 0)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;style&gt;
+#test {
+    font-size: 5vh;
+    width: 50vw;
+}
+#testpseudo:after {
+    margin-left: 20vmin;
+    padding-right: 25vmax;
+    content: '';
+}
+&lt;/style&gt;
+&lt;body&gt;
+    &lt;div id=&quot;test&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;testpseudo&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/resize-test.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description(&quot;Test that viewport lengths and font sizes properly resize with the viewport.&quot;);
+standardResizeTest(function (size) {
+        var min = Math.min(window.innerWidth, window.innerHeight);
+        var max = Math.max(window.innerWidth, window.innerHeight);
+        shouldBe(&quot;getComputedStyle(test).fontSize&quot;, &quot;'&quot; + window.innerHeight/20 + &quot;px'&quot;);
+        shouldBe(&quot;getComputedStyle(test).width&quot;, &quot;'&quot; + window.innerWidth/2 + &quot;px'&quot;);
+        shouldBe(&quot;getComputedStyle(testpseudo, ':after').marginLeft&quot;, &quot;'&quot; + min/5 + &quot;px'&quot;);
+        shouldBe(&quot;getComputedStyle(testpseudo, ':after').paddingRight&quot;, &quot;'&quot; + max/4 + &quot;px'&quot;);
+});
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcanvasdrawfocusifneededexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/canvas/draw-focus-if-needed-expected.txt (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/draw-focus-if-needed-expected.txt        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/LayoutTests/fast/canvas/draw-focus-if-needed-expected.txt        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -1,2 +0,0 @@
</span><del>-This test ensures that a focus ring is drawn. 
-TEST PASSED
</del></span></pre></div>
<a id="trunkLayoutTestsfastcanvasdrawfocusifneededhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/canvas/draw-focus-if-needed.html (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/draw-focus-if-needed.html        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/LayoutTests/fast/canvas/draw-focus-if-needed.html        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -1,35 +0,0 @@
</span><del>-This test ensures that a focus ring is drawn.
-&lt;canvas id=&quot;canvas&quot; class=&quot;output&quot; width=&quot;30&quot; height=&quot;30&quot;&gt;
-    &lt;button id=&quot;button1&quot;&gt;&lt;/button&gt;
-&lt;/canvas&gt;
-&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
-if (window.testRunner)
-    testRunner.dumpAsText();
-
-var button1 = document.getElementById(&quot;button1&quot;);
-var canvas = document.getElementById(&quot;canvas&quot;).getContext(&quot;2d&quot;);
-canvas.beginPath();
-canvas.rect(10, 10, 10, 10);
-canvas.drawFocusIfNeeded(button1);
-var imagedata = canvas.getImageData(0, 0, 30, 30);
-var total = 0;
-for(var x = 0; x &lt; 30 * 30 * 4; x++)
-    total += imagedata.data[x];
-
-if (total != 0)
-    document.getElementById(&quot;console&quot;).innerHTML = &quot;TEST PASSED&quot;;
-else
-{
-    button1.focus();
-    canvas.drawFocusIfNeeded(button1);
-    imagedata = canvas.getImageData(0, 0, 30, 30);
-    for(var x = 0; x &lt; 30 * 30* 4; x++)
-        total += imagedata.data[x];
-
-    if (total != 0)
-        document.getElementById(&quot;console&quot;).innerHTML = &quot;TEST PASSED&quot;;
-    else
-        document.getElementById(&quot;console&quot;).innerHTML = &quot;TEST FAILED&quot;;
-}
-&lt;/script&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmaskingparsingclippathshapeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -17,9 +17,9 @@
</span><span class="cx"> PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;circle(1vw at 1vw 1vw)&quot;) is &quot;circle(1vw at 1vw 1vw)&quot;
</span><span class="cx"> PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;circle(1vh at 1vh 1vh)&quot;) is &quot;circle(1vh at 1vh 1vh)&quot;
</span><span class="cx"> PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;circle(1vmin at 1vmin 1vmin)&quot;) is &quot;circle(1vmin at 1vmin 1vmin)&quot;
</span><del>-PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;circle(1.5vw at .5vw 1vw)&quot;) is &quot;circle(1.5vw at 0.5vw 1vw)&quot;
-PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;circle(1.5vh at .5vh 1vh)&quot;) is &quot;circle(1.5vh at 0.5vh 1vh)&quot;
-PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;circle(1.5vmin at .5vmin 1vmin)&quot;) is &quot;circle(1.5vmin at 0.5vmin 1vmin)&quot;
</del><ins>+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;circle(1.5vw at .5vw 1vw)&quot;) is &quot;circle(12px at 4px 8px)&quot;
+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;circle(1.5vh at .5vh 1vh)&quot;) is &quot;circle(9px at 3px 6px)&quot;
+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;circle(1.5vmin at .5vmin 1vmin)&quot;) is &quot;circle(9px at 3px 6px)&quot;
</ins><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;circle(150% at 50% 100%)&quot;) is &quot;circle(150% at 50% 100%)&quot;
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;inset(45% 45% 90% 60% round 25% 10%)&quot;) is &quot;inset(45% 45% 90% 60% round 25% 10%)&quot;
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;ellipse(100% 100% at 100% 100%)&quot;) is &quot;ellipse(100% 100% at 100% 100%)&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsfastmaskingparsingclippathshapehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/masking/parsing-clip-path-shape.html (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/masking/parsing-clip-path-shape.html        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/LayoutTests/fast/masking/parsing-clip-path-shape.html        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -63,9 +63,9 @@
</span><span class="cx"> testInner(&quot;-webkit-clip-path&quot;, &quot;circle(1vh at 1vh 1vh)&quot;, &quot;circle(1vh at 1vh 1vh)&quot;);
</span><span class="cx"> testInner(&quot;-webkit-clip-path&quot;, &quot;circle(1vmin at 1vmin 1vmin)&quot;, &quot;circle(1vmin at 1vmin 1vmin)&quot;);
</span><span class="cx"> 
</span><del>-testComputed(&quot;-webkit-clip-path&quot;, &quot;circle(1.5vw at .5vw 1vw)&quot;, &quot;circle(1.5vw at 0.5vw 1vw)&quot;);
-testComputed(&quot;-webkit-clip-path&quot;, &quot;circle(1.5vh at .5vh 1vh)&quot;, &quot;circle(1.5vh at 0.5vh 1vh)&quot;);
-testComputed(&quot;-webkit-clip-path&quot;, &quot;circle(1.5vmin at .5vmin 1vmin)&quot;, &quot;circle(1.5vmin at 0.5vmin 1vmin)&quot;);
</del><ins>+testComputed(&quot;-webkit-clip-path&quot;, &quot;circle(1.5vw at .5vw 1vw)&quot;, &quot;circle(12px at 4px 8px)&quot;);
+testComputed(&quot;-webkit-clip-path&quot;, &quot;circle(1.5vh at .5vh 1vh)&quot;, &quot;circle(9px at 3px 6px)&quot;);
+testComputed(&quot;-webkit-clip-path&quot;, &quot;circle(1.5vmin at .5vmin 1vmin)&quot;, &quot;circle(9px at 3px 6px)&quot;);
</ins><span class="cx"> 
</span><span class="cx"> // percentage lengths - units
</span><span class="cx"> testComputed(&quot;-webkit-clip-path&quot;, &quot;circle(150% at 50% 100%)&quot;, &quot;circle(150% at 50% 100%)&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsfastshapesparsingparsingshapelengthsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths-expected.txt (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths-expected.txt        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths-expected.txt        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -22,9 +22,9 @@
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(1vw at 1vw 1vw)&quot;) is &quot;circle(1vw at 1vw 1vw)&quot;
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(1vh at 1vh 1vh)&quot;) is &quot;circle(1vh at 1vh 1vh)&quot;
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(1vmin at 1vmin 1vmin)&quot;) is &quot;circle(1vmin at 1vmin 1vmin)&quot;
</span><del>-PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(1.5vw at .5vw 1vw)&quot;) is &quot;circle(1.5vw at 0.5vw 1vw)&quot;
-PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(1.5vh at .5vh 1vh)&quot;) is &quot;circle(1.5vh at 0.5vh 1vh)&quot;
-PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(1.5vmin at .5vmin 1vmin)&quot;) is &quot;circle(1.5vmin at 0.5vmin 1vmin)&quot;
</del><ins>+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(1.5vw at .5vw 1vw)&quot;) is &quot;circle(12px at 4px 8px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(1.5vh at .5vh 1vh)&quot;) is &quot;circle(9px at 3px 6px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(1.5vmin at .5vmin 1vmin)&quot;) is &quot;circle(9px at 3px 6px)&quot;
</ins><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(100% at 100% 100%)&quot;) is &quot;circle(100% at 100% 100%)&quot;
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(45% 45% 90% 60% round 25% 10%)&quot;) is &quot;inset(45% 45% 90% 60% round 25% 10%)&quot;
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(100% 100% at 100% 100%)&quot;) is &quot;ellipse(100% 100% at 100% 100%)&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsfastshapesparsingparsingshapelengthshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths.html (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths.html        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths.html        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -64,9 +64,9 @@
</span><span class="cx"> testStyleValue(&quot;circle(1vh at 1vh 1vh)&quot;, &quot;circle(1vh at 1vh 1vh)&quot;);
</span><span class="cx"> testStyleValue(&quot;circle(1vmin at 1vmin 1vmin)&quot;, &quot;circle(1vmin at 1vmin 1vmin)&quot;);
</span><span class="cx"> 
</span><del>-testComputedStyleValue(&quot;circle(1.5vw at .5vw 1vw)&quot;, &quot;circle(1.5vw at 0.5vw 1vw)&quot;);
-testComputedStyleValue(&quot;circle(1.5vh at .5vh 1vh)&quot;, &quot;circle(1.5vh at 0.5vh 1vh)&quot;);
-testComputedStyleValue(&quot;circle(1.5vmin at .5vmin 1vmin)&quot;, &quot;circle(1.5vmin at 0.5vmin 1vmin)&quot;);
</del><ins>+testComputedStyleValue(&quot;circle(1.5vw at .5vw 1vw)&quot;, &quot;circle(12px at 4px 8px)&quot;);
+testComputedStyleValue(&quot;circle(1.5vh at .5vh 1vh)&quot;, &quot;circle(9px at 3px 6px)&quot;);
+testComputedStyleValue(&quot;circle(1.5vmin at .5vmin 1vmin)&quot;, &quot;circle(9px at 3px 6px)&quot;);
</ins><span class="cx"> 
</span><span class="cx"> // percentage lengths - units
</span><span class="cx"> testStyleValue(&quot;circle(100% at 100% 100%)&quot;, &quot;circle(100% at 100% 100%)&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/ChangeLog        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -1,3 +1,289 @@
</span><ins>+2014-05-27  Bem Jones-Bey  &lt;bjonesbe@adobe.com&gt;
+
+        vw/vh units used as font/line-height values don't scale with the viewport
+        https://bugs.webkit.org/show_bug.cgi?id=87846
+
+        Reviewed by Darin Adler.
+
+        This patch moves the resolution of viewport units to style recalc
+        time. Currently viewport units are left unresolved during style
+        recalcs, which leads to many problems with viewport units. Moving the
+        resolution will fix these problems, as well as reduce the plumbing
+        that goes on.
+
+        This patch touches a lot of files since the valueForLength functions
+        no longer need a RenderView. The interesting changes are in:
+
+        - CSSToLengthConversionData -&gt; CSSPrimitiveValue: for moving
+            resolution to style recalc time.
+        - Length / LengthFunctions: no longer needs to know about viewport
+            units.
+        - FrameView -&gt; Document -&gt; StyleResolver: for scheduling style recalcs
+            upon resize
+
+        Note that getComputedStyle will now return pixel values when viewport
+        units are used. This behavior matches Firefox and the css3-cascade
+        spec.
+
+        This is based on a Blink patch by timloh@chromium.org.
+
+        Tests: css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html
+               css3/viewport-percentage-lengths/viewport-percentage-lengths-calc.html
+               css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html
+               css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html
+               css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html
+
+        * WebCore.exp.in: Remove RenderView argument to floatValueForLength.
+        * accessibility/atk/WebKitAccessibleInterfaceText.cpp: 
+        (getAttributeSetForAccessibilityObject): Remove RenderView argument.
+        * css/BasicShapeFunctions.cpp:
+        (WebCore::convertToLength): Ditto.
+        (WebCore::floatValueForCenterCoordinate): Ditto.
+        * css/BasicShapeFunctions.h: Ditto.
+        * css/CSSCalculationValue.cpp:
+        (WebCore::unitCategory): Remove special handling for viewport units,
+            as they get resolved to pixels.
+        (WebCore::createCSS): Ditto.
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::positionOffsetValue): Remove RendewView argument.
+        (WebCore::getBorderRadiusCornerValues): Remove handling of viewport
+            units, as they are already resolve to pixels here.
+        (WebCore::getBorderRadiusCornerValue): Remove RenderView argument.
+        (WebCore::getBorderRadiusShorthandValue): Ditto.
+        (WebCore::specifiedValueForGridTrackBreadth): Remove handling of
+            viewport units, as they are already resolved to pixels here.
+        (WebCore::specifiedValueForGridTrackSize): Remove RenderView argument.
+        (WebCore::valueForGridTrackList): Ditto.
+        (WebCore::lineHeightFromStyle): Ditto.
+        (WebCore::ComputedStyleExtractor::propertyValue): Ditto.
+        * css/CSSGradientValue.cpp:
+        (WebCore::CSSLinearGradientValue::createGradient): Pass RenderView to
+            CSSToLengthConversionData constructor.
+        (WebCore::CSSRadialGradientValue::createGradient): Ditto.
+        * css/CSSPrimitiveValue.cpp:
+        (WebCore::CSSPrimitiveValue::unitCategory): Remove handling of
+            viewport units, as they get resolved to pixels.
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Ditto.
+        (WebCore::CSSPrimitiveValue::init): Ditto.
+        (WebCore::CSSPrimitiveValue::computeLengthDouble): Resolve viewport
+            units to pixels.
+        (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory): Remove
+        handling of viewport units, since they get resolved to pixels.
+        (WebCore::CSSPrimitiveValue::viewportPercentageLength): Deleted.
+        * css/CSSPrimitiveValue.h:
+        (WebCore::CSSPrimitiveValue::isLength): Remove special handling of
+            viewport units, since they get resolved to pixels.
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::convertToLength): Ditto.
+        * css/CSSToLengthConversionData.cpp:
+        (WebCore::CSSToLengthConversionData::viewportWidthFactor): Caclulate
+            conversion factor for viewport units to pixels. Note this does not
+            set hasViewportUnits on the RenderStyle if computing the font
+            size, because in the font size case, the RenderStyle is the
+            parent's style, not the current renderer's style.
+        (WebCore::CSSToLengthConversionData::viewportHeightFactor): Ditto.
+        (WebCore::CSSToLengthConversionData::viewportMinFactor): Ditto.
+        (WebCore::CSSToLengthConversionData::viewportMaxFactor): Ditto.
+        * css/CSSToLengthConversionData.h:
+        (WebCore::CSSToLengthConversionData::CSSToLengthConversionData): Add
+            RenderView parameter, and make RenderStyle non-const so that
+            hasViewportUnits can be set on the Style..
+        (WebCore::CSSToLengthConversionData::style): style is now non-const.
+        (WebCore::CSSToLengthConversionData::copyWithAdjustedZoom): Handle
+            RenderView argument.
+        * css/CSSToStyleMap.cpp:
+        (WebCore::CSSToStyleMap::mapFillXPosition): Remove handling of
+            viewport units, as they are already resolved to pixels here.
+        (WebCore::CSSToStyleMap::mapFillYPosition): Ditto.
+        * css/DeprecatedStyleBuilder.cpp:
+        (WebCore::ApplyPropertyLength::applyValue): Ditto.
+        (WebCore::ApplyPropertyBorderRadius::applyValue): Ditto.
+        (WebCore::ApplyPropertyComputeLength::applyValue): Ditto.
+        (WebCore::ApplyPropertyFontSize::applyValue): Ditto.
+        (WebCore::ApplyPropertyLineHeight::applyValue): Ditto.
+        (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): Ditto.
+        (WebCore::ApplyPropertyWordSpacing::applyValue): Ditto.
+        (WebCore::ApplyPropertyVerticalAlign::applyValue): Ditto.
+        (WebCore::ApplyPropertyTextIndent::applyValue): Ditto.
+        * css/LengthFunctions.cpp:
+        (WebCore::minimumIntValueForLength): Remove RenderView argument.
+        (WebCore::intValueForLength): Remove RenderView argument and
+            roundPecentages.
+        (WebCore::minimumValueForLength): Remove RenderView argument, and
+            special handling of viewport units.
+        (WebCore::valueForLength): Ditto.
+        (WebCore::floatValueForLength): Ditto.
+        (WebCore::floatSizeForLengthSize): Remove RenderView argument.
+        * css/LengthFunctions.h: Ditto.
+        * css/MediaQueryEvaluator.cpp:
+        (WebCore::MediaQueryEvaluator::eval): Add RenderView argument for
+            CSSToLengthConversionData constuctor.
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::State::clear): Change to 0 arg constructor
+            for CSSToLengthConversionData.
+        (WebCore::StyleResolver::State::updateConversionData): In order to get
+            the RenderView, we need to have a valid Element set on the state.
+            Since this means that we need to set the conversion data in more
+            places, move the contruction of conversion data into this helper
+            method.
+        (WebCore::StyleResolver::State::initElement): Make sure conversion
+            data is up to date.
+        (WebCore::StyleResolver::State::initForStyleResolve): Ditto.
+        (WebCore::StyleResolver::State::setStyle): When the style is set, we
+            need to make sure to update the conversion data.
+        (WebCore::StyleResolver::styleForElement): If the style has viewport
+            units, flage the document so that we can make sure to recalc the
+            viewport unit values when the viewport is resized.
+        (WebCore::StyleResolver::pseudoStyleForElement): Ditto.
+        (WebCore::StyleResolver::updateFont): Make sure the font having
+            viewport units updates the style.
+        (WebCore::StyleResolver::convertToIntLength): Remove handling of
+        viewport units, as they are resolved to pixels.
+        (WebCore::StyleResolver::convertToFloatLength): Ditto.
+        (WebCore::StyleResolver::clearCachedPropertiesAffectedByViewportUnits):
+            Invalidate the matched properties cache for styles with viewport
+            units when the viewport is resized.
+        (WebCore::createGridTrackBreadth): Remove handling of viewport units,
+            as they are resolved to pixels.
+        (WebCore::StyleResolver::applyProperty): Ditto.
+        (WebCore::StyleResolver::hasMediaQueriesAffectedByViewportChange):
+            Rename to be less confusing, since it has nothing to do with
+            viewport units.
+        (WebCore::StyleResolver::createFilterOperations): Remove handling of
+            viewport units, as they are resolved to pixels.
+        (WebCore::StyleResolver::affectedByViewportChange): Deleted.
+        (WebCore::StyleResolver::viewportPercentageValue): Deleted.
+        * css/StyleResolver.h:
+        (WebCore::StyleResolver::State::State): C++11 cleanup: 0 -&gt; nullptr.
+        (WebCore::StyleResolver::State::setFontSizeHasViewportUnits): Set if
+            the font size is specified in viewport units.
+        (WebCore::StyleResolver::State::fontSizeHasViewportUnits): Ditto.
+        (WebCore::StyleResolver::State::setStyle): Deleted.
+        * css/TransformFunctions.cpp:
+        (WebCore::convertToFloatLength): Remove handling of viewport units,
+            since they are resolved to pixels.
+        * dom/Document.cpp:
+        (WebCore::Document::Document): Add flag to determine if some style in
+            the document has viewport units.
+        (WebCore::Document::pageSizeAndMarginsInPixels): Remove RenderView
+            argument.
+        (WebCore::Document::updateViewportUnitsOnResize): Mark elements with
+            viewport units for style recalc when the viewport size has
+            changed.
+        * dom/Document.h:
+        (WebCore::Document::setHasStyleWithViewportUnits): Flag to determine
+            if some style in the document has viewport units.
+        (WebCore::Document::hasStyleWithViewportUnits): Ditto.
+        * html/HTMLAreaElement.cpp:
+        (WebCore::HTMLAreaElement::getRegion): Remove RenderView argument.
+        * page/FrameView.cpp:
+        (WebCore::FrameView::layout): When the viewport is resized, call
+            updateViewportUnitsOnResize on the document.
+        * platform/Length.h:
+        (WebCore::Length::isSpecified): Remove handling of viewport units,
+            since they are now resolved to pixels.
+        (WebCore::Length::viewportPercentageLength): Deleted.
+        (WebCore::Length::isViewportPercentage): Deleted.
+        * rendering/ClipPathOperation.h:
+        (WebCore::ShapeClipPathOperation::pathForReferenceRect): Remove
+            RenderView argument.
+        (WebCore::BoxClipPathOperation::pathForReferenceRect): Ditto.
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::updateBlockChildDirtyBitsBeforeLayout): Remove
+            handling of viewport units, since they get updated by
+            updateViewportUnitsOnResize when the viewport is resized.
+        (WebCore::RenderBlock::nodeAtPoint): Remove RenderView argument.
+        (WebCore::RenderBlock::lineHeight): Ditto.
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::paintBoxDecorations): Remove RenderView argument.
+        (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
+            Remove handling of viewport units, as they are resolved to pixels.
+        (WebCore::RenderBox::computePercentageLogicalHeight): Ditto.
+        (WebCore::RenderBox::computeReplacedLogicalWidthUsing): Ditto.
+        (WebCore::RenderBox::computeReplacedLogicalHeightUsing): Ditto.
+        (WebCore::RenderBox::hasViewportPercentageLogicalHeight): Deleted.
+        * rendering/RenderBox.h:
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::getBackgroundRoundedRect): Remove
+            RenderView argument.
+        (WebCore::RenderBoxModelObject::calculateFillTileSize): Remove
+            handling of viewport units, as they are resolved to pixels.
+        (WebCore::computeBorderImageSide): Remove RenderView argument.
+        (WebCore::RenderBoxModelObject::paintNinePieceImage): Ditto.
+        (WebCore::RenderBoxModelObject::paintBorder): Ditto.
+        (WebCore::RenderBoxModelObject::paintBoxShadow): Ditto.
+        * rendering/RenderElement.cpp:
+        (WebCore::RenderElement::repaintAfterLayoutIfNeeded): Ditto.
+        * rendering/RenderElement.h:
+        (WebCore::RenderElement::valueForLength): Remove unused
+            roundPercentages argument.
+        (WebCore::RenderElement::minimumValueForLength): Remove unused
+            RoundPercentages and RenderView arguments.
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::layoutGridItems): Remove handling of viewport
+            units as they are resolved to pixels.
+        * rendering/RenderInline.cpp:
+        (WebCore::computeMargin): Ditto.
+        (WebCore::RenderInline::lineHeight): Remove RenderView argument.
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::setupClipPath): Ditto.
+        * rendering/RenderLineBreak.cpp:
+        (WebCore::RenderLineBreak::lineHeight): Ditto.
+        * rendering/RenderScrollbarPart.cpp:
+        (WebCore::calcScrollbarThicknessUsing): Ditto.
+        (WebCore::RenderScrollbarPart::computeScrollbarWidth): Ditto.
+        (WebCore::RenderScrollbarPart::computeScrollbarHeight): Ditto.
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
+            Remove handling of viewport units, since they are resolved to
+            pixels.
+        (WebCore::RenderTable::computePreferredLogicalWidths): Now that
+            viewport unit values are resolved to pixels at style recalc time,
+            no special checking is needed to handle them, so update the
+            comment to reflect that.
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::applyCommonButtonPaddingToStyle): Add RenderView argument to
+            CSSToLengthConversionData constructor.
+        (WebCore::RenderThemeIOS::adjustButtonStyle): Ditto.
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::paintMenuListButtonGradients): Remove
+            RenderView argument.
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::layout): Remove handling of viewport units,
+            since they are resolved to pixels.
+        * rendering/RootInlineBox.cpp:
+        (WebCore::RootInlineBox::ascentAndDescentForBox): Remove RenderView
+            argument.
+        * rendering/shapes/Shape.cpp:
+        (WebCore::Shape::createShape): Remove RenderView argument.
+        * rendering/shapes/Shape.h:
+        * rendering/shapes/ShapeOutsideInfo.cpp:
+        (WebCore::ShapeOutsideInfo::computedShape): Ditto.
+        * rendering/style/BasicShapes.cpp:
+        (WebCore::BasicShapeCircle::floatValueForRadiusInBox): Ditto.
+        (WebCore::BasicShapeCircle::path): Ditto.
+        (WebCore::BasicShapeEllipse::floatValueForRadiusInBox): Ditto.
+        (WebCore::BasicShapeEllipse::path): Ditto.
+        (WebCore::BasicShapePolygon::path): Ditto.
+        (WebCore::floatSizeForLengthSize): Ditto.
+        (WebCore::BasicShapeInset::path): Ditto.
+        * rendering/style/BasicShapes.h:
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::calcRadiiFor): Ditto.
+        (WebCore::RenderStyle::getRoundedBorderFor): Ditto.
+        (WebCore::RenderStyle::computedLineHeight): Remove handling of
+            viewport units since they are resolved to pixels.
+        * rendering/style/RenderStyle.h:
+        (WebCore::RenderStyle::setHasViewportUnits): Set if this style has
+        a property set with viewport units.
+        (WebCore::RenderStyle::hasViewportUnits): Ditto.
+        * rendering/svg/RenderSVGRoot.cpp:
+        (WebCore::resolveLengthAttributeForSVG): Remove RenderView argument.
+        (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): Ditto.
+        (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Ditto.
+        * rendering/svg/SVGRenderingContext.cpp:
+        (WebCore::SVGRenderingContext::prepareToRenderSVGContent): Ditto.
+
</ins><span class="cx"> 2014-05-27  Zoltan Horvath  &lt;zoltan@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSS Shapes] serialization of the computed value should omit the default radii
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -824,7 +824,7 @@
</span><span class="cx"> __ZN7WebCore19TextResourceDecoderC1ERKN3WTF6StringERKNS_12TextEncodingEb
</span><span class="cx"> __ZN7WebCore19TextResourceDecoderD1Ev
</span><span class="cx"> __ZN7WebCore19enclosingLayoutRectERKNS_9FloatRectE
</span><del>-__ZN7WebCore19floatValueForLengthERKNS_6LengthEfPNS_10RenderViewE
</del><ins>+__ZN7WebCore19floatValueForLengthERKNS_6LengthEf
</ins><span class="cx"> __ZN7WebCore19getFileCreationTimeERKN3WTF6StringERl
</span><span class="cx"> __ZN7WebCore19toInt32EnforceRangeEPN3JSC9ExecStateENS0_7JSValueE
</span><span class="cx"> __ZN7WebCore20ApplicationCacheHost17maybeLoadResourceEPNS_14ResourceLoaderERKNS_15ResourceRequestERKNS_3URLE
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatkWebKitAccessibleInterfaceTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!style-&gt;textIndent().isUndefined()) {
</span><del>-        int indentation = valueForLength(style-&gt;textIndent(), object-&gt;size().width(), &amp;renderer-&gt;view());
</del><ins>+        int indentation = valueForLength(style-&gt;textIndent(), object-&gt;size().width());
</ins><span class="cx">         buffer.reset(g_strdup_printf(&quot;%i&quot;, indentation));
</span><span class="cx">         result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_INDENT), buffer.get());
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorecssBasicShapeFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/BasicShapeFunctions.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/BasicShapeFunctions.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/BasicShapeFunctions.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -36,7 +36,6 @@
</span><span class="cx"> #include &quot;CSSValuePool.h&quot;
</span><span class="cx"> #include &quot;Pair.h&quot;
</span><span class="cx"> #include &quot;RenderStyle.h&quot;
</span><del>-#include &quot;RenderView.h&quot;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -130,7 +129,7 @@
</span><span class="cx"> 
</span><span class="cx"> static Length convertToLength(const CSSToLengthConversionData&amp; conversionData, CSSPrimitiveValue* value)
</span><span class="cx"> {
</span><del>-    return value-&gt;convertToLength&lt;FixedIntegerConversion | FixedFloatConversion | PercentConversion | CalculatedConversion | ViewportPercentageConversion&gt;(conversionData);
</del><ins>+    return value-&gt;convertToLength&lt;FixedIntegerConversion | FixedFloatConversion | PercentConversion | CalculatedConversion&gt;(conversionData);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static LengthSize convertToLengthSize(const CSSToLengthConversionData&amp; conversionData, CSSPrimitiveValue* value)
</span><span class="lines">@@ -265,9 +264,9 @@
</span><span class="cx">     return basicShape.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float floatValueForCenterCoordinate(const BasicShapeCenterCoordinate&amp; center, float boxDimension, RenderView* view)
</del><ins>+float floatValueForCenterCoordinate(const BasicShapeCenterCoordinate&amp; center, float boxDimension)
</ins><span class="cx"> {
</span><del>-    float offset = floatValueForLength(center.length(), boxDimension, view);
</del><ins>+    float offset = floatValueForLength(center.length(), boxDimension);
</ins><span class="cx">     if (center.direction() == BasicShapeCenterCoordinate::TopLeft)
</span><span class="cx">         return offset;
</span><span class="cx">     return boxDimension - offset;
</span></span></pre></div>
<a id="trunkSourceWebCorecssBasicShapeFunctionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/BasicShapeFunctions.h (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/BasicShapeFunctions.h        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/BasicShapeFunctions.h        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -36,16 +36,16 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class CSSBasicShape;
</span><ins>+class CSSToLengthConversionData;
</ins><span class="cx"> class CSSPrimitiveValue;
</span><span class="cx"> class CSSToLengthConversionData;
</span><span class="cx"> class CSSValue;
</span><span class="cx"> class RenderStyle;
</span><del>-class RenderView;
</del><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;CSSValue&gt; valueForBasicShape(const RenderStyle*, const BasicShape*);
</span><span class="cx"> PassRefPtr&lt;BasicShape&gt; basicShapeForValue(const CSSToLengthConversionData&amp;, const CSSBasicShape*);
</span><span class="cx"> 
</span><del>-float floatValueForCenterCoordinate(const BasicShapeCenterCoordinate&amp;, float, RenderView*);
</del><ins>+float floatValueForCenterCoordinate(const BasicShapeCenterCoordinate&amp;, float);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCalculationValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCalculationValue.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCalculationValue.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/CSSCalculationValue.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -66,6 +66,10 @@
</span><span class="cx">     case CSSPrimitiveValue::CSS_PC:
</span><span class="cx">     case CSSPrimitiveValue::CSS_REMS:
</span><span class="cx">     case CSSPrimitiveValue::CSS_CHS:
</span><ins>+    case CSSPrimitiveValue::CSS_VW:
+    case CSSPrimitiveValue::CSS_VH:
+    case CSSPrimitiveValue::CSS_VMIN:
+    case CSSPrimitiveValue::CSS_VMAX:
</ins><span class="cx">         return CalcLength;
</span><span class="cx">     case CSSPrimitiveValue::CSS_PERCENTAGE:
</span><span class="cx">         return CalcPercent;
</span><span class="lines">@@ -721,10 +725,6 @@
</span><span class="cx"> {
</span><span class="cx">     switch (length.type()) {
</span><span class="cx">     case Percent:
</span><del>-    case ViewportPercentageWidth:
-    case ViewportPercentageHeight:
-    case ViewportPercentageMin:
-    case ViewportPercentageMax:
</del><span class="cx">     case Fixed:
</span><span class="cx">         return CSSCalcPrimitiveValue::create(CSSPrimitiveValue::create(length, &amp;style), length.value() == trunc(length.value()));
</span><span class="cx">     case Calculated:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -57,7 +57,6 @@
</span><span class="cx"> #include &quot;Rect.h&quot;
</span><span class="cx"> #include &quot;RenderBox.h&quot;
</span><span class="cx"> #include &quot;RenderStyle.h&quot;
</span><del>-#include &quot;RenderView.h&quot;
</del><span class="cx"> #include &quot;SVGElement.h&quot;
</span><span class="cx"> #include &quot;StyleInheritedData.h&quot;
</span><span class="cx"> #include &quot;StyleProperties.h&quot;
</span><span class="lines">@@ -654,7 +653,7 @@
</span><span class="cx">     return positionList;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; positionOffsetValue(RenderStyle* style, CSSPropertyID propertyID, RenderView* renderView)
</del><ins>+static PassRefPtr&lt;CSSValue&gt; positionOffsetValue(RenderStyle* style, CSSPropertyID propertyID)
</ins><span class="cx"> {
</span><span class="cx">     if (!style)
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -680,8 +679,7 @@
</span><span class="cx">     if (style-&gt;hasOutOfFlowPosition()) {
</span><span class="cx">         if (l.isFixed())
</span><span class="cx">             return zoomAdjustedPixelValue(l.value(), style);
</span><del>-        if (l.isViewportPercentage())
-            return zoomAdjustedPixelValue(valueForLength(l, 0, renderView), style);
</del><ins>+
</ins><span class="cx">         return cssValuePool().createValue(l);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -703,31 +701,31 @@
</span><span class="cx">     return cssValuePool().createColorValue(color.rgb());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRef&lt;CSSValueList&gt; getBorderRadiusCornerValues(const LengthSize&amp; radius, const RenderStyle* style, RenderView* renderView)
</del><ins>+static PassRef&lt;CSSValueList&gt; getBorderRadiusCornerValues(const LengthSize&amp; radius, const RenderStyle* style)
</ins><span class="cx"> {
</span><span class="cx">     auto list = CSSValueList::createSpaceSeparated();
</span><span class="cx">     if (radius.width().isPercentNotCalculated())
</span><span class="cx">         list.get().append(cssValuePool().createValue(radius.width().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
</span><span class="cx">     else
</span><del>-        list.get().append(zoomAdjustedPixelValue(valueForLength(radius.width(), 0, renderView), style));
</del><ins>+        list.get().append(zoomAdjustedPixelValue(valueForLength(radius.width(), 0), style));
</ins><span class="cx">     if (radius.height().isPercentNotCalculated())
</span><span class="cx">         list.get().append(cssValuePool().createValue(radius.height().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
</span><span class="cx">     else
</span><del>-        list.get().append(zoomAdjustedPixelValue(valueForLength(radius.height(), 0, renderView), style));
</del><ins>+        list.get().append(zoomAdjustedPixelValue(valueForLength(radius.height(), 0), style));
</ins><span class="cx">     return list;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRef&lt;CSSValue&gt; getBorderRadiusCornerValue(const LengthSize&amp; radius, const RenderStyle* style, RenderView* renderView)
</del><ins>+static PassRef&lt;CSSValue&gt; getBorderRadiusCornerValue(const LengthSize&amp; radius, const RenderStyle* style)
</ins><span class="cx"> {
</span><span class="cx">     if (radius.width() == radius.height()) {
</span><span class="cx">         if (radius.width().isPercentNotCalculated())
</span><span class="cx">             return cssValuePool().createValue(radius.width().percent(), CSSPrimitiveValue::CSS_PERCENTAGE);
</span><del>-        return zoomAdjustedPixelValue(valueForLength(radius.width(), 0, renderView), style);
</del><ins>+        return zoomAdjustedPixelValue(valueForLength(radius.width(), 0), style);
</ins><span class="cx">     }
</span><del>-    return getBorderRadiusCornerValues(radius, style, renderView);
</del><ins>+    return getBorderRadiusCornerValues(radius, style);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRef&lt;CSSValueList&gt; getBorderRadiusShorthandValue(const RenderStyle* style, RenderView* renderView)
</del><ins>+static PassRef&lt;CSSValueList&gt; getBorderRadiusShorthandValue(const RenderStyle* style)
</ins><span class="cx"> {
</span><span class="cx">     auto list = CSSValueList::createSlashSeparated();
</span><span class="cx">     bool showHorizontalBottomLeft = style-&gt;borderTopRightRadius().width() != style-&gt;borderBottomLeftRadius().width();
</span><span class="lines">@@ -738,10 +736,10 @@
</span><span class="cx">     bool showVerticalBottomRight = showVerticalBottomLeft || (style-&gt;borderBottomRightRadius().height() != style-&gt;borderTopLeftRadius().height());
</span><span class="cx">     bool showVerticalTopRight = showVerticalBottomRight || (style-&gt;borderTopRightRadius().height() != style-&gt;borderTopLeftRadius().height());
</span><span class="cx"> 
</span><del>-    RefPtr&lt;CSSValueList&gt; topLeftRadius = getBorderRadiusCornerValues(style-&gt;borderTopLeftRadius(), style, renderView);
-    RefPtr&lt;CSSValueList&gt; topRightRadius = getBorderRadiusCornerValues(style-&gt;borderTopRightRadius(), style, renderView);
-    RefPtr&lt;CSSValueList&gt; bottomRightRadius = getBorderRadiusCornerValues(style-&gt;borderBottomRightRadius(), style, renderView);
-    RefPtr&lt;CSSValueList&gt; bottomLeftRadius = getBorderRadiusCornerValues(style-&gt;borderBottomLeftRadius(), style, renderView);
</del><ins>+    RefPtr&lt;CSSValueList&gt; topLeftRadius = getBorderRadiusCornerValues(style-&gt;borderTopLeftRadius(), style);
+    RefPtr&lt;CSSValueList&gt; topRightRadius = getBorderRadiusCornerValues(style-&gt;borderTopRightRadius(), style);
+    RefPtr&lt;CSSValueList&gt; bottomRightRadius = getBorderRadiusCornerValues(style-&gt;borderBottomRightRadius(), style);
+    RefPtr&lt;CSSValueList&gt; bottomLeftRadius = getBorderRadiusCornerValues(style-&gt;borderBottomLeftRadius(), style);
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;CSSValueList&gt; horizontalRadii = CSSValueList::createSpaceSeparated();
</span><span class="cx">     horizontalRadii-&gt;append(topLeftRadius-&gt;item(0));
</span><span class="lines">@@ -958,7 +956,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><del>-static PassRef&lt;CSSValue&gt; specifiedValueForGridTrackBreadth(const GridLength&amp; trackBreadth, const RenderStyle* style, RenderView* renderView)
</del><ins>+static PassRef&lt;CSSValue&gt; specifiedValueForGridTrackBreadth(const GridLength&amp; trackBreadth, const RenderStyle* style)
</ins><span class="cx"> {
</span><span class="cx">     if (!trackBreadth.isLength())
</span><span class="cx">         return cssValuePool().createValue(trackBreadth.flex(), CSSPrimitiveValue::CSS_FR);
</span><span class="lines">@@ -966,20 +964,18 @@
</span><span class="cx">     const Length&amp; trackBreadthLength = trackBreadth.length();
</span><span class="cx">     if (trackBreadthLength.isAuto())
</span><span class="cx">         return cssValuePool().createIdentifierValue(CSSValueAuto);
</span><del>-    if (trackBreadthLength.isViewportPercentage())
-        return zoomAdjustedPixelValue(valueForLength(trackBreadthLength, 0, renderView), style);
</del><span class="cx">     return zoomAdjustedPixelValueForLength(trackBreadthLength, style);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; specifiedValueForGridTrackSize(const GridTrackSize&amp; trackSize, const RenderStyle* style, RenderView* renderView)
</del><ins>+static PassRefPtr&lt;CSSValue&gt; specifiedValueForGridTrackSize(const GridTrackSize&amp; trackSize, const RenderStyle* style)
</ins><span class="cx"> {
</span><span class="cx">     switch (trackSize.type()) {
</span><span class="cx">     case LengthTrackSizing:
</span><del>-        return specifiedValueForGridTrackBreadth(trackSize.length(), style, renderView);
</del><ins>+        return specifiedValueForGridTrackBreadth(trackSize.length(), style);
</ins><span class="cx">     case MinMaxTrackSizing:
</span><span class="cx">         RefPtr&lt;CSSValueList&gt; minMaxTrackBreadths = CSSValueList::createCommaSeparated();
</span><del>-        minMaxTrackBreadths-&gt;append(specifiedValueForGridTrackBreadth(trackSize.minTrackBreadth(), style, renderView));
-        minMaxTrackBreadths-&gt;append(specifiedValueForGridTrackBreadth(trackSize.maxTrackBreadth(), style, renderView));
</del><ins>+        minMaxTrackBreadths-&gt;append(specifiedValueForGridTrackBreadth(trackSize.minTrackBreadth(), style));
+        minMaxTrackBreadths-&gt;append(specifiedValueForGridTrackBreadth(trackSize.maxTrackBreadth(), style));
</ins><span class="cx">         return CSSFunctionValue::create(&quot;minmax(&quot;, minMaxTrackBreadths);
</span><span class="cx">     }
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><span class="lines">@@ -998,7 +994,7 @@
</span><span class="cx">     list.append(lineNames.release());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRef&lt;CSSValue&gt; valueForGridTrackList(GridTrackSizingDirection direction, RenderObject* renderer, const RenderStyle* style, RenderView* renderView)
</del><ins>+static PassRef&lt;CSSValue&gt; valueForGridTrackList(GridTrackSizingDirection direction, RenderObject* renderer, const RenderStyle* style)
</ins><span class="cx"> {
</span><span class="cx">     const Vector&lt;GridTrackSize&gt;&amp; trackSizes = direction == ForColumns ? style-&gt;gridColumns() : style-&gt;gridRows();
</span><span class="cx">     const OrderedNamedGridLinesMap&amp; orderedNamedGridLines = direction == ForColumns ? style-&gt;orderedNamedGridColumnLines() : style-&gt;orderedNamedGridRowLines();
</span><span class="lines">@@ -1023,7 +1019,7 @@
</span><span class="cx">     } else {
</span><span class="cx">         for (unsigned i = 0; i &lt; trackSizes.size(); ++i) {
</span><span class="cx">             addValuesForNamedGridLinesAtIndex(orderedNamedGridLines, i, list.get());
</span><del>-            list.get().append(specifiedValueForGridTrackSize(trackSizes[i], style, renderView));
</del><ins>+            list.get().append(specifiedValueForGridTrackSize(trackSizes[i], style));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1449,7 +1445,7 @@
</span><span class="cx">     return list;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRef&lt;CSSPrimitiveValue&gt; lineHeightFromStyle(RenderStyle* style, RenderView* renderView)
</del><ins>+static PassRef&lt;CSSPrimitiveValue&gt; lineHeightFromStyle(RenderStyle* style)
</ins><span class="cx"> {
</span><span class="cx">     Length length = style-&gt;lineHeight();
</span><span class="cx">     if (length.isNegative())
</span><span class="lines">@@ -1461,7 +1457,7 @@
</span><span class="cx">         // that here either.
</span><span class="cx">         return zoomAdjustedPixelValue(static_cast&lt;int&gt;(length.percent() * style-&gt;fontDescription().specifiedSize()) / 100, style);
</span><span class="cx">     }
</span><del>-    return zoomAdjustedPixelValue(floatValueForLength(length, 0, renderView), style);
</del><ins>+    return zoomAdjustedPixelValue(floatValueForLength(length, 0), style);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static PassRef&lt;CSSPrimitiveValue&gt; fontSizeFromStyle(RenderStyle* style)
</span><span class="lines">@@ -1878,7 +1874,7 @@
</span><span class="cx">         case CSSPropertyBorderLeftWidth:
</span><span class="cx">             return zoomAdjustedPixelValue(style-&gt;borderLeftWidth(), style.get());
</span><span class="cx">         case CSSPropertyBottom:
</span><del>-            return positionOffsetValue(style.get(), CSSPropertyBottom, m_node-&gt;document().renderView());
</del><ins>+            return positionOffsetValue(style.get(), CSSPropertyBottom);
</ins><span class="cx">         case CSSPropertyWebkitBoxAlign:
</span><span class="cx">             return cssValuePool().createValue(style-&gt;boxAlign());
</span><span class="cx"> #if ENABLE(CSS_BOX_DECORATION_BREAK)
</span><span class="lines">@@ -2022,7 +2018,7 @@
</span><span class="cx">             computedFont-&gt;variant = fontVariantFromStyle(style.get());
</span><span class="cx">             computedFont-&gt;weight = fontWeightFromStyle(style.get());
</span><span class="cx">             computedFont-&gt;size = fontSizeFromStyle(style.get());
</span><del>-            computedFont-&gt;lineHeight = lineHeightFromStyle(style.get(), m_node-&gt;document().renderView());
</del><ins>+            computedFont-&gt;lineHeight = lineHeightFromStyle(style.get());
</ins><span class="cx">             computedFont-&gt;family = fontFamilyFromStyle(style.get());
</span><span class="cx">             return computedFont.release();
</span><span class="cx">         }
</span><span class="lines">@@ -2063,14 +2059,14 @@
</span><span class="cx">         // depending on the size of the explicit grid or the number of implicit tracks added to the grid. See
</span><span class="cx">         // http://lists.w3.org/Archives/Public/www-style/2013Nov/0014.html
</span><span class="cx">         case CSSPropertyWebkitGridAutoColumns:
</span><del>-            return specifiedValueForGridTrackSize(style-&gt;gridAutoColumns(), style.get(), m_node-&gt;document().renderView());
</del><ins>+            return specifiedValueForGridTrackSize(style-&gt;gridAutoColumns(), style.get());
</ins><span class="cx">         case CSSPropertyWebkitGridAutoRows:
</span><del>-            return specifiedValueForGridTrackSize(style-&gt;gridAutoRows(), style.get(), m_node-&gt;document().renderView());
</del><ins>+            return specifiedValueForGridTrackSize(style-&gt;gridAutoRows(), style.get());
</ins><span class="cx"> 
</span><span class="cx">         case CSSPropertyWebkitGridTemplateColumns:
</span><del>-            return valueForGridTrackList(ForColumns, renderer, style.get(), m_node-&gt;document().renderView());
</del><ins>+            return valueForGridTrackList(ForColumns, renderer, style.get());
</ins><span class="cx">         case CSSPropertyWebkitGridTemplateRows:
</span><del>-            return valueForGridTrackList(ForRows, renderer, style.get(), m_node-&gt;document().renderView());
</del><ins>+            return valueForGridTrackList(ForRows, renderer, style.get());
</ins><span class="cx"> 
</span><span class="cx">         case CSSPropertyWebkitGridColumnStart:
</span><span class="cx">             return valueForGridPosition(style-&gt;gridItemColumnStart());
</span><span class="lines">@@ -2141,7 +2137,7 @@
</span><span class="cx">             return cssValuePool().createValue(style-&gt;imageResolution(), CSSPrimitiveValue::CSS_DPPX);
</span><span class="cx"> #endif
</span><span class="cx">         case CSSPropertyLeft:
</span><del>-            return positionOffsetValue(style.get(), CSSPropertyLeft, m_node-&gt;document().renderView());
</del><ins>+            return positionOffsetValue(style.get(), CSSPropertyLeft);
</ins><span class="cx">         case CSSPropertyLetterSpacing:
</span><span class="cx">             if (!style-&gt;letterSpacing())
</span><span class="cx">                 return cssValuePool().createIdentifierValue(CSSValueNormal);
</span><span class="lines">@@ -2151,7 +2147,7 @@
</span><span class="cx">                 return cssValuePool().createIdentifierValue(CSSValueNone);
</span><span class="cx">             return cssValuePool().createValue(style-&gt;lineClamp().value(), style-&gt;lineClamp().isPercentage() ? CSSPrimitiveValue::CSS_PERCENTAGE : CSSPrimitiveValue::CSS_NUMBER);
</span><span class="cx">         case CSSPropertyLineHeight:
</span><del>-            return lineHeightFromStyle(style.get(), m_node-&gt;document().renderView());
</del><ins>+            return lineHeightFromStyle(style.get());
</ins><span class="cx">         case CSSPropertyListStyleImage:
</span><span class="cx">             if (style-&gt;listStyleImage())
</span><span class="cx">                 return style-&gt;listStyleImage()-&gt;cssValue();
</span><span class="lines">@@ -2171,11 +2167,11 @@
</span><span class="cx">             if (marginRight.isFixed() || !renderer || !renderer-&gt;isBox())
</span><span class="cx">                 return zoomAdjustedPixelValueForLength(marginRight, style.get());
</span><span class="cx">             float value;
</span><del>-            if (marginRight.isPercent() || marginRight.isViewportPercentage()) {
</del><ins>+            if (marginRight.isPercent()) {
</ins><span class="cx">                 // RenderBox gives a marginRight() that is the distance between the right-edge of the child box
</span><span class="cx">                 // and the right-edge of the containing box, when display == BLOCK. Let's calculate the absolute
</span><span class="cx">                 // value of the specified margin-right % instead of relying on RenderBox's marginRight() value.
</span><del>-                value = minimumValueForLength(marginRight, toRenderBox(renderer)-&gt;containingBlockLogicalWidthForContent(), m_node-&gt;document().renderView());
</del><ins>+                value = minimumValueForLength(marginRight, toRenderBox(renderer)-&gt;containingBlockLogicalWidthForContent());
</ins><span class="cx">             } else
</span><span class="cx">                 value = toRenderBox(renderer)-&gt;marginRight();
</span><span class="cx">             return zoomAdjustedPixelValue(value, style.get());
</span><span class="lines">@@ -2266,7 +2262,7 @@
</span><span class="cx">         case CSSPropertyPosition:
</span><span class="cx">             return cssValuePool().createValue(style-&gt;position());
</span><span class="cx">         case CSSPropertyRight:
</span><del>-            return positionOffsetValue(style.get(), CSSPropertyRight, m_node-&gt;document().renderView());
</del><ins>+            return positionOffsetValue(style.get(), CSSPropertyRight);
</ins><span class="cx">         case CSSPropertyWebkitRubyPosition:
</span><span class="cx">             return cssValuePool().createValue(style-&gt;rubyPosition());
</span><span class="cx">         case CSSPropertyTableLayout:
</span><span class="lines">@@ -2367,7 +2363,7 @@
</span><span class="cx">         case CSSPropertyTextTransform:
</span><span class="cx">             return cssValuePool().createValue(style-&gt;textTransform());
</span><span class="cx">         case CSSPropertyTop:
</span><del>-            return positionOffsetValue(style.get(), CSSPropertyTop, m_node-&gt;document().renderView());
</del><ins>+            return positionOffsetValue(style.get(), CSSPropertyTop);
</ins><span class="cx">         case CSSPropertyUnicodeBidi:
</span><span class="cx">             return cssValuePool().createValue(style-&gt;unicodeBidi());
</span><span class="cx">         case CSSPropertyVerticalAlign:
</span><span class="lines">@@ -2633,9 +2629,8 @@
</span><span class="cx">                 if (renderer-&gt;isBox())
</span><span class="cx">                     box = toRenderBox(renderer)-&gt;borderBoxRect();
</span><span class="cx"> 
</span><del>-                RenderView* renderView = m_node-&gt;document().renderView();
-                list-&gt;append(zoomAdjustedPixelValue(minimumValueForLength(style-&gt;perspectiveOriginX(), box.width(), renderView), style.get()));
-                list-&gt;append(zoomAdjustedPixelValue(minimumValueForLength(style-&gt;perspectiveOriginY(), box.height(), renderView), style.get()));
</del><ins>+                list-&gt;append(zoomAdjustedPixelValue(minimumValueForLength(style-&gt;perspectiveOriginX(), box.width()), style.get()));
+                list-&gt;append(zoomAdjustedPixelValue(minimumValueForLength(style-&gt;perspectiveOriginY(), box.height()), style.get()));
</ins><span class="cx">             }
</span><span class="cx">             else {
</span><span class="cx">                 list-&gt;append(zoomAdjustedPixelValueForLength(style-&gt;perspectiveOriginX(), style.get()));
</span><span class="lines">@@ -2665,13 +2660,13 @@
</span><span class="cx">         case CSSPropertyWebkitUserSelect:
</span><span class="cx">             return cssValuePool().createValue(style-&gt;userSelect());
</span><span class="cx">         case CSSPropertyBorderBottomLeftRadius:
</span><del>-            return getBorderRadiusCornerValue(style-&gt;borderBottomLeftRadius(), style.get(), m_node-&gt;document().renderView());
</del><ins>+            return getBorderRadiusCornerValue(style-&gt;borderBottomLeftRadius(), style.get());
</ins><span class="cx">         case CSSPropertyBorderBottomRightRadius:
</span><del>-            return getBorderRadiusCornerValue(style-&gt;borderBottomRightRadius(), style.get(), m_node-&gt;document().renderView());
</del><ins>+            return getBorderRadiusCornerValue(style-&gt;borderBottomRightRadius(), style.get());
</ins><span class="cx">         case CSSPropertyBorderTopLeftRadius:
</span><del>-            return getBorderRadiusCornerValue(style-&gt;borderTopLeftRadius(), style.get(), m_node-&gt;document().renderView());
</del><ins>+            return getBorderRadiusCornerValue(style-&gt;borderTopLeftRadius(), style.get());
</ins><span class="cx">         case CSSPropertyBorderTopRightRadius:
</span><del>-            return getBorderRadiusCornerValue(style-&gt;borderTopRightRadius(), style.get(), m_node-&gt;document().renderView());
</del><ins>+            return getBorderRadiusCornerValue(style-&gt;borderTopRightRadius(), style.get());
</ins><span class="cx">         case CSSPropertyClip: {
</span><span class="cx">             if (!style-&gt;hasClip())
</span><span class="cx">                 return cssValuePool().createIdentifierValue(CSSValueAuto);
</span><span class="lines">@@ -2693,9 +2688,8 @@
</span><span class="cx">                 if (renderer-&gt;isBox())
</span><span class="cx">                     box = toRenderBox(renderer)-&gt;borderBoxRect();
</span><span class="cx"> 
</span><del>-                RenderView* renderView = m_node-&gt;document().renderView();
-                list-&gt;append(zoomAdjustedPixelValue(minimumValueForLength(style-&gt;transformOriginX(), box.width(), renderView), style.get()));
-                list-&gt;append(zoomAdjustedPixelValue(minimumValueForLength(style-&gt;transformOriginY(), box.height(), renderView), style.get()));
</del><ins>+                list-&gt;append(zoomAdjustedPixelValue(minimumValueForLength(style-&gt;transformOriginX(), box.width()), style.get()));
+                list-&gt;append(zoomAdjustedPixelValue(minimumValueForLength(style-&gt;transformOriginY(), box.height()), style.get()));
</ins><span class="cx">                 if (style-&gt;transformOriginZ() != 0)
</span><span class="cx">                     list-&gt;append(zoomAdjustedPixelValue(style-&gt;transformOriginZ(), style.get()));
</span><span class="cx">             } else {
</span><span class="lines">@@ -2856,7 +2850,7 @@
</span><span class="cx">         case CSSPropertyBorderImage:
</span><span class="cx">             return valueForNinePieceImage(style-&gt;borderImage());
</span><span class="cx">         case CSSPropertyBorderRadius:
</span><del>-            return getBorderRadiusShorthandValue(style.get(), m_node-&gt;document().renderView());
</del><ins>+            return getBorderRadiusShorthandValue(style.get());
</ins><span class="cx">         case CSSPropertyBorderRight:
</span><span class="cx">             return getCSSPropertyValuesForShorthandProperties(borderRightShorthand());
</span><span class="cx">         case CSSPropertyBorderStyle:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGradientValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGradientValue.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGradientValue.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/CSSGradientValue.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include &quot;Image.h&quot;
</span><span class="cx"> #include &quot;NodeRenderStyle.h&quot;
</span><span class="cx"> #include &quot;RenderElement.h&quot;
</span><ins>+#include &quot;RenderView.h&quot;
</ins><span class="cx"> #include &quot;StyleResolver.h&quot;
</span><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="lines">@@ -129,7 +130,7 @@
</span><span class="cx">     return result.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSGradientValue::addStops(Gradient&amp; gradient, RenderView&amp; renderView, const CSSToLengthConversionData&amp; conversionData, float maxLengthForRepeat)
</del><ins>+void CSSGradientValue::addStops(Gradient&amp; gradient, const CSSToLengthConversionData&amp; conversionData, float maxLengthForRepeat)
</ins><span class="cx"> {
</span><span class="cx">     if (m_gradientType == CSSDeprecatedLinearGradient || m_gradientType == CSSDeprecatedRadialGradient) {
</span><span class="cx">         sortStopsIfNeeded();
</span><span class="lines">@@ -182,8 +183,6 @@
</span><span class="cx">                 float length;
</span><span class="cx">                 if (positionValue.isLength())
</span><span class="cx">                     length = positionValue.computeLength&lt;float&gt;(conversionData);
</span><del>-                else if (positionValue.isViewportPercentageLength())
-                    length = valueForLength(positionValue.viewportPercentageLength(), 0, &amp;renderView);
</del><span class="cx">                 else {
</span><span class="cx">                     Ref&lt;CalculationValue&gt; calculationValue { positionValue.cssCalcValue()-&gt;createCalculationValue(conversionData) };
</span><span class="cx">                     length = calculationValue-&gt;evaluate(gradientLength);
</span><span class="lines">@@ -647,7 +646,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!size.isEmpty());
</span><span class="cx"> 
</span><del>-    CSSToLengthConversionData conversionData(&amp;renderer.style(), renderer.document().documentElement()-&gt;renderStyle());
</del><ins>+    CSSToLengthConversionData conversionData(&amp;renderer.style(), renderer.document().documentElement()-&gt;renderStyle(), &amp;renderer.view());
</ins><span class="cx"> 
</span><span class="cx">     FloatPoint firstPoint;
</span><span class="cx">     FloatPoint secondPoint;
</span><span class="lines">@@ -704,7 +703,7 @@
</span><span class="cx">     RefPtr&lt;Gradient&gt; gradient = Gradient::create(firstPoint, secondPoint);
</span><span class="cx"> 
</span><span class="cx">     // Now add the stops.
</span><del>-    addStops(*gradient, renderer.view(), conversionData, 1);
</del><ins>+    addStops(*gradient, conversionData, 1);
</ins><span class="cx"> 
</span><span class="cx">     return gradient.release();
</span><span class="cx"> }
</span><span class="lines">@@ -985,7 +984,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!size.isEmpty());
</span><span class="cx"> 
</span><del>-    CSSToLengthConversionData conversionData(&amp;renderer.style(), renderer.document().documentElement()-&gt;renderStyle());
</del><ins>+    CSSToLengthConversionData conversionData(&amp;renderer.style(), renderer.document().documentElement()-&gt;renderStyle(), &amp;renderer.view());
</ins><span class="cx"> 
</span><span class="cx">     FloatPoint firstPoint = computeEndPoint(m_firstX.get(), m_firstY.get(), conversionData, size);
</span><span class="cx">     if (!m_firstX)
</span><span class="lines">@@ -1118,7 +1117,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Now add the stops.
</span><del>-    addStops(*gradient, renderer.view(), conversionData, maxExtent);
</del><ins>+    addStops(*gradient, conversionData, maxExtent);
</ins><span class="cx"> 
</span><span class="cx">     return gradient.release();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGradientValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGradientValue.h (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGradientValue.h        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/CSSGradientValue.h        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void addStops(Gradient&amp;, RenderView&amp;, const CSSToLengthConversionData&amp;, float maxLengthForRepeat = 0);
</del><ins>+    void addStops(Gradient&amp;, const CSSToLengthConversionData&amp;, float maxLengthForRepeat = 0);
</ins><span class="cx"> 
</span><span class="cx">     // Resolve points/radii to front end values.
</span><span class="cx">     FloatPoint computeEndPoint(CSSPrimitiveValue*, CSSPrimitiveValue*, const CSSToLengthConversionData&amp;, const FloatSize&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -159,11 +159,6 @@
</span><span class="cx">     case CSS_HZ:
</span><span class="cx">     case CSS_KHZ:
</span><span class="cx">         return UFrequency;
</span><del>-    case CSS_VW:
-    case CSS_VH:
-    case CSS_VMIN:
-    case CSS_VMAX:
-        return UViewportPercentageLength;
</del><span class="cx"> #if ENABLE(CSS_IMAGE_RESOLUTION) || ENABLE(RESOLUTION_MEDIA_QUERY)
</span><span class="cx">     case CSS_DPPX:
</span><span class="cx">     case CSS_DPI:
</span><span class="lines">@@ -301,10 +296,6 @@
</span><span class="cx">     case FillAvailable:
</span><span class="cx">     case FitContent:
</span><span class="cx">     case Percent:
</span><del>-    case ViewportPercentageWidth:
-    case ViewportPercentageHeight:
-    case ViewportPercentageMin:
-    case ViewportPercentageMax:
</del><span class="cx">         init(length);
</span><span class="cx">         return;
</span><span class="cx">     case Fixed:
</span><span class="lines">@@ -370,22 +361,6 @@
</span><span class="cx">         ASSERT(std::isfinite(length.percent()));
</span><span class="cx">         m_value.num = length.percent();
</span><span class="cx">         return;
</span><del>-    case ViewportPercentageWidth:
-        m_primitiveUnitType = CSS_VW;
-        m_value.num = length.viewportPercentageLength();
-        return;
-    case ViewportPercentageHeight:
-        m_primitiveUnitType = CSS_VH;
-        m_value.num = length.viewportPercentageLength();
-        return;
-    case ViewportPercentageMin:
-        m_primitiveUnitType = CSS_VMIN;
-        m_value.num = length.viewportPercentageLength();
-        return;
-    case ViewportPercentageMax:
-        m_primitiveUnitType = CSS_VMAX;
-        m_value.num = length.viewportPercentageLength();
-        return;
</del><span class="cx">     case Calculated:
</span><span class="cx">     case Relative:
</span><span class="cx">     case Undefined:
</span><span class="lines">@@ -657,10 +632,16 @@
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         return -1.0;
</span><span class="cx">     case CSS_VH:
</span><ins>+        factor = conversionData.viewportHeightFactor();
+        break;
</ins><span class="cx">     case CSS_VW:
</span><ins>+        factor = conversionData.viewportWidthFactor();
+        break;
</ins><span class="cx">     case CSS_VMAX:
</span><ins>+        factor = conversionData.viewportMaxFactor();
+        break;
</ins><span class="cx">     case CSS_VMIN:
</span><del>-        factor = 1.0;
</del><ins>+        factor = conversionData.viewportMinFactor();
</ins><span class="cx">         break;
</span><span class="cx">     default:
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="lines">@@ -779,8 +760,6 @@
</span><span class="cx">         return CSS_DEG;
</span><span class="cx">     case UFrequency:
</span><span class="cx">         return CSS_HZ;
</span><del>-    case UViewportPercentageLength:
-        return CSS_UNKNOWN; // Cannot convert between numbers and relative lengths.
</del><span class="cx"> #if ENABLE(CSS_IMAGE_RESOLUTION) || ENABLE(RESOLUTION_MEDIA_QUERY)
</span><span class="cx">     case UResolution:
</span><span class="cx">         return CSS_DPPX;
</span><span class="lines">@@ -1224,29 +1203,6 @@
</span><span class="cx">         addSubresourceURL(urls, styleSheet-&gt;completeURL(m_value.string));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Length CSSPrimitiveValue::viewportPercentageLength() const
-{
-    ASSERT(isViewportPercentageLength());
-    Length viewportLength;
-    switch (m_primitiveUnitType) {
-    case CSS_VW:
-        viewportLength = Length(getDoubleValue(), ViewportPercentageWidth);
-        break;
-    case CSS_VH:
-        viewportLength = Length(getDoubleValue(), ViewportPercentageHeight);
-        break;
-    case CSS_VMIN:
-        viewportLength = Length(getDoubleValue(), ViewportPercentageMin);
-        break;
-    case CSS_VMAX:
-        viewportLength = Length(getDoubleValue(), ViewportPercentageMax);
-        break;
-    default:
-        break;
-    }
-    return viewportLength;
-}
-
</del><span class="cx"> PassRefPtr&lt;CSSPrimitiveValue&gt; CSSPrimitiveValue::cloneForCSSOM() const
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;CSSPrimitiveValue&gt; result;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.h (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValue.h        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.h        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -148,7 +148,6 @@
</span><span class="cx">         UAngle,
</span><span class="cx">         UTime,
</span><span class="cx">         UFrequency,
</span><del>-        UViewportPercentageLength,
</del><span class="cx"> #if ENABLE(CSS_IMAGE_RESOLUTION) || ENABLE(RESOLUTION_MEDIA_QUERY)
</span><span class="cx">         UResolution,
</span><span class="cx"> #endif
</span><span class="lines">@@ -176,7 +175,7 @@
</span><span class="cx">     bool isLength() const
</span><span class="cx">     {
</span><span class="cx">         unsigned short type = primitiveType();
</span><del>-        return (type &gt;= CSS_EMS &amp;&amp; type &lt;= CSS_PC) || type == CSS_REMS || type == CSS_CHS;
</del><ins>+        return (type &gt;= CSS_EMS &amp;&amp; type &lt;= CSS_PC) || type == CSS_REMS || type == CSS_CHS || isViewportPercentageLength();
</ins><span class="cx">     }
</span><span class="cx">     bool isNumber() const { return primitiveType() == CSS_NUMBER; }
</span><span class="cx">     bool isPercentage() const { return primitiveType() == CSS_PERCENTAGE; }
</span><span class="lines">@@ -329,8 +328,6 @@
</span><span class="cx"> 
</span><span class="cx">     void addSubresourceStyleURLs(ListHashSet&lt;URL&gt;&amp;, const StyleSheetContents*) const;
</span><span class="cx"> 
</span><del>-    Length viewportPercentageLength() const;
-
</del><span class="cx">     PassRefPtr&lt;CSSPrimitiveValue&gt; cloneForCSSOM() const;
</span><span class="cx">     void setCSSOMSafe() { m_isCSSOMSafe = true; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueMappingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -4624,8 +4624,7 @@
</span><span class="cx">     AutoConversion = 1 &lt;&lt; 2,
</span><span class="cx">     PercentConversion = 1 &lt;&lt; 3,
</span><span class="cx">     FractionConversion = 1 &lt;&lt; 4,
</span><del>-    CalculatedConversion = 1 &lt;&lt; 5,
-    ViewportPercentageConversion = 1 &lt;&lt; 6
</del><ins>+    CalculatedConversion = 1 &lt;&lt; 5
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> template&lt;int supported&gt; Length CSSPrimitiveValue::convertToLength(const CSSToLengthConversionData&amp; conversionData) const
</span><span class="lines">@@ -4644,8 +4643,6 @@
</span><span class="cx">         return Length(Auto);
</span><span class="cx">     if ((supported &amp; CalculatedConversion) &amp;&amp; isCalculated())
</span><span class="cx">         return Length(cssCalcValue()-&gt;createCalculationValue(conversionData));
</span><del>-    if ((supported &amp; ViewportPercentageConversion) &amp;&amp; isViewportPercentageLength())
-        return viewportPercentageLength();
</del><span class="cx">     return Length(Undefined);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSToLengthConversionDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSToLengthConversionData.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSToLengthConversionData.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/CSSToLengthConversionData.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;CSSToLengthConversionData.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;RenderStyle.h&quot;
</span><ins>+#include &quot;RenderView.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -42,4 +43,46 @@
</span><span class="cx">     return m_zoom;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+double CSSToLengthConversionData::viewportWidthFactor() const
+{
+    if (m_style &amp;&amp; !m_computingFontSize)
+        m_style-&gt;setHasViewportUnits();
+    return m_renderView ? m_renderView-&gt;viewportSizeForCSSViewportUnits().width() / 100.0 : 0.0;
+}
+
+double CSSToLengthConversionData::viewportHeightFactor() const
+{
+    if (m_style &amp;&amp; !m_computingFontSize)
+        m_style-&gt;setHasViewportUnits();
+
+    if (!m_renderView)
+        return 0.0;
+
+    return m_renderView ? m_renderView-&gt;viewportSizeForCSSViewportUnits().height() / 100.0 : 0.0;
+}
+
+double CSSToLengthConversionData::viewportMinFactor() const
+{
+    if (m_style &amp;&amp; !m_computingFontSize)
+        m_style-&gt;setHasViewportUnits();
+
+    if (!m_renderView)
+        return 0.0;
+
+    IntSize viewportSizeForCSSViewportUnits = m_renderView-&gt;viewportSizeForCSSViewportUnits();
+    return std::min(viewportSizeForCSSViewportUnits.width(), viewportSizeForCSSViewportUnits.height()) / 100.0;
+}
+
+double CSSToLengthConversionData::viewportMaxFactor() const
+{
+    if (m_style &amp;&amp; !m_computingFontSize)
+        m_style-&gt;setHasViewportUnits();
+
+    if (!m_renderView)
+        return 0.0;
+
+    IntSize viewportSizeForCSSViewportUnits = m_renderView-&gt;viewportSizeForCSSViewportUnits();
+    return std::max(viewportSizeForCSSViewportUnits.width(), viewportSizeForCSSViewportUnits.height()) / 100.0;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSToLengthConversionDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSToLengthConversionData.h (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSToLengthConversionData.h        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/CSSToLengthConversionData.h        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -37,39 +37,52 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class RenderStyle;
</span><ins>+class RenderView;
</ins><span class="cx"> 
</span><span class="cx"> class CSSToLengthConversionData {
</span><span class="cx"> public:
</span><del>-    CSSToLengthConversionData(const RenderStyle* style, const RenderStyle* rootStyle, float zoom, bool computingFontSize = false)
</del><ins>+    CSSToLengthConversionData(RenderStyle* style, const RenderStyle* rootStyle, const RenderView* renderView, float zoom, bool computingFontSize = false)
</ins><span class="cx">         : m_style(style)
</span><span class="cx">         , m_rootStyle(rootStyle)
</span><ins>+        , m_renderView(renderView)
</ins><span class="cx">         , m_zoom(zoom)
</span><span class="cx">         , m_useEffectiveZoom(false)
</span><span class="cx">         , m_computingFontSize(computingFontSize)
</span><span class="cx">     {
</span><span class="cx">         ASSERT(zoom &gt; 0);
</span><span class="cx">     }
</span><del>-    CSSToLengthConversionData(const RenderStyle* style = nullptr, const RenderStyle* rootStyle = nullptr, bool computingFontSize = false)
</del><ins>+    CSSToLengthConversionData(RenderStyle* style, const RenderStyle* rootStyle, const RenderView* renderView, bool computingFontSize = false)
</ins><span class="cx">         : m_style(style)
</span><span class="cx">         , m_rootStyle(rootStyle)
</span><ins>+        , m_renderView(renderView)
</ins><span class="cx">         , m_useEffectiveZoom(true)
</span><span class="cx">         , m_computingFontSize(computingFontSize)
</span><span class="cx">     {
</span><span class="cx">     }
</span><ins>+    CSSToLengthConversionData()
+        : CSSToLengthConversionData(nullptr, nullptr, nullptr)
+    {
+    }
</ins><span class="cx"> 
</span><del>-    const RenderStyle* style() const { return m_style; }
</del><ins>+    RenderStyle* style() const { return m_style; }
</ins><span class="cx">     const RenderStyle* rootStyle() const { return m_rootStyle; }
</span><span class="cx">     float zoom() const;
</span><span class="cx">     bool computingFontSize() const { return m_computingFontSize; }
</span><span class="cx"> 
</span><ins>+    double viewportWidthFactor() const;
+    double viewportHeightFactor() const;
+    double viewportMinFactor() const;
+    double viewportMaxFactor() const;
+
</ins><span class="cx">     CSSToLengthConversionData copyWithAdjustedZoom(float newZoom) const
</span><span class="cx">     {
</span><del>-        return CSSToLengthConversionData(m_style, m_rootStyle, newZoom, m_computingFontSize);
</del><ins>+        return CSSToLengthConversionData(m_style, m_rootStyle, m_renderView, newZoom, m_computingFontSize);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    const RenderStyle* m_style;
</del><ins>+    RenderStyle* m_style;
</ins><span class="cx">     const RenderStyle* m_rootStyle;
</span><ins>+    const RenderView* m_renderView;
</ins><span class="cx">     float m_zoom;
</span><span class="cx">     bool m_useEffectiveZoom;
</span><span class="cx">     bool m_computingFontSize;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSToStyleMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSToStyleMap.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSToStyleMap.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/CSSToStyleMap.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include &quot;FillLayer.h&quot;
</span><span class="cx"> #include &quot;Pair.h&quot;
</span><span class="cx"> #include &quot;Rect.h&quot;
</span><ins>+#include &quot;RenderView.h&quot;
</ins><span class="cx"> #include &quot;StyleResolver.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -50,7 +51,7 @@
</span><span class="cx"> {
</span><span class="cx">     return m_resolver-&gt;style();
</span><span class="cx"> }
</span><del>-    
</del><ins>+
</ins><span class="cx"> RenderStyle* CSSToStyleMap::rootElementStyle() const
</span><span class="cx"> {
</span><span class="cx">     return m_resolver-&gt;rootElementStyle();
</span><span class="lines">@@ -60,7 +61,7 @@
</span><span class="cx"> {
</span><span class="cx">     return m_resolver-&gt;useSVGZoomRules();
</span><span class="cx"> }
</span><del>-    
</del><ins>+
</ins><span class="cx"> PassRefPtr&lt;StyleImage&gt; CSSToStyleMap::styleImage(CSSPropertyID propertyId, CSSValue* value)
</span><span class="cx"> {
</span><span class="cx">     return m_resolver-&gt;styleImage(propertyId, value);
</span><span class="lines">@@ -253,8 +254,6 @@
</span><span class="cx">         length = Length(primitiveValue-&gt;getDoubleValue(), Percent);
</span><span class="cx">     else if (primitiveValue-&gt;isCalculatedPercentageWithLength())
</span><span class="cx">         length = Length(primitiveValue-&gt;cssCalcValue()-&gt;createCalculationValue(m_resolver-&gt;state().cssToLengthConversionData()));
</span><del>-    else if (primitiveValue-&gt;isViewportPercentageLength())
-        length = primitiveValue-&gt;viewportPercentageLength();
</del><span class="cx">     else
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -287,8 +286,6 @@
</span><span class="cx">         length = Length(primitiveValue-&gt;getDoubleValue(), Percent);
</span><span class="cx">     else if (primitiveValue-&gt;isCalculatedPercentageWithLength())
</span><span class="cx">         length = Length(primitiveValue-&gt;cssCalcValue()-&gt;createCalculationValue(m_resolver-&gt;state().cssToLengthConversionData()));
</span><del>-    else if (primitiveValue-&gt;isViewportPercentageLength())
-        length = primitiveValue-&gt;viewportPercentageLength();
</del><span class="cx">     else
</span><span class="cx">         return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -394,8 +394,6 @@
</span><span class="cx">             setValue(styleResolver-&gt;style(), Length(primitiveValue-&gt;getDoubleValue(), Percent));
</span><span class="cx">         else if (primitiveValue-&gt;isCalculatedPercentageWithLength())
</span><span class="cx">             setValue(styleResolver-&gt;style(), Length(primitiveValue-&gt;cssCalcValue()-&gt;createCalculationValue(styleResolver-&gt;state().cssToLengthConversionData())));
</span><del>-        else if (primitiveValue-&gt;isViewportPercentageLength())
-            setValue(styleResolver-&gt;style(), primitiveValue-&gt;viewportPercentageLength());
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     static PropertyHandler createHandler()
</span><span class="lines">@@ -446,8 +444,6 @@
</span><span class="cx">         Length radiusWidth;
</span><span class="cx">         if (pair-&gt;first()-&gt;isPercentage())
</span><span class="cx">             radiusWidth = Length(pair-&gt;first()-&gt;getDoubleValue(), Percent);
</span><del>-        else if (pair-&gt;first()-&gt;isViewportPercentageLength())
-            radiusWidth = Length(styleResolver-&gt;viewportPercentageValue(*pair-&gt;first(), pair-&gt;first()-&gt;getIntValue()), Fixed);
</del><span class="cx">         else if (pair-&gt;first()-&gt;isCalculatedPercentageWithLength())
</span><span class="cx">             radiusWidth = Length(pair-&gt;first()-&gt;cssCalcValue()-&gt;createCalculationValue(conversionData));
</span><span class="cx">         else
</span><span class="lines">@@ -456,8 +452,6 @@
</span><span class="cx">         Length radiusHeight;
</span><span class="cx">         if (pair-&gt;second()-&gt;isPercentage())
</span><span class="cx">             radiusHeight = Length(pair-&gt;second()-&gt;getDoubleValue(), Percent);
</span><del>-        else if (pair-&gt;second()-&gt;isViewportPercentageLength())
-            radiusHeight = Length(styleResolver-&gt;viewportPercentageValue(*pair-&gt;second(), pair-&gt;second()-&gt;getIntValue()), Fixed);
</del><span class="cx">         else if (pair-&gt;second()-&gt;isCalculatedPercentageWithLength())
</span><span class="cx">             radiusHeight = Length(pair-&gt;second()-&gt;cssCalcValue()-&gt;createCalculationValue(conversionData));
</span><span class="cx">         else
</span><span class="lines">@@ -622,8 +616,6 @@
</span><span class="cx">                 if (originalLength &gt;= 1.0)
</span><span class="cx">                     length = 1.0;
</span><span class="cx">             }
</span><del>-            if (primitiveValue-&gt;isViewportPercentageLength())
-                length = styleResolver-&gt;viewportPercentageValue(*primitiveValue, length);
</del><span class="cx">         } else {
</span><span class="cx">             ASSERT_NOT_REACHED();
</span><span class="cx">             length = 0;
</span><span class="lines">@@ -868,16 +860,15 @@
</span><span class="cx">         } else {
</span><span class="cx">             fontDescription.setIsAbsoluteSize(parentIsAbsoluteSize
</span><span class="cx">                                               || !(primitiveValue-&gt;isPercentage() || primitiveValue-&gt;isFontRelativeLength()));
</span><del>-            if (primitiveValue-&gt;isLength())
-                size = primitiveValue-&gt;computeLength&lt;float&gt;(CSSToLengthConversionData(styleResolver-&gt;parentStyle(), styleResolver-&gt;rootElementStyle(), 1.0f, true));
-            else if (primitiveValue-&gt;isPercentage())
</del><ins>+            if (primitiveValue-&gt;isLength()) {
+                size = primitiveValue-&gt;computeLength&lt;float&gt;(CSSToLengthConversionData(styleResolver-&gt;parentStyle(), styleResolver-&gt;rootElementStyle(), styleResolver-&gt;document().renderView(), 1.0f, true));
+                styleResolver-&gt;state().setFontSizeHasViewportUnits(primitiveValue-&gt;isViewportPercentageLength());
+            } else if (primitiveValue-&gt;isPercentage())
</ins><span class="cx">                 size = (primitiveValue-&gt;getFloatValue() * parentSize) / 100.0f;
</span><span class="cx">             else if (primitiveValue-&gt;isCalculatedPercentageWithLength()) {
</span><span class="cx">                 Ref&lt;CalculationValue&gt; calculationValue { primitiveValue-&gt;cssCalcValue()-&gt;createCalculationValue(styleResolver-&gt;state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f)) };
</span><span class="cx">                 size = calculationValue-&gt;evaluate(parentSize);
</span><del>-            } else if (primitiveValue-&gt;isViewportPercentageLength())
-                size = valueForLength(primitiveValue-&gt;viewportPercentageLength(), 0, styleResolver-&gt;document().renderView());
-            else
</del><ins>+            } else
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1458,9 +1449,7 @@
</span><span class="cx">         } else if (primitiveValue-&gt;isNumber()) {
</span><span class="cx">             // FIXME: number and percentage values should produce the same type of Length (ie. Fixed or Percent).
</span><span class="cx">             lineHeight = Length(primitiveValue-&gt;getDoubleValue() * 100.0, Percent);
</span><del>-        } else if (primitiveValue-&gt;isViewportPercentageLength())
-            lineHeight = primitiveValue-&gt;viewportPercentageLength();
-        else
</del><ins>+        } else
</ins><span class="cx">             return;
</span><span class="cx">         styleResolver-&gt;style()-&gt;setLineHeight(lineHeight);
</span><span class="cx">     }
</span><span class="lines">@@ -1498,9 +1487,7 @@
</span><span class="cx">                 lineHeight = Length(primitiveValue-&gt;getDoubleValue() * styleResolver-&gt;style()-&gt;textSizeAdjust().multiplier() * 100.0, Percent);
</span><span class="cx">             else
</span><span class="cx">                 lineHeight = Length(primitiveValue-&gt;getDoubleValue() * 100.0, Percent);
</span><del>-        } else if (primitiveValue-&gt;isViewportPercentageLength())
-            lineHeight = primitiveValue-&gt;viewportPercentageLength();
-        else
</del><ins>+        } else
</ins><span class="cx">             return;
</span><span class="cx">         styleResolver-&gt;style()-&gt;setLineHeight(lineHeight);
</span><span class="cx">         styleResolver-&gt;style()-&gt;setSpecifiedLineHeight(lineHeight);
</span><span class="lines">@@ -1543,8 +1530,6 @@
</span><span class="cx">             wordSpacing = Length(primitiveValue-&gt;getDoubleValue(), Percent);
</span><span class="cx">         else if (primitiveValue-&gt;isNumber())
</span><span class="cx">             wordSpacing = Length(primitiveValue-&gt;getDoubleValue(), Fixed);
</span><del>-        else if (primitiveValue-&gt;isViewportPercentageLength())
-            wordSpacing = Length(styleResolver-&gt;viewportPercentageValue(*primitiveValue, primitiveValue-&gt;getDoubleValue()), Fixed);
</del><span class="cx">         else
</span><span class="cx">             return;
</span><span class="cx">         styleResolver-&gt;style()-&gt;setWordSpacing(wordSpacing);
</span><span class="lines">@@ -1960,7 +1945,7 @@
</span><span class="cx">         if (primitiveValue-&gt;getValueID())
</span><span class="cx">             return styleResolver-&gt;style()-&gt;setVerticalAlign(*primitiveValue);
</span><span class="cx"> 
</span><del>-        styleResolver-&gt;style()-&gt;setVerticalAlignLength(primitiveValue-&gt;convertToLength&lt;FixedIntegerConversion | PercentConversion | CalculatedConversion | ViewportPercentageConversion&gt;(styleResolver-&gt;state().cssToLengthConversionData()));
</del><ins>+        styleResolver-&gt;style()-&gt;setVerticalAlignLength(primitiveValue-&gt;convertToLength&lt;FixedIntegerConversion | PercentConversion | CalculatedConversion&gt;(styleResolver-&gt;state().cssToLengthConversionData()));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     static PropertyHandler createHandler()
</span><span class="lines">@@ -2300,7 +2285,7 @@
</span><span class="cx"> 
</span><span class="cx">             CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(item);
</span><span class="cx">             if (!primitiveValue-&gt;getValueID())
</span><del>-                lengthOrPercentageValue = primitiveValue-&gt;convertToLength&lt;FixedIntegerConversion | PercentConversion | CalculatedConversion | ViewportPercentageConversion&gt;(styleResolver-&gt;state().cssToLengthConversionData());
</del><ins>+                lengthOrPercentageValue = primitiveValue-&gt;convertToLength&lt;FixedIntegerConversion | PercentConversion | CalculatedConversion&gt;(styleResolver-&gt;state().cssToLengthConversionData());
</ins><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><span class="cx">             else if (primitiveValue-&gt;getValueID() == CSSValueWebkitEachLine)
</span><span class="cx">                 textIndentLineValue = TextIndentEachLine;
</span></span></pre></div>
<a id="trunkSourceWebCorecssLengthFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/LengthFunctions.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/LengthFunctions.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/LengthFunctions.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -24,23 +24,23 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;LengthFunctions.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;FloatSize.h&quot;
</ins><span class="cx"> #include &quot;LayoutUnit.h&quot;
</span><span class="cx"> #include &quot;LengthSize.h&quot;
</span><del>-#include &quot;RenderView.h&quot;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-int minimumIntValueForLength(const Length&amp; length, LayoutUnit maximumValue, RenderView* renderView, bool roundPercentages)
</del><ins>+int minimumIntValueForLength(const Length&amp; length, LayoutUnit maximumValue, bool roundPercentages)
</ins><span class="cx"> {
</span><del>-    return static_cast&lt;int&gt;(minimumValueForLength(length, maximumValue, renderView, roundPercentages));
</del><ins>+    return static_cast&lt;int&gt;(minimumValueForLength(length, maximumValue, roundPercentages));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-int intValueForLength(const Length&amp; length, LayoutUnit maximumValue, RenderView* renderView, bool roundPercentages)
</del><ins>+int intValueForLength(const Length&amp; length, LayoutUnit maximumValue)
</ins><span class="cx"> {
</span><del>-    return static_cast&lt;int&gt;(valueForLength(length, maximumValue, renderView, roundPercentages));
</del><ins>+    return static_cast&lt;int&gt;(valueForLength(length, maximumValue));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit minimumValueForLength(const Length&amp; length, LayoutUnit maximumValue, RenderView* renderView, bool roundPercentages)
</del><ins>+LayoutUnit minimumValueForLength(const Length&amp; length, LayoutUnit maximumValue, bool roundPercentages)
</ins><span class="cx"> {
</span><span class="cx">     switch (length.type()) {
</span><span class="cx">     case Fixed:
</span><span class="lines">@@ -52,26 +52,6 @@
</span><span class="cx">         return LayoutUnit(static_cast&lt;float&gt;(maximumValue * length.percent() / 100.0f));
</span><span class="cx">     case Calculated:
</span><span class="cx">         return length.nonNanCalculatedValue(maximumValue);
</span><del>-    case ViewportPercentageWidth:
-        if (renderView)
-            return LayoutUnit(renderView-&gt;viewportSizeForCSSViewportUnits().width() * length.viewportPercentageLength() / 100.0f);
-        return 0;
-    case ViewportPercentageHeight:
-        if (renderView)
-            return LayoutUnit(renderView-&gt;viewportSizeForCSSViewportUnits().height() * length.viewportPercentageLength() / 100.0f);
-        return 0;
-    case ViewportPercentageMin:
-        if (renderView) {
-            IntSize viewportSize = renderView-&gt;viewportSizeForCSSViewportUnits();
-            return LayoutUnit(std::min(viewportSize.width(), viewportSize.height()) * length.viewportPercentageLength() / 100.0f);
-        }
-        return 0;
-    case ViewportPercentageMax:
-        if (renderView) {
-            IntSize viewportSize = renderView-&gt;viewportSizeForCSSViewportUnits();
-            return LayoutUnit(std::max(viewportSize.width(), viewportSize.height()) * length.viewportPercentageLength() / 100.0f);
-        }
-        return 0;
</del><span class="cx">     case FillAvailable:
</span><span class="cx">     case Auto:
</span><span class="cx">         return 0;
</span><span class="lines">@@ -89,17 +69,13 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit valueForLength(const Length&amp; length, LayoutUnit maximumValue, RenderView* renderView, bool roundPercentages)
</del><ins>+LayoutUnit valueForLength(const Length&amp; length, LayoutUnit maximumValue)
</ins><span class="cx"> {
</span><span class="cx">     switch (length.type()) {
</span><span class="cx">     case Fixed:
</span><span class="cx">     case Percent:
</span><span class="cx">     case Calculated:
</span><del>-    case ViewportPercentageWidth:
-    case ViewportPercentageHeight:
-    case ViewportPercentageMin:
-    case ViewportPercentageMax:
-        return minimumValueForLength(length, maximumValue, renderView, roundPercentages);
</del><ins>+        return minimumValueForLength(length, maximumValue);
</ins><span class="cx">     case FillAvailable:
</span><span class="cx">     case Auto:
</span><span class="cx">         return maximumValue;
</span><span class="lines">@@ -118,7 +94,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // FIXME: when subpixel layout is supported this copy of floatValueForLength() can be removed. See bug 71143.
</span><del>-float floatValueForLength(const Length&amp; length, LayoutUnit maximumValue, RenderView* renderView)
</del><ins>+float floatValueForLength(const Length&amp; length, LayoutUnit maximumValue)
</ins><span class="cx"> {
</span><span class="cx">     switch (length.type()) {
</span><span class="cx">     case Fixed:
</span><span class="lines">@@ -129,27 +105,7 @@
</span><span class="cx">     case Auto:
</span><span class="cx">         return static_cast&lt;float&gt;(maximumValue);
</span><span class="cx">     case Calculated:
</span><del>-        return length.nonNanCalculatedValue(maximumValue);                
-    case ViewportPercentageWidth:
-        if (renderView)
-            return static_cast&lt;int&gt;(renderView-&gt;viewportSizeForCSSViewportUnits().width() * length.viewportPercentageLength() / 100.0f);
-        return 0;
-    case ViewportPercentageHeight:
-        if (renderView)
-            return static_cast&lt;int&gt;(renderView-&gt;viewportSizeForCSSViewportUnits().height() * length.viewportPercentageLength() / 100.0f);
-        return 0;
-    case ViewportPercentageMin:
-        if (renderView) {
-            IntSize viewportSize = renderView-&gt;viewportSizeForCSSViewportUnits();
-            return static_cast&lt;int&gt;(std::min(viewportSize.width(), viewportSize.height()) * length.viewportPercentageLength() / 100.0f);
-        }
-        return 0;
-    case ViewportPercentageMax:
-        if (renderView) {
-            IntSize viewportSize = renderView-&gt;viewportSizeForCSSViewportUnits();
-            return static_cast&lt;int&gt;(std::max(viewportSize.width(), viewportSize.height()) * length.viewportPercentageLength() / 100.0f);
-        }
-        return 0;
</del><ins>+        return length.nonNanCalculatedValue(maximumValue);
</ins><span class="cx">     case Relative:
</span><span class="cx">     case Intrinsic:
</span><span class="cx">     case MinIntrinsic:
</span><span class="lines">@@ -164,7 +120,7 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float floatValueForLength(const Length&amp; length, float maximumValue, RenderView* renderView)
</del><ins>+float floatValueForLength(const Length&amp; length, float maximumValue)
</ins><span class="cx"> {
</span><span class="cx">     switch (length.type()) {
</span><span class="cx">     case Fixed:
</span><span class="lines">@@ -176,26 +132,6 @@
</span><span class="cx">         return static_cast&lt;float&gt;(maximumValue);
</span><span class="cx">     case Calculated:
</span><span class="cx">         return length.nonNanCalculatedValue(maximumValue);
</span><del>-    case ViewportPercentageWidth:
-        if (renderView)
-            return static_cast&lt;int&gt;(renderView-&gt;viewportSizeForCSSViewportUnits().width() * length.viewportPercentageLength() / 100.0f);
-        return 0;
-    case ViewportPercentageHeight:
-        if (renderView)
-            return static_cast&lt;int&gt;(renderView-&gt;viewportSizeForCSSViewportUnits().height() * length.viewportPercentageLength() / 100.0f);
-        return 0;
-    case ViewportPercentageMin:
-        if (renderView) {
-            IntSize viewportSize = renderView-&gt;viewportSizeForCSSViewportUnits();
-            return static_cast&lt;int&gt;(std::min(viewportSize.width(), viewportSize.height()) * length.viewportPercentageLength() / 100.0f);
-        }
-        return 0;
-    case ViewportPercentageMax:
-        if (renderView) {
-            IntSize viewportSize = renderView-&gt;viewportSizeForCSSViewportUnits();
-            return static_cast&lt;int&gt;(std::max(viewportSize.width(), viewportSize.height()) * length.viewportPercentageLength() / 100.0f);
-        }
-        return 0;
</del><span class="cx">     case Relative:
</span><span class="cx">     case Intrinsic:
</span><span class="cx">     case MinIntrinsic:
</span><span class="lines">@@ -210,9 +146,9 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FloatSize floatSizeForLengthSize(const LengthSize&amp; lengthSize, const FloatSize&amp; boxSize, RenderView* view)
</del><ins>+FloatSize floatSizeForLengthSize(const LengthSize&amp; lengthSize, const FloatSize&amp; boxSize)
</ins><span class="cx"> {
</span><del>-    return FloatSize(floatValueForLength(lengthSize.width(), boxSize.width(), view), floatValueForLength(lengthSize.height(), boxSize.height(), view));
</del><ins>+    return FloatSize(floatValueForLength(lengthSize.width(), boxSize.width()), floatValueForLength(lengthSize.height(), boxSize.height()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssLengthFunctionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/LengthFunctions.h (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/LengthFunctions.h        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/LengthFunctions.h        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -32,13 +32,13 @@
</span><span class="cx"> struct Length;
</span><span class="cx"> struct LengthSize;
</span><span class="cx"> 
</span><del>-int minimumIntValueForLength(const Length&amp;, LayoutUnit maximumValue, RenderView* = 0, bool roundPercentages = false);
-int intValueForLength(const Length&amp;, LayoutUnit maximumValue, RenderView* = 0, bool roundPercentages = false);
-LayoutUnit minimumValueForLength(const Length&amp;, LayoutUnit maximumValue, RenderView* = 0, bool roundPercentages = false);
-LayoutUnit valueForLength(const Length&amp;, LayoutUnit maximumValue, RenderView* = 0, bool roundPercentages = false);
-float floatValueForLength(const Length&amp;, LayoutUnit maximumValue, RenderView* = 0);
-float floatValueForLength(const Length&amp;, float maximumValue, RenderView* = 0);
-FloatSize floatSizeForLengthSize(const LengthSize&amp;, const FloatSize&amp;, RenderView* = 0);
</del><ins>+int minimumIntValueForLength(const Length&amp;, LayoutUnit maximumValue, bool roundPercentages = false);
+int intValueForLength(const Length&amp;, LayoutUnit maximumValue);
+LayoutUnit minimumValueForLength(const Length&amp;, LayoutUnit maximumValue, bool roundPercentages = false);
+LayoutUnit valueForLength(const Length&amp;, LayoutUnit maximumValue);
+float floatValueForLength(const Length&amp;, LayoutUnit maximumValue);
+float floatValueForLength(const Length&amp;, float maximumValue);
+FloatSize floatSizeForLengthSize(const LengthSize&amp;, const FloatSize&amp;);
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaQueryEvaluatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaQueryEvaluator.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaQueryEvaluator.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/MediaQueryEvaluator.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -725,7 +725,9 @@
</span><span class="cx">     // used
</span><span class="cx">     EvalFunc func = gFunctionMap-&gt;get(expr-&gt;mediaFeature().impl());
</span><span class="cx">     if (func) {
</span><del>-        CSSToLengthConversionData conversionData(m_style.get(), m_frame-&gt;document()-&gt;documentElement()-&gt;renderStyle());
</del><ins>+        CSSToLengthConversionData conversionData(m_style.get(),
+            m_frame-&gt;document()-&gt;documentElement()-&gt;renderStyle(),
+            m_frame-&gt;document()-&gt;renderView());
</ins><span class="cx">         return func(expr-&gt;value(), conversionData, m_frame, NoPrefix);
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -235,7 +235,7 @@
</span><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><span class="cx">     m_filtersWithPendingSVGDocuments.clear();
</span><span class="cx"> #endif
</span><del>-    m_cssToLengthConversionData = CSSToLengthConversionData(nullptr, nullptr);
</del><ins>+    m_cssToLengthConversionData = CSSToLengthConversionData();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void StyleResolver::MatchResult::addMatchedProperties(const StyleProperties&amp; properties, StyleRule* rule, unsigned linkMatchType, PropertyWhitelistType propertyWhitelistType)
</span><span class="lines">@@ -380,11 +380,17 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline void StyleResolver::State::updateConversionData()
+{
+    m_cssToLengthConversionData = CSSToLengthConversionData(m_style.get(), m_rootElementStyle, m_element ? document().renderView() : nullptr);
+}
+
</ins><span class="cx"> inline void StyleResolver::State::initElement(Element* e)
</span><span class="cx"> {
</span><span class="cx">     m_element = e;
</span><span class="cx">     m_styledElement = e &amp;&amp; e-&gt;isStyledElement() ? toStyledElement(e) : nullptr;
</span><span class="cx">     m_elementLinkState = e ? e-&gt;document().visitedLinkState().determineLinkState(e) : NotInsideLink;
</span><ins>+    updateConversionData();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline void StyleResolver::initElement(Element* e)
</span><span class="lines">@@ -416,9 +422,15 @@
</span><span class="cx">     m_pendingImageProperties.clear();
</span><span class="cx">     m_fontDirty = false;
</span><span class="cx"> 
</span><del>-    m_cssToLengthConversionData = CSSToLengthConversionData(m_style.get(), m_rootElementStyle);
</del><ins>+    updateConversionData();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline void StyleResolver::State::setStyle(PassRef&lt;RenderStyle&gt; style)
+{
+    m_style = std::move(style);
+    updateConversionData();
+}
+
</ins><span class="cx"> static const unsigned cStyleSearchThreshold = 10;
</span><span class="cx"> static const unsigned cStyleSearchLevelThreshold = 10;
</span><span class="cx"> 
</span><span class="lines">@@ -795,6 +807,9 @@
</span><span class="cx">     // Clean up our style object's display and text decorations (among other fixups).
</span><span class="cx">     adjustRenderStyle(*state.style(), *state.parentStyle(), element);
</span><span class="cx"> 
</span><ins>+    if (state.style()-&gt;hasViewportUnits())
+        document().setHasStyleWithViewportUnits();
+
</ins><span class="cx">     state.clear(); // Clear out for the next resolve.
</span><span class="cx"> 
</span><span class="cx">     // Now return the style.
</span><span class="lines">@@ -964,6 +979,9 @@
</span><span class="cx">     // Clean up our style object's display and text decorations (among other fixups).
</span><span class="cx">     adjustRenderStyle(*state.style(), *m_state.parentStyle(), 0);
</span><span class="cx"> 
</span><ins>+    if (state.style()-&gt;hasViewportUnits())
+        document().setHasStyleWithViewportUnits();
+
</ins><span class="cx">     // Start loading resources referenced by this style.
</span><span class="cx">     loadPendingResources();
</span><span class="cx"> 
</span><span class="lines">@@ -1392,6 +1410,8 @@
</span><span class="cx">     checkForZoomChange(style, m_state.parentStyle());
</span><span class="cx">     checkForOrientationChange(style);
</span><span class="cx">     style-&gt;font().update(m_fontSelector);
</span><ins>+    if (m_state.fontSizeHasViewportUnits())
+        style-&gt;setHasViewportUnits(true);
</ins><span class="cx">     m_state.setFontDirty(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1437,12 +1457,12 @@
</span><span class="cx"> 
</span><span class="cx"> Length StyleResolver::convertToIntLength(const CSSPrimitiveValue* primitiveValue, const CSSToLengthConversionData&amp; conversionData)
</span><span class="cx"> {
</span><del>-    return primitiveValue ? primitiveValue-&gt;convertToLength&lt;FixedIntegerConversion | PercentConversion | CalculatedConversion | FractionConversion | ViewportPercentageConversion&gt;(conversionData) : Length(Undefined);
</del><ins>+    return primitiveValue ? primitiveValue-&gt;convertToLength&lt;FixedIntegerConversion | PercentConversion | CalculatedConversion | FractionConversion&gt;(conversionData) : Length(Undefined);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Length StyleResolver::convertToFloatLength(const CSSPrimitiveValue* primitiveValue, const CSSToLengthConversionData&amp; conversionData)
</span><span class="cx"> {
</span><del>-    return primitiveValue ? primitiveValue-&gt;convertToLength&lt;FixedFloatConversion | PercentConversion | CalculatedConversion | FractionConversion | ViewportPercentageConversion&gt;(conversionData) : Length(Undefined);
</del><ins>+    return primitiveValue ? primitiveValue-&gt;convertToLength&lt;FixedFloatConversion | PercentConversion | CalculatedConversion | FractionConversion&gt;(conversionData) : Length(Undefined);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool shouldApplyPropertyInParseOrder(CSSPropertyID propertyID)
</span><span class="lines">@@ -1565,6 +1585,17 @@
</span><span class="cx">     m_matchedPropertiesCache.clear();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void StyleResolver::clearCachedPropertiesAffectedByViewportUnits()
+{
+    Vector&lt;unsigned, 16&gt; toRemove;
+    for (auto&amp; cacheKeyValue : m_matchedPropertiesCache) {
+        if (cacheKeyValue.value.renderStyle-&gt;hasViewportUnits())
+            toRemove.append(cacheKeyValue.key);
+    }
+    for (auto key : toRemove)
+        m_matchedPropertiesCache.remove(key);
+}
+
</ins><span class="cx"> static bool isCacheableInMatchedPropertiesCache(const Element* element, const RenderStyle* style, const RenderStyle* parentStyle)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: CSSPropertyWebkitWritingMode modifies state when applying to document element. We can't skip the applying by caching.
</span><span class="lines">@@ -1843,7 +1874,7 @@
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    workingLength = primitiveValue-&gt;convertToLength&lt;FixedIntegerConversion | PercentConversion | ViewportPercentageConversion | CalculatedConversion | AutoConversion&gt;(state.cssToLengthConversionData());
</del><ins>+    workingLength = primitiveValue-&gt;convertToLength&lt;FixedIntegerConversion | PercentConversion | CalculatedConversion | AutoConversion&gt;(state.cssToLengthConversionData());
</ins><span class="cx">     if (workingLength.length().isUndefined())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -2287,17 +2318,9 @@
</span><span class="cx">                 continue;
</span><span class="cx">             CSSShadowValue* item = toCSSShadowValue(currValue);
</span><span class="cx">             int x = item-&gt;x-&gt;computeLength&lt;int&gt;(state.cssToLengthConversionData());
</span><del>-            if (item-&gt;x-&gt;isViewportPercentageLength())
-                x = viewportPercentageValue(*item-&gt;x, x);
</del><span class="cx">             int y = item-&gt;y-&gt;computeLength&lt;int&gt;(state.cssToLengthConversionData());
</span><del>-            if (item-&gt;y-&gt;isViewportPercentageLength())
-                y = viewportPercentageValue(*item-&gt;y, y);
</del><span class="cx">             int blur = item-&gt;blur ? item-&gt;blur-&gt;computeLength&lt;int&gt;(state.cssToLengthConversionData()) : 0;
</span><del>-            if (item-&gt;blur &amp;&amp; item-&gt;blur-&gt;isViewportPercentageLength())
-                blur = viewportPercentageValue(*item-&gt;blur, blur);
</del><span class="cx">             int spread = item-&gt;spread ? item-&gt;spread-&gt;computeLength&lt;int&gt;(state.cssToLengthConversionData()) : 0;
</span><del>-            if (item-&gt;spread &amp;&amp; item-&gt;spread-&gt;isViewportPercentageLength())
-                spread = viewportPercentageValue(*item-&gt;spread, spread);
</del><span class="cx">             ShadowStyle shadowStyle = item-&gt;style &amp;&amp; item-&gt;style-&gt;getValueID() == CSSValueInset ? Inset : Normal;
</span><span class="cx">             Color color;
</span><span class="cx">             if (item-&gt;color)
</span><span class="lines">@@ -3236,7 +3259,7 @@
</span><span class="cx">     m_viewportDependentMediaQueryResults.append(std::make_unique&lt;MediaQueryResult&gt;(*expr, result));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool StyleResolver::affectedByViewportChange() const
</del><ins>+bool StyleResolver::hasMediaQueriesAffectedByViewportChange() const
</ins><span class="cx"> {
</span><span class="cx">     unsigned s = m_viewportDependentMediaQueryResults.size();
</span><span class="cx">     for (unsigned i = 0; i &lt; s; i++) {
</span><span class="lines">@@ -3415,15 +3438,9 @@
</span><span class="cx"> 
</span><span class="cx">             CSSShadowValue* item = toCSSShadowValue(cssValue);
</span><span class="cx">             int x = item-&gt;x-&gt;computeLength&lt;int&gt;(state.cssToLengthConversionData());
</span><del>-            if (item-&gt;x-&gt;isViewportPercentageLength())
-                x = viewportPercentageValue(*item-&gt;x, x);
</del><span class="cx">             int y = item-&gt;y-&gt;computeLength&lt;int&gt;(state.cssToLengthConversionData());
</span><del>-            if (item-&gt;y-&gt;isViewportPercentageLength())
-                y = viewportPercentageValue(*item-&gt;y, y);
</del><span class="cx">             IntPoint location(x, y);
</span><span class="cx">             int blur = item-&gt;blur ? item-&gt;blur-&gt;computeLength&lt;int&gt;(state.cssToLengthConversionData()) : 0;
</span><del>-            if (item-&gt;blur &amp;&amp; item-&gt;blur-&gt;isViewportPercentageLength())
-                blur = viewportPercentageValue(*item-&gt;blur, blur);
</del><span class="cx">             Color color;
</span><span class="cx">             if (item-&gt;color)
</span><span class="cx">                 color = colorFromPrimitiveValue(item-&gt;color.get());
</span><span class="lines">@@ -3623,24 +3640,6 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int StyleResolver::viewportPercentageValue(CSSPrimitiveValue&amp; unit, int percentage)
-{
-    int viewPortHeight = document().renderView()-&gt;viewportSizeForCSSViewportUnits().height() * percentage / 100.0f;
-    int viewPortWidth = document().renderView()-&gt;viewportSizeForCSSViewportUnits().width() * percentage / 100.0f;
-
-    if (unit.isViewportPercentageHeight())
-        return viewPortHeight;
-    if (unit.isViewportPercentageWidth())
-        return viewPortWidth;
-    if (unit.isViewportPercentageMax())
-        return std::max(viewPortWidth, viewPortHeight);
-    if (unit.isViewportPercentageMin())
-        return std::min(viewPortWidth, viewPortHeight);
-
-    ASSERT_NOT_REACHED();
-    return 0;
-}
-
</del><span class="cx"> StyleResolver::CascadedProperties::CascadedProperties(TextDirection direction, WritingMode writingMode)
</span><span class="cx">     : m_direction(direction)
</span><span class="cx">     , m_writingMode(writingMode)
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.h (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.h        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/StyleResolver.h        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -220,7 +220,7 @@
</span><span class="cx"> 
</span><span class="cx">     void addViewportDependentMediaQueryResult(const MediaQueryExp*, bool result);
</span><span class="cx">     bool hasViewportDependentMediaQueries() const { return !m_viewportDependentMediaQueryResults.isEmpty(); }
</span><del>-    bool affectedByViewportChange() const;
</del><ins>+    bool hasMediaQueriesAffectedByViewportChange() const;
</ins><span class="cx"> 
</span><span class="cx">     void addKeyframeStyle(PassRefPtr&lt;StyleRuleKeyframes&gt;);
</span><span class="cx"> 
</span><span class="lines">@@ -232,6 +232,8 @@
</span><span class="cx">     
</span><span class="cx">     void invalidateMatchedPropertiesCache();
</span><span class="cx"> 
</span><ins>+    void clearCachedPropertiesAffectedByViewportUnits();
+
</ins><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><span class="cx">     bool createFilterOperations(CSSValue* inValue, FilterOperations&amp; outOperations);
</span><span class="cx">     void loadPendingSVGDocuments();
</span><span class="lines">@@ -239,8 +241,6 @@
</span><span class="cx"> 
</span><span class="cx">     void loadPendingResources();
</span><span class="cx"> 
</span><del>-    int viewportPercentageValue(CSSPrimitiveValue&amp; unit, int percentage);
-
</del><span class="cx">     struct RuleRange {
</span><span class="cx">         RuleRange(int&amp; firstRuleIndex, int&amp; lastRuleIndex): firstRuleIndex(firstRuleIndex), lastRuleIndex(lastRuleIndex) { }
</span><span class="cx">         int&amp; firstRuleIndex;
</span><span class="lines">@@ -333,19 +333,22 @@
</span><span class="cx">         WTF_MAKE_NONCOPYABLE(State);
</span><span class="cx">     public:
</span><span class="cx">         State()
</span><del>-        : m_element(0)
-        , m_styledElement(0)
-        , m_parentStyle(0)
-        , m_rootElementStyle(0)
-        , m_regionForStyling(0)
-        , m_elementLinkState(NotInsideLink)
-        , m_elementAffectedByClassRules(false)
-        , m_applyPropertyToRegularStyle(true)
-        , m_applyPropertyToVisitedLinkStyle(false)
-        , m_lineHeightValue(0)
-        , m_fontDirty(false)
-        , m_hasUAAppearance(false)
-        , m_backgroundData(BackgroundFillLayer) { }
</del><ins>+            : m_element(nullptr)
+            , m_styledElement(nullptr)
+            , m_parentStyle(nullptr)
+            , m_rootElementStyle(nullptr)
+            , m_regionForStyling(nullptr)
+            , m_elementLinkState(NotInsideLink)
+            , m_elementAffectedByClassRules(false)
+            , m_applyPropertyToRegularStyle(true)
+            , m_applyPropertyToVisitedLinkStyle(false)
+            , m_lineHeightValue(nullptr)
+            , m_fontDirty(false)
+            , m_fontSizeHasViewportUnits(false)
+            , m_hasUAAppearance(false)
+            , m_backgroundData(BackgroundFillLayer)
+        {
+        }
</ins><span class="cx"> 
</span><span class="cx">     public:
</span><span class="cx">         void initElement(Element*);
</span><span class="lines">@@ -355,11 +358,7 @@
</span><span class="cx">         Document&amp; document() const { return m_element-&gt;document(); }
</span><span class="cx">         Element* element() const { return m_element; }
</span><span class="cx">         StyledElement* styledElement() const { return m_styledElement; }
</span><del>-        void setStyle(PassRef&lt;RenderStyle&gt; style)
-        {
-            m_style = std::move(style);
-            m_cssToLengthConversionData = CSSToLengthConversionData(m_style.get(), m_rootElementStyle);
-        }
</del><ins>+        void setStyle(PassRef&lt;RenderStyle&gt;);
</ins><span class="cx">         RenderStyle* style() const { return m_style.get(); }
</span><span class="cx">         PassRef&lt;RenderStyle&gt; takeStyle() { return m_style.releaseNonNull(); }
</span><span class="cx"> 
</span><span class="lines">@@ -385,6 +384,8 @@
</span><span class="cx">         CSSValue* lineHeightValue() { return m_lineHeightValue; }
</span><span class="cx">         void setFontDirty(bool isDirty) { m_fontDirty = isDirty; }
</span><span class="cx">         bool fontDirty() const { return m_fontDirty; }
</span><ins>+        void setFontSizeHasViewportUnits(bool hasViewportUnits) { m_fontSizeHasViewportUnits = hasViewportUnits; }
+        bool fontSizeHasViewportUnits() const { return m_fontSizeHasViewportUnits; }
</ins><span class="cx"> 
</span><span class="cx">         void cacheBorderAndBackground();
</span><span class="cx">         bool hasUAAppearance() const { return m_hasUAAppearance; }
</span><span class="lines">@@ -405,9 +406,8 @@
</span><span class="cx">         CSSToLengthConversionData cssToLengthConversionData() const { return m_cssToLengthConversionData; }
</span><span class="cx"> 
</span><span class="cx">     private:
</span><del>-        // FIXME(bug 108563): to make it easier to review, these member
-        // variables are public. However we should add methods to access
-        // these variables.
</del><ins>+        void updateConversionData();
+
</ins><span class="cx">         Element* m_element;
</span><span class="cx">         RefPtr&lt;RenderStyle&gt; m_style;
</span><span class="cx">         StyledElement* m_styledElement;
</span><span class="lines">@@ -430,6 +430,7 @@
</span><span class="cx"> #endif
</span><span class="cx">         CSSValue* m_lineHeightValue;
</span><span class="cx">         bool m_fontDirty;
</span><ins>+        bool m_fontSizeHasViewportUnits;
</ins><span class="cx"> 
</span><span class="cx">         bool m_hasUAAppearance;
</span><span class="cx">         BorderData m_borderData;
</span></span></pre></div>
<a id="trunkSourceWebCorecssTransformFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/TransformFunctions.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/TransformFunctions.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/css/TransformFunctions.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx"> 
</span><span class="cx"> static Length convertToFloatLength(const CSSPrimitiveValue* primitiveValue, const CSSToLengthConversionData&amp; conversionData)
</span><span class="cx"> {
</span><del>-    return primitiveValue ? primitiveValue-&gt;convertToLength&lt;FixedFloatConversion | PercentConversion | CalculatedConversion | FractionConversion | ViewportPercentageConversion&gt;(conversionData) : Length(Undefined);
</del><ins>+    return primitiveValue ? primitiveValue-&gt;convertToLength&lt;FixedFloatConversion | PercentConversion | CalculatedConversion | FractionConversion&gt;(conversionData) : Length(Undefined);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool transformsForValue(CSSValue* value, const CSSToLengthConversionData&amp; conversionData, TransformOperations&amp; outOperations)
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/dom/Document.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -114,6 +114,7 @@
</span><span class="cx"> #include &quot;PointerLockController.h&quot;
</span><span class="cx"> #include &quot;PopStateEvent.h&quot;
</span><span class="cx"> #include &quot;ProcessingInstruction.h&quot;
</span><ins>+#include &quot;RenderChildIterator.h&quot;
</ins><span class="cx"> #include &quot;RenderLayerCompositor.h&quot;
</span><span class="cx"> #include &quot;RenderView.h&quot;
</span><span class="cx"> #include &quot;RenderWidget.h&quot;
</span><span class="lines">@@ -513,6 +514,7 @@
</span><span class="cx">     , m_disabledFieldsetElementsCount(0)
</span><span class="cx">     , m_hasInjectedPlugInsScript(false)
</span><span class="cx">     , m_renderTreeBeingDestroyed(false)
</span><ins>+    , m_hasStyleWithViewportUnits(false)
</ins><span class="cx"> {
</span><span class="cx">     allDocuments().add(this);
</span><span class="cx"> 
</span><span class="lines">@@ -1872,7 +1874,6 @@
</span><span class="cx"> void Document::pageSizeAndMarginsInPixels(int pageIndex, IntSize&amp; pageSize, int&amp; marginTop, int&amp; marginRight, int&amp; marginBottom, int&amp; marginLeft)
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;RenderStyle&gt; style = ensureStyleResolver().styleForPage(pageIndex);
</span><del>-    RenderView* view = renderView();
</del><span class="cx"> 
</span><span class="cx">     int width = pageSize.width();
</span><span class="cx">     int height = pageSize.height();
</span><span class="lines">@@ -1891,8 +1892,8 @@
</span><span class="cx">         LengthSize size = style-&gt;pageSize();
</span><span class="cx">         ASSERT(size.width().isFixed());
</span><span class="cx">         ASSERT(size.height().isFixed());
</span><del>-        width = valueForLength(size.width(), 0, view);
-        height = valueForLength(size.height(), 0, view);
</del><ins>+        width = valueForLength(size.width(), 0);
+        height = valueForLength(size.height(), 0);
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx">     default:
</span><span class="lines">@@ -1902,10 +1903,10 @@
</span><span class="cx"> 
</span><span class="cx">     // The percentage is calculated with respect to the width even for margin top and bottom.
</span><span class="cx">     // http://www.w3.org/TR/CSS2/box.html#margin-properties
</span><del>-    marginTop = style-&gt;marginTop().isAuto() ? marginTop : intValueForLength(style-&gt;marginTop(), width, view);
-    marginRight = style-&gt;marginRight().isAuto() ? marginRight : intValueForLength(style-&gt;marginRight(), width, view);
-    marginBottom = style-&gt;marginBottom().isAuto() ? marginBottom : intValueForLength(style-&gt;marginBottom(), width, view);
-    marginLeft = style-&gt;marginLeft().isAuto() ? marginLeft : intValueForLength(style-&gt;marginLeft(), width, view);
</del><ins>+    marginTop = style-&gt;marginTop().isAuto() ? marginTop : intValueForLength(style-&gt;marginTop(), width);
+    marginRight = style-&gt;marginRight().isAuto() ? marginRight : intValueForLength(style-&gt;marginRight(), width);
+    marginBottom = style-&gt;marginBottom().isAuto() ? marginBottom : intValueForLength(style-&gt;marginBottom(), width);
+    marginLeft = style-&gt;marginLeft().isAuto() ? marginLeft : intValueForLength(style-&gt;marginLeft(), width);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Document::createStyleResolver()
</span><span class="lines">@@ -3172,6 +3173,21 @@
</span><span class="cx">     m_optimizedStyleSheetUpdateTimer.startOneShot(0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Document::updateViewportUnitsOnResize()
+{
+    if (!hasStyleWithViewportUnits())
+        return;
+
+    ensureStyleResolver().clearCachedPropertiesAffectedByViewportUnits();
+
+    // FIXME: Ideally, we should save the list of elements that have viewport units and only iterate over those.
+    for (Element* element = ElementTraversal::firstWithin(&amp;rootNode()); element; element = ElementTraversal::nextIncludingPseudo(element)) {
+        auto* renderer = element-&gt;renderer();
+        if (renderer &amp;&amp; renderer-&gt;style().hasViewportUnits())
+            element-&gt;setNeedsStyleRecalc(InlineStyleChange);
+    }
+}
+
</ins><span class="cx"> void Document::styleResolverChanged(StyleResolverUpdateFlag updateFlag)
</span><span class="cx"> {
</span><span class="cx">     if (m_optimizedStyleSheetUpdateTimer.isActive())
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/dom/Document.h        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -1273,6 +1273,10 @@
</span><span class="cx">     virtual bool unwrapCryptoKey(const Vector&lt;uint8_t&gt;&amp; wrappedKey, Vector&lt;uint8_t&gt;&amp; key) override;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    void setHasStyleWithViewportUnits() { m_hasStyleWithViewportUnits = true; }
+    bool hasStyleWithViewportUnits() const { return m_hasStyleWithViewportUnits; }
+    void updateViewportUnitsOnResize();
+
</ins><span class="cx"> protected:
</span><span class="cx">     enum ConstructionFlags { Synthesized = 1, NonRenderedPlaceholder = 1 &lt;&lt; 1 };
</span><span class="cx">     Document(Frame*, const URL&amp;, unsigned = DefaultDocumentClass, unsigned constructionFlags = 0);
</span><span class="lines">@@ -1691,6 +1695,8 @@
</span><span class="cx"> 
</span><span class="cx">     bool m_hasInjectedPlugInsScript;
</span><span class="cx">     bool m_renderTreeBeingDestroyed;
</span><ins>+
+    bool m_hasStyleWithViewportUnits;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline void Document::notifyRemovePendingSheetIfNeeded()
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAreaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAreaElement.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAreaElement.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/html/HTMLAreaElement.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -143,30 +143,29 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     Path path;
</span><del>-    RenderView* renderView = document().renderView();
</del><span class="cx">     switch (shape) {
</span><span class="cx">         case Poly:
</span><span class="cx">             if (m_coordsLen &gt;= 6) {
</span><span class="cx">                 int numPoints = m_coordsLen / 2;
</span><del>-                path.moveTo(FloatPoint(minimumValueForLength(m_coords[0], width, renderView), minimumValueForLength(m_coords[1], height, renderView)));
</del><ins>+                path.moveTo(FloatPoint(minimumValueForLength(m_coords[0], width), minimumValueForLength(m_coords[1], height)));
</ins><span class="cx">                 for (int i = 1; i &lt; numPoints; ++i)
</span><del>-                    path.addLineTo(FloatPoint(minimumValueForLength(m_coords[i * 2], width, renderView), minimumValueForLength(m_coords[i * 2 + 1], height, renderView)));
</del><ins>+                    path.addLineTo(FloatPoint(minimumValueForLength(m_coords[i * 2], width), minimumValueForLength(m_coords[i * 2 + 1], height)));
</ins><span class="cx">                 path.closeSubpath();
</span><span class="cx">             }
</span><span class="cx">             break;
</span><span class="cx">         case Circle:
</span><span class="cx">             if (m_coordsLen &gt;= 3) {
</span><span class="cx">                 Length radius = m_coords[2];
</span><del>-                int r = std::min(minimumValueForLength(radius, width, renderView), minimumValueForLength(radius, height, renderView));
-                path.addEllipse(FloatRect(minimumValueForLength(m_coords[0], width, renderView) - r, minimumValueForLength(m_coords[1], height, renderView) - r, 2 * r, 2 * r));
</del><ins>+                int r = std::min(minimumValueForLength(radius, width), minimumValueForLength(radius, height));
+                path.addEllipse(FloatRect(minimumValueForLength(m_coords[0], width) - r, minimumValueForLength(m_coords[1], height) - r, 2 * r, 2 * r));
</ins><span class="cx">             }
</span><span class="cx">             break;
</span><span class="cx">         case Rect:
</span><span class="cx">             if (m_coordsLen &gt;= 4) {
</span><del>-                int x0 = minimumValueForLength(m_coords[0], width, renderView);
-                int y0 = minimumValueForLength(m_coords[1], height, renderView);
-                int x1 = minimumValueForLength(m_coords[2], width, renderView);
-                int y1 = minimumValueForLength(m_coords[3], height, renderView);
</del><ins>+                int x0 = minimumValueForLength(m_coords[0], width);
+                int y0 = minimumValueForLength(m_coords[1], height);
+                int x1 = minimumValueForLength(m_coords[2], width);
+                int y1 = minimumValueForLength(m_coords[3], height);
</ins><span class="cx">                 path.addRect(FloatRect(x0, y0, x1 - x0, y1 - y0));
</span><span class="cx">             }
</span><span class="cx">             break;
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -1144,7 +1144,7 @@
</span><span class="cx"> 
</span><span class="cx">         // Viewport-dependent media queries may cause us to need completely different style information.
</span><span class="cx">         StyleResolver* styleResolver = document.styleResolverIfExists();
</span><del>-        if (!styleResolver || styleResolver-&gt;affectedByViewportChange()) {
</del><ins>+        if (!styleResolver || styleResolver-&gt;hasMediaQueriesAffectedByViewportChange()) {
</ins><span class="cx">             document.styleResolverChanged(DeferRecalcStyle);
</span><span class="cx">             // FIXME: This instrumentation event is not strictly accurate since cached media query results do not persist across StyleResolver rebuilds.
</span><span class="cx">             InspectorInstrumentation::mediaQueryResultChanged(&amp;document);
</span><span class="lines">@@ -1247,6 +1247,8 @@
</span><span class="cx">                         bodyRenderer-&gt;setChildNeedsLayout();
</span><span class="cx">                     else if (rootRenderer &amp;&amp; rootRenderer-&gt;stretchesToViewport())
</span><span class="cx">                         rootRenderer-&gt;setChildNeedsLayout();
</span><ins>+
+                    document.updateViewportUnitsOnResize();
</ins><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLengthh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Length.h (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Length.h        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/platform/Length.h        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -37,12 +37,11 @@
</span><span class="cx">     Intrinsic, MinIntrinsic,
</span><span class="cx">     MinContent, MaxContent, FillAvailable, FitContent,
</span><span class="cx">     Calculated,
</span><del>-    ViewportPercentageWidth, ViewportPercentageHeight, ViewportPercentageMin, ViewportPercentageMax,
</del><span class="cx">     Undefined
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-class CalculationValue;    
-    
</del><ins>+class CalculationValue;
+
</ins><span class="cx"> struct Length {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><span class="lines">@@ -105,7 +104,6 @@
</span><span class="cx">     bool isIntrinsicOrAuto() const;
</span><span class="cx">     bool isSpecified() const;
</span><span class="cx">     bool isSpecifiedOrIntrinsic() const;
</span><del>-    bool isViewportPercentage() const;
</del><span class="cx"> 
</span><span class="cx">     // Blend two lengths to produce a new length that is in between them. Used for animation.
</span><span class="cx">     // FIXME: Why is this a member function?
</span><span class="lines">@@ -263,12 +261,6 @@
</span><span class="cx">     return value();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline float Length::viewportPercentageLength() const
-{
-    ASSERT(isViewportPercentage());
-    return value();
-}
-
</del><span class="cx"> inline LengthType Length::type() const
</span><span class="cx"> {
</span><span class="cx">     return static_cast&lt;LengthType&gt;(m_type);
</span><span class="lines">@@ -397,7 +389,7 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool Length::isSpecified() const
</span><span class="cx"> {
</span><del>-    return isFixed() || isPercent() || isViewportPercentage();
</del><ins>+    return isFixed() || isPercent();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline bool Length::isSpecifiedOrIntrinsic() const
</span><span class="lines">@@ -405,11 +397,6 @@
</span><span class="cx">     return isSpecified() || isIntrinsic();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline bool Length::isViewportPercentage() const
-{
-    return type() &gt;= ViewportPercentageWidth &amp;&amp; type() &lt;= ViewportPercentageMax;
-}
-
</del><span class="cx"> // FIXME: Does this need to be in the header? Is it valuable to inline? Does it get inlined?
</span><span class="cx"> inline Length Length::blend(const Length&amp; from, double progress) const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingClipPathOperationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/ClipPathOperation.h (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/ClipPathOperation.h        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/ClipPathOperation.h        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -102,11 +102,11 @@
</span><span class="cx"> 
</span><span class="cx">     const BasicShape* basicShape() const { return m_shape.get(); }
</span><span class="cx">     WindRule windRule() const { return m_shape-&gt;windRule(); }
</span><del>-    const Path pathForReferenceRect(const FloatRect&amp; boundingRect, RenderView* view) const
</del><ins>+    const Path pathForReferenceRect(const FloatRect&amp; boundingRect) const
</ins><span class="cx">     {
</span><span class="cx">         ASSERT(m_shape);
</span><span class="cx">         Path path;
</span><del>-        m_shape-&gt;path(path, boundingRect, view);
</del><ins>+        m_shape-&gt;path(path, boundingRect);
</ins><span class="cx">         return path;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -140,7 +140,7 @@
</span><span class="cx">         return adoptRef(new BoxClipPathOperation(referenceBox));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    const Path pathForReferenceRect(const RoundedRect&amp; boundingRect, RenderView*) const
</del><ins>+    const Path pathForReferenceRect(const RoundedRect&amp; boundingRect) const
</ins><span class="cx">     {
</span><span class="cx">         Path path;
</span><span class="cx">         path.addRoundedRect(boundingRect);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -1239,7 +1239,7 @@
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Technically percentage height objects only need a relayout if their percentage isn't going to be turned into
</span><span class="cx">     // an auto value. Add a method to determine this, so that we can avoid the relayout.
</span><del>-    if (relayoutChildren || (child.hasRelativeLogicalHeight() &amp;&amp; !isRenderView()) || child.hasViewportPercentageLogicalHeight())
</del><ins>+    if (relayoutChildren || (child.hasRelativeLogicalHeight() &amp;&amp; !isRenderView()))
</ins><span class="cx">         child.setChildNeedsLayout(MarkOnlyThis);
</span><span class="cx"> 
</span><span class="cx">     // If relayoutChildren is set and the child has percentage padding or an embedded content box, we also need to invalidate the childs pref widths.
</span><span class="lines">@@ -2541,7 +2541,7 @@
</span><span class="cx">             case CSSBoxType::ViewBox:
</span><span class="cx">                 referenceBoxRect = borderBoxRect();
</span><span class="cx">             }
</span><del>-            if (!clipPath-&gt;pathForReferenceRect(referenceBoxRect, &amp;view()).contains(locationInContainer.point() - localOffset, clipPath-&gt;windRule()))
</del><ins>+            if (!clipPath-&gt;pathForReferenceRect(referenceBoxRect).contains(locationInContainer.point() - localOffset, clipPath-&gt;windRule()))
</ins><span class="cx">                 return false;
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -2572,7 +2572,7 @@
</span><span class="cx">     if (!isRenderView() &amp;&amp; style().hasBorderRadius()) {
</span><span class="cx">         LayoutRect borderRect = borderBoxRect();
</span><span class="cx">         borderRect.moveBy(adjustedLocation);
</span><del>-        RoundedRect border = style().getRoundedBorderFor(borderRect, &amp;view());
</del><ins>+        RoundedRect border = style().getRoundedBorderFor(borderRect);
</ins><span class="cx">         if (!locationInContainer.intersects(border))
</span><span class="cx">             return false;
</span><span class="cx">     }
</span><span class="lines">@@ -3340,11 +3340,11 @@
</span><span class="cx">     if (firstLine &amp;&amp; document().styleSheetCollection().usesFirstLineRules()) {
</span><span class="cx">         RenderStyle&amp; s = firstLine ? firstLineStyle() : style();
</span><span class="cx">         if (&amp;s != &amp;style())
</span><del>-            return s.computedLineHeight(&amp;view());
</del><ins>+            return s.computedLineHeight();
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (m_lineHeight == -1)
</span><del>-        m_lineHeight = style().computedLineHeight(&amp;view());
</del><ins>+        m_lineHeight = style().computedLineHeight();
</ins><span class="cx"> 
</span><span class="cx">     return m_lineHeight;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -1242,7 +1242,7 @@
</span><span class="cx">         // To avoid the background color bleeding out behind the border, we'll render background and border
</span><span class="cx">         // into a transparency layer, and then clip that in one go (which requires setting up the clip before
</span><span class="cx">         // beginning the layer).
</span><del>-        RoundedRect border = style().getRoundedBorderFor(paintRect, &amp;view());
</del><ins>+        RoundedRect border = style().getRoundedBorderFor(paintRect);
</ins><span class="cx">         stateSaver.save();
</span><span class="cx">         paintInfo.context-&gt;clipRoundedRect(FloatRoundedRect(border));
</span><span class="cx">         paintInfo.context-&gt;beginTransparencyLayer(1);
</span><span class="lines">@@ -2731,8 +2731,6 @@
</span><span class="cx">         return height.value();
</span><span class="cx">     if (height.isPercent())
</span><span class="cx">         return computePercentageLogicalHeight(height);
</span><del>-    if (height.isViewportPercentage())
-        return valueForLength(height, 0);
</del><span class="cx">     return -1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2818,17 +2816,6 @@
</span><span class="cx">             LayoutUnit contentBoxHeight = cb-&gt;constrainContentBoxLogicalHeightByMinMax(contentBoxHeightWithScrollbar - cb-&gt;scrollbarLogicalHeight());
</span><span class="cx">             availableHeight = std::max&lt;LayoutUnit&gt;(0, contentBoxHeight);
</span><span class="cx">         }
</span><del>-    } else if (cbstyle.logicalHeight().isViewportPercentage()) {
-        LayoutUnit heightWithScrollbar = valueForLength(cbstyle.logicalHeight(), 0);
-        if (heightWithScrollbar != -1) {
-            LayoutUnit contentBoxHeightWithScrollbar = cb-&gt;adjustContentBoxLogicalHeightForBoxSizing(heightWithScrollbar);
-            // We need to adjust for min/max height because this method does 
-            // not handle the min/max of the current block, its caller does.
-            // So the return value from the recursive call will not have been
-            // adjusted yet.
-            LayoutUnit contentBoxHeight = cb-&gt;constrainContentBoxLogicalHeightByMinMax(contentBoxHeightWithScrollbar - cb-&gt;scrollbarLogicalHeight());
-            availableHeight = std::max&lt;LayoutUnit&gt;(0, contentBoxHeight);
-        }
</del><span class="cx">     } else if (isOutOfFlowPositionedWithSpecifiedHeight) {
</span><span class="cx">         // Don't allow this to affect the block' height() member variable, since this
</span><span class="cx">         // can get called while the block is still laying out its kids.
</span><span class="lines">@@ -2878,11 +2865,6 @@
</span><span class="cx">             LayoutUnit availableLogicalWidth = 0;
</span><span class="cx">             return computeIntrinsicLogicalWidthUsing(logicalWidth, availableLogicalWidth, borderAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth();
</span><span class="cx">         }
</span><del>-        case ViewportPercentageWidth:
-        case ViewportPercentageHeight:
-        case ViewportPercentageMin:
-        case ViewportPercentageMax:
-            return adjustContentBoxLogicalWidthForBoxSizing(valueForLength(logicalWidth, 0));
</del><span class="cx">         case FitContent:
</span><span class="cx">         case FillAvailable:
</span><span class="cx">         case Percent: 
</span><span class="lines">@@ -2976,11 +2958,6 @@
</span><span class="cx">             }
</span><span class="cx">             return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeight, availableHeight));
</span><span class="cx">         }
</span><del>-        case ViewportPercentageWidth:
-        case ViewportPercentageHeight:
-        case ViewportPercentageMin:
-        case ViewportPercentageMax:
-            return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeight, 0));
</del><span class="cx">         default:
</span><span class="cx">             return intrinsicLogicalHeight();
</span><span class="cx">     }
</span><span class="lines">@@ -4731,13 +4708,6 @@
</span><span class="cx">             || style().logicalMaxHeight().isPercent();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool RenderBox::hasViewportPercentageLogicalHeight() const
-{
-    return style().logicalHeight().isViewportPercentage()
-        || style().logicalMinHeight().isViewportPercentage()
-        || style().logicalMaxHeight().isViewportPercentage();
-}
-
</del><span class="cx"> static void markBoxForRelayoutAfterSplit(RenderBox* box)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: The table code should handle that automatically. If not,
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.h (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.h        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RenderBox.h        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -570,7 +570,6 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool hasRelativeDimensions() const;
</span><span class="cx">     virtual bool hasRelativeLogicalHeight() const;
</span><del>-    bool hasViewportPercentageLogicalHeight() const;
</del><span class="cx"> 
</span><span class="cx">     bool hasHorizontalLayoutOverflow() const
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -510,9 +510,9 @@
</span><span class="cx"> RoundedRect RenderBoxModelObject::getBackgroundRoundedRect(const LayoutRect&amp; borderRect, InlineFlowBox* box, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHeight,
</span><span class="cx">     bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
</span><span class="cx"> {
</span><del>-    RoundedRect border = style().getRoundedBorderFor(borderRect, &amp;view(), includeLogicalLeftEdge, includeLogicalRightEdge);
</del><ins>+    RoundedRect border = style().getRoundedBorderFor(borderRect, includeLogicalLeftEdge, includeLogicalRightEdge);
</ins><span class="cx">     if (box &amp;&amp; (box-&gt;nextLineBox() || box-&gt;prevLineBox())) {
</span><del>-        RoundedRect segmentBorder = style().getRoundedBorderFor(LayoutRect(0, 0, inlineBoxWidth, inlineBoxHeight), &amp;view(), includeLogicalLeftEdge, includeLogicalRightEdge);
</del><ins>+        RoundedRect segmentBorder = style().getRoundedBorderFor(LayoutRect(0, 0, inlineBoxWidth, inlineBoxHeight), includeLogicalLeftEdge, includeLogicalRightEdge);
</ins><span class="cx">         border.setRadii(segmentBorder.radii());
</span><span class="cx">     }
</span><span class="cx">     return border;
</span><span class="lines">@@ -952,12 +952,12 @@
</span><span class="cx"> 
</span><span class="cx">             if (layerWidth.isFixed())
</span><span class="cx">                 tileSize.setWidth(layerWidth.value());
</span><del>-            else if (layerWidth.isPercent() || layerWidth.isViewportPercentage())
</del><ins>+            else if (layerWidth.isPercent())
</ins><span class="cx">                 tileSize.setWidth(valueForLength(layerWidth, positioningAreaSize.width()));
</span><span class="cx">             
</span><span class="cx">             if (layerHeight.isFixed())
</span><span class="cx">                 tileSize.setHeight(layerHeight.value());
</span><del>-            else if (layerHeight.isPercent() || layerHeight.isViewportPercentage())
</del><ins>+            else if (layerHeight.isPercent())
</ins><span class="cx">                 tileSize.setHeight(valueForLength(layerHeight, positioningAreaSize.height()));
</span><span class="cx"> 
</span><span class="cx">             // If one of the values is auto we have to use the appropriate
</span><span class="lines">@@ -1228,13 +1228,13 @@
</span><span class="cx">     destRect = geometry.destRect();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static LayoutUnit computeBorderImageSide(Length borderSlice, LayoutUnit borderSide, LayoutUnit imageSide, LayoutUnit boxExtent, RenderView* renderView)
</del><ins>+static LayoutUnit computeBorderImageSide(Length borderSlice, LayoutUnit borderSide, LayoutUnit imageSide, LayoutUnit boxExtent)
</ins><span class="cx"> {
</span><span class="cx">     if (borderSlice.isRelative())
</span><span class="cx">         return borderSlice.value() * borderSide;
</span><span class="cx">     if (borderSlice.isAuto())
</span><span class="cx">         return imageSide;
</span><del>-    return valueForLength(borderSlice, boxExtent, renderView);
</del><ins>+    return valueForLength(borderSlice, boxExtent);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RenderBoxModelObject::paintNinePieceImage(GraphicsContext* graphicsContext, const LayoutRect&amp; rect, const RenderStyle&amp; style,
</span><span class="lines">@@ -1264,7 +1264,6 @@
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit imageWidth = imageSize.width();
</span><span class="cx">     LayoutUnit imageHeight = imageSize.height();
</span><del>-    RenderView* renderView = &amp;view();
</del><span class="cx"> 
</span><span class="cx">     float imageScaleFactor = styleImage-&gt;imageScaleFactor();
</span><span class="cx">     LayoutUnit topSlice = std::min&lt;LayoutUnit&gt;(imageHeight, valueForLength(ninePieceImage.imageSlices().top(), imageHeight)) * imageScaleFactor;
</span><span class="lines">@@ -1275,11 +1274,11 @@
</span><span class="cx">     ENinePieceImageRule hRule = ninePieceImage.horizontalRule();
</span><span class="cx">     ENinePieceImageRule vRule = ninePieceImage.verticalRule();
</span><span class="cx"> 
</span><del>-    LayoutUnit topWidth = computeBorderImageSide(ninePieceImage.borderSlices().top(), style.borderTopWidth(), topSlice, borderImageRect.height(), renderView);
-    LayoutUnit rightWidth = computeBorderImageSide(ninePieceImage.borderSlices().right(), style.borderRightWidth(), rightSlice, borderImageRect.width(), renderView);
-    LayoutUnit bottomWidth = computeBorderImageSide(ninePieceImage.borderSlices().bottom(), style.borderBottomWidth(), bottomSlice, borderImageRect.height(), renderView);
-    LayoutUnit leftWidth = computeBorderImageSide(ninePieceImage.borderSlices().left(), style.borderLeftWidth(), leftSlice, borderImageRect.width(), renderView);
-    
</del><ins>+    LayoutUnit topWidth = computeBorderImageSide(ninePieceImage.borderSlices().top(), style.borderTopWidth(), topSlice, borderImageRect.height());
+    LayoutUnit rightWidth = computeBorderImageSide(ninePieceImage.borderSlices().right(), style.borderRightWidth(), rightSlice, borderImageRect.width());
+    LayoutUnit bottomWidth = computeBorderImageSide(ninePieceImage.borderSlices().bottom(), style.borderBottomWidth(), bottomSlice, borderImageRect.height());
+    LayoutUnit leftWidth = computeBorderImageSide(ninePieceImage.borderSlices().left(), style.borderLeftWidth(), leftSlice, borderImageRect.width());
+
</ins><span class="cx">     // Reduce the widths if they're too large.
</span><span class="cx">     // The spec says: Given Lwidth as the width of the border image area, Lheight as its height, and Wside as the border image width
</span><span class="cx">     // offset for the side, let f = min(Lwidth/(Wleft+Wright), Lheight/(Wtop+Wbottom)). If f &lt; 1, then all W are reduced by
</span><span class="lines">@@ -1728,7 +1727,7 @@
</span><span class="cx"> 
</span><span class="cx">     BorderEdge edges[4];
</span><span class="cx">     BorderEdge::getBorderEdgeInfo(edges, style, document().deviceScaleFactor(), includeLogicalLeftEdge, includeLogicalRightEdge);
</span><del>-    RoundedRect outerBorder = style.getRoundedBorderFor(rect, &amp;view(), includeLogicalLeftEdge, includeLogicalRightEdge);
</del><ins>+    RoundedRect outerBorder = style.getRoundedBorderFor(rect, includeLogicalLeftEdge, includeLogicalRightEdge);
</ins><span class="cx">     RoundedRect innerBorder = style.getRoundedInnerBorderFor(borderInnerRectAdjustedForBleedAvoidance(*graphicsContext, rect, bleedAvoidance), includeLogicalLeftEdge, includeLogicalRightEdge);
</span><span class="cx"> 
</span><span class="cx">     bool haveAlphaColor = false;
</span><span class="lines">@@ -2370,7 +2369,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     RoundedRect border = (shadowStyle == Inset) ? style.getRoundedInnerBorderFor(paintRect, includeLogicalLeftEdge, includeLogicalRightEdge)
</span><del>-        : style.getRoundedBorderFor(paintRect, &amp;view(), includeLogicalLeftEdge, includeLogicalRightEdge);
</del><ins>+        : style.getRoundedBorderFor(paintRect, includeLogicalLeftEdge, includeLogicalRightEdge);
</ins><span class="cx"> 
</span><span class="cx">     bool hasBorderRadius = style.hasBorderRadius();
</span><span class="cx">     bool isHorizontal = style.isHorizontalWritingMode();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderElement.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -1244,7 +1244,7 @@
</span><span class="cx">         LayoutUnit borderRight = isBox() ? toRenderBox(this)-&gt;borderRight() : LayoutUnit::fromPixel(0);
</span><span class="cx">         LayoutUnit boxWidth = isBox() ? toRenderBox(this)-&gt;width() : LayoutUnit();
</span><span class="cx">         LayoutUnit minInsetRightShadowExtent = std::min&lt;LayoutUnit&gt;(-insetShadowExtent.right(), std::min&lt;LayoutUnit&gt;(newBounds.width(), oldBounds.width()));
</span><del>-        LayoutUnit borderWidth = std::max&lt;LayoutUnit&gt;(borderRight, std::max&lt;LayoutUnit&gt;(valueForLength(style().borderTopRightRadius().width(), boxWidth, &amp;view()), valueForLength(style().borderBottomRightRadius().width(), boxWidth)));
</del><ins>+        LayoutUnit borderWidth = std::max&lt;LayoutUnit&gt;(borderRight, std::max&lt;LayoutUnit&gt;(valueForLength(style().borderTopRightRadius().width(), boxWidth), valueForLength(style().borderBottomRightRadius().width(), boxWidth)));
</ins><span class="cx">         LayoutUnit decorationsWidth = std::max&lt;LayoutUnit&gt;(-outlineStyle.outlineOffset(), borderWidth + minInsetRightShadowExtent) + std::max&lt;LayoutUnit&gt;(outlineWidth, shadowRight);
</span><span class="cx">         LayoutRect rightRect(newOutlineBox.x() + std::min(newOutlineBox.width(), oldOutlineBox.width()) - decorationsWidth,
</span><span class="cx">             newOutlineBox.y(),
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderElement.h (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderElement.h        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RenderElement.h        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -176,7 +176,7 @@
</span><span class="cx">     enum StylePropagationType { PropagateToAllChildren, PropagateToBlockChildrenOnly };
</span><span class="cx">     void propagateStyleToAnonymousChildren(StylePropagationType);
</span><span class="cx"> 
</span><del>-    LayoutUnit valueForLength(const Length&amp;, LayoutUnit maximumValue, bool roundPercentages = false) const;
</del><ins>+    LayoutUnit valueForLength(const Length&amp;, LayoutUnit maximumValue) const;
</ins><span class="cx">     LayoutUnit minimumValueForLength(const Length&amp;, LayoutUnit maximumValue, bool roundPercentages = false) const;
</span><span class="cx"> 
</span><span class="cx">     void setFirstChild(RenderObject* child) { m_firstChild = child; }
</span><span class="lines">@@ -266,14 +266,14 @@
</span><span class="cx">         markContainingBlocksForLayout();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline LayoutUnit RenderElement::valueForLength(const Length&amp; length, LayoutUnit maximumValue, bool roundPercentages) const
</del><ins>+inline LayoutUnit RenderElement::valueForLength(const Length&amp; length, LayoutUnit maximumValue) const
</ins><span class="cx"> {
</span><del>-    return WebCore::valueForLength(length, maximumValue, &amp;view(), roundPercentages);
</del><ins>+    return WebCore::valueForLength(length, maximumValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline LayoutUnit RenderElement::minimumValueForLength(const Length&amp; length, LayoutUnit maximumValue, bool roundPercentages) const
</span><span class="cx"> {
</span><del>-    return WebCore::minimumValueForLength(length, maximumValue, &amp;view(), roundPercentages);
</del><ins>+    return WebCore::minimumValueForLength(length, maximumValue, roundPercentages);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline bool RenderElement::isRenderLayerModelObject() const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderGridcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderGrid.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -815,7 +815,7 @@
</span><span class="cx"> 
</span><span class="cx">         LayoutUnit overrideContainingBlockContentLogicalWidth = gridAreaBreadthForChild(child, ForColumns, sizingData.columnTracks);
</span><span class="cx">         LayoutUnit overrideContainingBlockContentLogicalHeight = gridAreaBreadthForChild(child, ForRows, sizingData.rowTracks);
</span><del>-        if (oldOverrideContainingBlockContentLogicalWidth != overrideContainingBlockContentLogicalWidth || (oldOverrideContainingBlockContentLogicalHeight != overrideContainingBlockContentLogicalHeight &amp;&amp; (child-&gt;hasRelativeLogicalHeight() || child-&gt;hasViewportPercentageLogicalHeight())))
</del><ins>+        if (oldOverrideContainingBlockContentLogicalWidth != overrideContainingBlockContentLogicalWidth || (oldOverrideContainingBlockContentLogicalHeight != overrideContainingBlockContentLogicalHeight &amp;&amp; child-&gt;hasRelativeLogicalHeight()))
</ins><span class="cx">             child-&gt;setNeedsLayout(MarkOnlyThis);
</span><span class="cx"> 
</span><span class="cx">         child-&gt;setOverrideContainingBlockContentLogicalWidth(overrideContainingBlockContentLogicalWidth);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderInlinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderInline.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -739,8 +739,6 @@
</span><span class="cx">         return margin.value();
</span><span class="cx">     if (margin.isPercent())
</span><span class="cx">         return minimumValueForLength(margin, std::max&lt;LayoutUnit&gt;(0, renderer-&gt;containingBlock()-&gt;availableLogicalWidth()));
</span><del>-    if (margin.isViewportPercentage())
-        return valueForLength(margin, 0, &amp;renderer-&gt;view());
</del><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1399,10 +1397,10 @@
</span><span class="cx">     if (firstLine &amp;&amp; document().styleSheetCollection().usesFirstLineRules()) {
</span><span class="cx">         const RenderStyle&amp; firstLineStyle = this-&gt;firstLineStyle();
</span><span class="cx">         if (&amp;firstLineStyle != &amp;style())
</span><del>-            return firstLineStyle.computedLineHeight(&amp;view());
</del><ins>+            return firstLineStyle.computedLineHeight();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return style().computedLineHeight(&amp;view());
</del><ins>+    return style().computedLineHeight();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int RenderInline::baselinePosition(FontBaseline baselineType, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -3829,7 +3829,7 @@
</span><span class="cx"> 
</span><span class="cx">         LayoutRect referenceBox = computeReferenceBox(renderer(), clippingPath, offsetFromRoot, rootRelativeBounds);
</span><span class="cx">         context-&gt;save();
</span><del>-        context-&gt;clipPath(clippingPath.pathForReferenceRect(referenceBox, &amp;m_renderer.view()), clippingPath.windRule());
</del><ins>+        context-&gt;clipPath(clippingPath.pathForReferenceRect(referenceBox), clippingPath.windRule());
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -3840,7 +3840,7 @@
</span><span class="cx">         shapeRect.moveBy(offsetFromRoot);
</span><span class="cx"> 
</span><span class="cx">         context-&gt;save();
</span><del>-        context-&gt;clipPath(clippingPath.pathForReferenceRect(shapeRect, &amp;m_renderer.view()), RULE_NONZERO);
</del><ins>+        context-&gt;clipPath(clippingPath.pathForReferenceRect(shapeRect), RULE_NONZERO);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLineBreakcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLineBreak.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLineBreak.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RenderLineBreak.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -58,11 +58,11 @@
</span><span class="cx">     if (firstLine &amp;&amp; document().styleSheetCollection().usesFirstLineRules()) {
</span><span class="cx">         const RenderStyle&amp; firstLineStyle = this-&gt;firstLineStyle();
</span><span class="cx">         if (&amp;firstLineStyle != &amp;style())
</span><del>-            return firstLineStyle.computedLineHeight(&amp;view());
</del><ins>+            return firstLineStyle.computedLineHeight();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (m_cachedLineHeight == invalidLineHeight)
</span><del>-        m_cachedLineHeight = style().computedLineHeight(&amp;view());
</del><ins>+        m_cachedLineHeight = style().computedLineHeight();
</ins><span class="cx">     
</span><span class="cx">     return m_cachedLineHeight;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderScrollbarPartcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderScrollbarPart.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderScrollbarPart.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RenderScrollbarPart.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -79,10 +79,10 @@
</span><span class="cx">     } 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static int calcScrollbarThicknessUsing(SizeType sizeType, const Length&amp; length, int containingLength, RenderView* renderView)
</del><ins>+static int calcScrollbarThicknessUsing(SizeType sizeType, const Length&amp; length, int containingLength)
</ins><span class="cx"> {
</span><span class="cx">     if (!length.isIntrinsicOrAuto() || (sizeType == MinSize &amp;&amp; length.isAuto()))
</span><del>-        return minimumValueForLength(length, containingLength, renderView);
</del><ins>+        return minimumValueForLength(length, containingLength);
</ins><span class="cx">     return ScrollbarTheme::theme()-&gt;scrollbarThickness();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -90,36 +90,34 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_scrollbar-&gt;owningRenderer())
</span><span class="cx">         return;
</span><del>-    RenderView* renderView = &amp;view();
</del><span class="cx">     // FIXME: We are querying layout information but nothing guarantees that it's up-to-date, especially since we are called at style change.
</span><span class="cx">     // FIXME: Querying the style's border information doesn't work on table cells with collapsing borders.
</span><span class="cx">     int visibleSize = m_scrollbar-&gt;owningRenderer()-&gt;width() - m_scrollbar-&gt;owningRenderer()-&gt;style().borderLeftWidth() - m_scrollbar-&gt;owningRenderer()-&gt;style().borderRightWidth();
</span><del>-    int w = calcScrollbarThicknessUsing(MainOrPreferredSize, style().width(), visibleSize, renderView);
-    int minWidth = calcScrollbarThicknessUsing(MinSize, style().minWidth(), visibleSize, renderView);
-    int maxWidth = style().maxWidth().isUndefined() ? w : calcScrollbarThicknessUsing(MaxSize, style().maxWidth(), visibleSize, renderView);
</del><ins>+    int w = calcScrollbarThicknessUsing(MainOrPreferredSize, style().width(), visibleSize);
+    int minWidth = calcScrollbarThicknessUsing(MinSize, style().minWidth(), visibleSize);
+    int maxWidth = style().maxWidth().isUndefined() ? w : calcScrollbarThicknessUsing(MaxSize, style().maxWidth(), visibleSize);
</ins><span class="cx">     setWidth(std::max(minWidth, std::min(maxWidth, w)));
</span><span class="cx">     
</span><span class="cx">     // Buttons and track pieces can all have margins along the axis of the scrollbar. 
</span><del>-    m_marginBox.setLeft(minimumValueForLength(style().marginLeft(), visibleSize, renderView));
-    m_marginBox.setRight(minimumValueForLength(style().marginRight(), visibleSize, renderView));
</del><ins>+    m_marginBox.setLeft(minimumValueForLength(style().marginLeft(), visibleSize));
+    m_marginBox.setRight(minimumValueForLength(style().marginRight(), visibleSize));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderScrollbarPart::computeScrollbarHeight()
</span><span class="cx"> {
</span><span class="cx">     if (!m_scrollbar-&gt;owningRenderer())
</span><span class="cx">         return;
</span><del>-    RenderView* renderView = &amp;view();
</del><span class="cx">     // FIXME: We are querying layout information but nothing guarantees that it's up-to-date, especially since we are called at style change.
</span><span class="cx">     // FIXME: Querying the style's border information doesn't work on table cells with collapsing borders.
</span><span class="cx">     int visibleSize = m_scrollbar-&gt;owningRenderer()-&gt;height() -  m_scrollbar-&gt;owningRenderer()-&gt;style().borderTopWidth() - m_scrollbar-&gt;owningRenderer()-&gt;style().borderBottomWidth();
</span><del>-    int h = calcScrollbarThicknessUsing(MainOrPreferredSize, style().height(), visibleSize, renderView);
-    int minHeight = calcScrollbarThicknessUsing(MinSize, style().minHeight(), visibleSize, renderView);
-    int maxHeight = style().maxHeight().isUndefined() ? h : calcScrollbarThicknessUsing(MaxSize, style().maxHeight(), visibleSize, renderView);
</del><ins>+    int h = calcScrollbarThicknessUsing(MainOrPreferredSize, style().height(), visibleSize);
+    int minHeight = calcScrollbarThicknessUsing(MinSize, style().minHeight(), visibleSize);
+    int maxHeight = style().maxHeight().isUndefined() ? h : calcScrollbarThicknessUsing(MaxSize, style().maxHeight(), visibleSize);
</ins><span class="cx">     setHeight(std::max(minHeight, std::min(maxHeight, h)));
</span><span class="cx"> 
</span><span class="cx">     // Buttons and track pieces can all have margins along the axis of the scrollbar. 
</span><del>-    m_marginBox.setTop(minimumValueForLength(style().marginTop(), visibleSize, renderView));
-    m_marginBox.setBottom(minimumValueForLength(style().marginBottom(), visibleSize, renderView));
</del><ins>+    m_marginBox.setTop(minimumValueForLength(style().marginTop(), visibleSize));
+    m_marginBox.setBottom(minimumValueForLength(style().marginBottom(), visibleSize));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderScrollbarPart::computePreferredLogicalWidths()
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTable.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -372,8 +372,6 @@
</span><span class="cx">         computedLogicalHeight = styleLogicalHeight.value() - borders;
</span><span class="cx">     } else if (styleLogicalHeight.isPercent())
</span><span class="cx">         computedLogicalHeight = computePercentageLogicalHeight(styleLogicalHeight);
</span><del>-    else if (styleLogicalHeight.isViewportPercentage())
-        computedLogicalHeight = minimumValueForLength(styleLogicalHeight, 0);
</del><span class="cx">     else
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">     return std::max&lt;LayoutUnit&gt;(0, computedLogicalHeight);
</span><span class="lines">@@ -785,13 +783,13 @@
</span><span class="cx">         m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, m_captions[i]-&gt;minPreferredLogicalWidth());
</span><span class="cx"> 
</span><span class="cx">     RenderStyle&amp; styleToUse = style();
</span><del>-    // FIXME: This should probably be checking for isSpecified since you should be able to use percentage, calc or viewport relative values for min-width.
</del><ins>+    // FIXME: This should probably be checking for isSpecified since you should be able to use percentage or calc values for min-width.
</ins><span class="cx">     if (styleToUse.logicalMinWidth().isFixed() &amp;&amp; styleToUse.logicalMinWidth().value() &gt; 0) {
</span><span class="cx">         m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMinWidth().value()));
</span><span class="cx">         m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMinWidth().value()));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // FIXME: This should probably be checking for isSpecified since you should be able to use percentage, calc or viewport relative values for maxWidth.
</del><ins>+    // FIXME: This should probably be checking for isSpecified since you should be able to use percentage or calc values for maxWidth.
</ins><span class="cx">     if (styleToUse.logicalMaxWidth().isFixed()) {
</span><span class="cx">         m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value()));
</span><span class="cx">         m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value()));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -540,7 +540,7 @@
</span><span class="cx"> {
</span><span class="cx">     Document&amp; document = element-&gt;document();
</span><span class="cx">     RefPtr&lt;CSSPrimitiveValue&gt; emSize = CSSPrimitiveValue::create(0.5, CSSPrimitiveValue::CSS_EMS);
</span><del>-    int pixels = emSize-&gt;computeLength&lt;int&gt;(CSSToLengthConversionData(style, document.renderStyle(), document.frame()-&gt;pageZoomFactor()));
</del><ins>+    int pixels = emSize-&gt;computeLength&lt;int&gt;(CSSToLengthConversionData(style, document.renderStyle(), document.renderView(), document.frame()-&gt;pageZoomFactor()));
</ins><span class="cx">     style-&gt;setPaddingBox(LengthBox(0, pixels, 0, pixels));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -946,9 +946,10 @@
</span><span class="cx"> 
</span><span class="cx">     // Set padding: 0 1.0em; on buttons.
</span><span class="cx">     // CSSPrimitiveValue::computeLengthInt only needs the element's style to calculate em lengths.
</span><del>-    // Since the element might not be in a document, just pass nullptr for the root element style.
</del><ins>+    // Since the element might not be in a document, just pass nullptr for the root element style
+    // and the render view.
</ins><span class="cx">     RefPtr&lt;CSSPrimitiveValue&gt; emSize = CSSPrimitiveValue::create(1.0, CSSPrimitiveValue::CSS_EMS);
</span><del>-    int pixels = emSize-&gt;computeLength&lt;int&gt;(CSSToLengthConversionData(style, nullptr, 1.0, false));
</del><ins>+    int pixels = emSize-&gt;computeLength&lt;int&gt;(CSSToLengthConversionData(style, nullptr, nullptr, 1.0, false));
</ins><span class="cx">     style-&gt;setPaddingBox(LengthBox(0, pixels, 0, pixels));
</span><span class="cx"> 
</span><span class="cx">     if (!element)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeMac.mm        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -1216,7 +1216,7 @@
</span><span class="cx"> 
</span><span class="cx">     GraphicsContextStateSaver stateSaver(*paintInfo.context);
</span><span class="cx"> 
</span><del>-    FloatRoundedRect border = FloatRoundedRect(o.style().getRoundedBorderFor(r, &amp;o.view()));
</del><ins>+    FloatRoundedRect border = FloatRoundedRect(o.style().getRoundedBorderFor(r));
</ins><span class="cx">     int radius = border.radii().topLeft().width();
</span><span class="cx"> 
</span><span class="cx">     CGColorSpaceRef cspace = deviceRGBColorSpaceRef();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RenderView.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -330,13 +330,9 @@
</span><span class="cx"> 
</span><span class="cx">         for (auto&amp; box : childrenOfType&lt;RenderBox&gt;(*this)) {
</span><span class="cx">             if (box.hasRelativeLogicalHeight()
</span><del>-                || box.hasViewportPercentageLogicalHeight()
</del><span class="cx">                 || box.style().logicalHeight().isPercent()
</span><span class="cx">                 || box.style().logicalMinHeight().isPercent()
</span><span class="cx">                 || box.style().logicalMaxHeight().isPercent()
</span><del>-                || box.style().logicalHeight().isViewportPercentage()
-                || box.style().logicalMinHeight().isViewportPercentage()
-                || box.style().logicalMaxHeight().isViewportPercentage()
</del><span class="cx">                 || box.isSVGRoot()
</span><span class="cx">                 )
</span><span class="cx">                 box.setChildNeedsLayout(MarkOnlyThis);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRootInlineBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RootInlineBox.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RootInlineBox.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/RootInlineBox.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -978,7 +978,7 @@
</span><span class="cx">                 lineHeight = renderer-&gt;style().computedLineHeight();
</span><span class="cx">             else
</span><span class="cx">                 lineHeight = renderer-&gt;lineHeight(firstLine, lineDirection);
</span><del>-            verticalPosition -= valueForLength(renderer-&gt;style().verticalAlignLength(), lineHeight, &amp;renderer-&gt;view());
</del><ins>+            verticalPosition -= valueForLength(renderer-&gt;style().verticalAlignLength(), lineHeight);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/Shape.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/Shape.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/shapes/Shape.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx">     return size.transposedSize();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;Shape&gt; Shape::createShape(const BasicShape* basicShape, const LayoutSize&amp; logicalBoxSize, WritingMode writingMode, float margin, RenderView* view)
</del><ins>+std::unique_ptr&lt;Shape&gt; Shape::createShape(const BasicShape* basicShape, const LayoutSize&amp; logicalBoxSize, WritingMode writingMode, float margin)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(basicShape);
</span><span class="cx"> 
</span><span class="lines">@@ -103,9 +103,9 @@
</span><span class="cx"> 
</span><span class="cx">     case BasicShape::BasicShapeCircleType: {
</span><span class="cx">         const BasicShapeCircle* circle = static_cast&lt;const BasicShapeCircle*&gt;(basicShape);
</span><del>-        float centerX = floatValueForCenterCoordinate(circle-&gt;centerX(), boxWidth, view);
-        float centerY = floatValueForCenterCoordinate(circle-&gt;centerY(), boxHeight, view);
-        float radius = circle-&gt;floatValueForRadiusInBox(boxWidth, boxHeight, view);
</del><ins>+        float centerX = floatValueForCenterCoordinate(circle-&gt;centerX(), boxWidth);
+        float centerY = floatValueForCenterCoordinate(circle-&gt;centerY(), boxHeight);
+        float radius = circle-&gt;floatValueForRadiusInBox(boxWidth, boxHeight);
</ins><span class="cx">         FloatPoint logicalCenter = physicalPointToLogical(FloatPoint(centerX, centerY), logicalBoxSize.height(), writingMode);
</span><span class="cx"> 
</span><span class="cx">         shape = createCircleShape(logicalCenter, radius);
</span><span class="lines">@@ -114,10 +114,10 @@
</span><span class="cx"> 
</span><span class="cx">     case BasicShape::BasicShapeEllipseType: {
</span><span class="cx">         const BasicShapeEllipse* ellipse = static_cast&lt;const BasicShapeEllipse*&gt;(basicShape);
</span><del>-        float centerX = floatValueForCenterCoordinate(ellipse-&gt;centerX(), boxWidth, view);
-        float centerY = floatValueForCenterCoordinate(ellipse-&gt;centerY(), boxHeight, view);
-        float radiusX = ellipse-&gt;floatValueForRadiusInBox(ellipse-&gt;radiusX(), centerX, boxWidth, view);
-        float radiusY = ellipse-&gt;floatValueForRadiusInBox(ellipse-&gt;radiusY(), centerY, boxHeight, view);
</del><ins>+        float centerX = floatValueForCenterCoordinate(ellipse-&gt;centerX(), boxWidth);
+        float centerY = floatValueForCenterCoordinate(ellipse-&gt;centerY(), boxHeight);
+        float radiusX = ellipse-&gt;floatValueForRadiusInBox(ellipse-&gt;radiusX(), centerX, boxWidth);
+        float radiusY = ellipse-&gt;floatValueForRadiusInBox(ellipse-&gt;radiusY(), centerY, boxHeight);
</ins><span class="cx">         FloatPoint logicalCenter = physicalPointToLogical(FloatPoint(centerX, centerY), logicalBoxSize.height(), writingMode);
</span><span class="cx"> 
</span><span class="cx">         shape = createEllipseShape(logicalCenter, FloatSize(radiusX, radiusY));
</span><span class="lines">@@ -132,8 +132,8 @@
</span><span class="cx">         std::unique_ptr&lt;Vector&lt;FloatPoint&gt;&gt; vertices = std::make_unique&lt;Vector&lt;FloatPoint&gt;&gt;(valuesSize / 2);
</span><span class="cx">         for (unsigned i = 0; i &lt; valuesSize; i += 2) {
</span><span class="cx">             FloatPoint vertex(
</span><del>-                floatValueForLength(values.at(i), boxWidth, view),
-                floatValueForLength(values.at(i + 1), boxHeight, view));
</del><ins>+                floatValueForLength(values.at(i), boxWidth),
+                floatValueForLength(values.at(i + 1), boxHeight));
</ins><span class="cx">             (*vertices)[i / 2] = physicalPointToLogical(vertex, logicalBoxSize.height(), writingMode);
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -143,19 +143,19 @@
</span><span class="cx"> 
</span><span class="cx">     case BasicShape::BasicShapeInsetType: {
</span><span class="cx">         const BasicShapeInset&amp; inset = *static_cast&lt;const BasicShapeInset*&gt;(basicShape);
</span><del>-        float left = floatValueForLength(inset.left(), boxWidth, view);
-        float top = floatValueForLength(inset.top(), boxHeight, view);
</del><ins>+        float left = floatValueForLength(inset.left(), boxWidth);
+        float top = floatValueForLength(inset.top(), boxHeight);
</ins><span class="cx">         FloatRect rect(left,
</span><span class="cx">             top,
</span><del>-            std::max&lt;float&gt;(boxWidth - left - floatValueForLength(inset.right(), boxWidth, view), 0),
-            std::max&lt;float&gt;(boxHeight - top - floatValueForLength(inset.bottom(), boxHeight, view), 0));
</del><ins>+            std::max&lt;float&gt;(boxWidth - left - floatValueForLength(inset.right(), boxWidth), 0),
+            std::max&lt;float&gt;(boxHeight - top - floatValueForLength(inset.bottom(), boxHeight), 0));
</ins><span class="cx">         FloatRect logicalRect = physicalRectToLogical(rect, logicalBoxSize.height(), writingMode);
</span><span class="cx"> 
</span><span class="cx">         FloatSize boxSize(boxWidth, boxHeight);
</span><del>-        FloatSize topLeftRadius = physicalSizeToLogical(floatSizeForLengthSize(inset.topLeftRadius(), boxSize, view), writingMode);
-        FloatSize topRightRadius = physicalSizeToLogical(floatSizeForLengthSize(inset.topRightRadius(), boxSize, view), writingMode);
-        FloatSize bottomLeftRadius = physicalSizeToLogical(floatSizeForLengthSize(inset.bottomLeftRadius(), boxSize, view), writingMode);
-        FloatSize bottomRightRadius = physicalSizeToLogical(floatSizeForLengthSize(inset.bottomRightRadius(), boxSize, view), writingMode);
</del><ins>+        FloatSize topLeftRadius = physicalSizeToLogical(floatSizeForLengthSize(inset.topLeftRadius(), boxSize), writingMode);
+        FloatSize topRightRadius = physicalSizeToLogical(floatSizeForLengthSize(inset.topRightRadius(), boxSize), writingMode);
+        FloatSize bottomLeftRadius = physicalSizeToLogical(floatSizeForLengthSize(inset.bottomLeftRadius(), boxSize), writingMode);
+        FloatSize bottomRightRadius = physicalSizeToLogical(floatSizeForLengthSize(inset.bottomRightRadius(), boxSize), writingMode);
</ins><span class="cx">         FloatRoundedRect::Radii cornerRadii(topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
</span><span class="cx"> 
</span><span class="cx">         cornerRadii.scale(calcBorderRadiiConstraintScaleFor(logicalRect, cornerRadii));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/Shape.h (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/Shape.h        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/shapes/Shape.h        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -49,7 +49,6 @@
</span><span class="cx"> 
</span><span class="cx"> class BasicShape;
</span><span class="cx"> class Image;
</span><del>-class RenderView;
</del><span class="cx"> class RoundedRect;
</span><span class="cx"> 
</span><span class="cx"> typedef Vector&lt;LineSegment&gt; SegmentList;
</span><span class="lines">@@ -67,7 +66,7 @@
</span><span class="cx">         Path marginShape;
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    static std::unique_ptr&lt;Shape&gt; createShape(const BasicShape*, const LayoutSize&amp; logicalBoxSize, WritingMode, float margin, RenderView*);
</del><ins>+    static std::unique_ptr&lt;Shape&gt; createShape(const BasicShape*, const LayoutSize&amp; logicalBoxSize, WritingMode, float margin);
</ins><span class="cx">     static std::unique_ptr&lt;Shape&gt; createRasterShape(Image*, float threshold, const LayoutRect&amp; imageRect, const LayoutRect&amp; marginRect, WritingMode, float margin);
</span><span class="cx">     static std::unique_ptr&lt;Shape&gt; createBoxShape(const RoundedRect&amp;, WritingMode, float margin);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeOutsideInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -174,14 +174,14 @@
</span><span class="cx">     const RenderStyle&amp; containingBlockStyle = m_renderer.containingBlock()-&gt;style();
</span><span class="cx"> 
</span><span class="cx">     WritingMode writingMode = containingBlockStyle.writingMode();
</span><del>-    float margin = floatValueForLength(m_renderer.style().shapeMargin(), m_renderer.containingBlock() ? m_renderer.containingBlock()-&gt;contentWidth() : LayoutUnit(), &amp;m_renderer.view());
</del><ins>+    float margin = floatValueForLength(m_renderer.style().shapeMargin(), m_renderer.containingBlock() ? m_renderer.containingBlock()-&gt;contentWidth() : LayoutUnit());
</ins><span class="cx">     float shapeImageThreshold = style.shapeImageThreshold();
</span><span class="cx">     const ShapeValue&amp; shapeValue = *style.shapeOutside();
</span><span class="cx"> 
</span><span class="cx">     switch (shapeValue.type()) {
</span><span class="cx">     case ShapeValue::Shape:
</span><span class="cx">         ASSERT(shapeValue.shape());
</span><del>-        m_shape = Shape::createShape(shapeValue.shape(), m_referenceBoxLogicalSize, writingMode, margin, &amp;m_renderer.view());
</del><ins>+        m_shape = Shape::createShape(shapeValue.shape(), m_referenceBoxLogicalSize, writingMode, margin);
</ins><span class="cx">         break;
</span><span class="cx">     case ShapeValue::Image: {
</span><span class="cx">         Image* image;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleBasicShapescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/BasicShapes.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/BasicShapes.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/style/BasicShapes.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -88,13 +88,13 @@
</span><span class="cx">         &amp;&amp; thisEllipse-&gt;radiusY().canBlend(otherEllipse-&gt;radiusY()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float BasicShapeCircle::floatValueForRadiusInBox(float boxWidth, float boxHeight, RenderView* view) const
</del><ins>+float BasicShapeCircle::floatValueForRadiusInBox(float boxWidth, float boxHeight) const
</ins><span class="cx"> {
</span><span class="cx">     if (m_radius.type() == BasicShapeRadius::Value)
</span><span class="cx">         return floatValueForLength(m_radius.value(), sqrtf((boxWidth * boxWidth + boxHeight * boxHeight) / 2));
</span><span class="cx"> 
</span><del>-    float centerX = floatValueForCenterCoordinate(m_centerX, boxWidth, view);
-    float centerY = floatValueForCenterCoordinate(m_centerY, boxHeight, view);
</del><ins>+    float centerX = floatValueForCenterCoordinate(m_centerX, boxWidth);
+    float centerY = floatValueForCenterCoordinate(m_centerY, boxHeight);
</ins><span class="cx"> 
</span><span class="cx">     if (m_radius.type() == BasicShapeRadius::ClosestSide)
</span><span class="cx">         return std::min(std::min(centerX, boxWidth - centerX), std::min(centerY, boxHeight - centerY));
</span><span class="lines">@@ -103,13 +103,13 @@
</span><span class="cx">     return std::max(std::max(centerX, boxWidth - centerX), std::max(centerY, boxHeight - centerY));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void BasicShapeCircle::path(Path&amp; path, const FloatRect&amp; boundingBox, RenderView* view)
</del><ins>+void BasicShapeCircle::path(Path&amp; path, const FloatRect&amp; boundingBox)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(path.isEmpty());
</span><span class="cx"> 
</span><del>-    float centerX = floatValueForCenterCoordinate(m_centerX, boundingBox.width(), view);
-    float centerY = floatValueForCenterCoordinate(m_centerY, boundingBox.height(), view);
-    float radius = floatValueForRadiusInBox(boundingBox.width(), boundingBox.height(), view);
</del><ins>+    float centerX = floatValueForCenterCoordinate(m_centerX, boundingBox.width());
+    float centerY = floatValueForCenterCoordinate(m_centerY, boundingBox.height());
+    float radius = floatValueForRadiusInBox(boundingBox.width(), boundingBox.height());
</ins><span class="cx">     path.addEllipse(FloatRect(
</span><span class="cx">         centerX - radius + boundingBox.x(),
</span><span class="cx">         centerY - radius + boundingBox.y(),
</span><span class="lines">@@ -130,10 +130,10 @@
</span><span class="cx">     return result.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float BasicShapeEllipse::floatValueForRadiusInBox(const BasicShapeRadius&amp; radius, float center, float boxWidthOrHeight, RenderView* view) const
</del><ins>+float BasicShapeEllipse::floatValueForRadiusInBox(const BasicShapeRadius&amp; radius, float center, float boxWidthOrHeight) const
</ins><span class="cx"> {
</span><span class="cx">     if (radius.type() == BasicShapeRadius::Value)
</span><del>-        return floatValueForLength(radius.value(), boxWidthOrHeight, view);
</del><ins>+        return floatValueForLength(radius.value(), boxWidthOrHeight);
</ins><span class="cx"> 
</span><span class="cx">     if (radius.type() == BasicShapeRadius::ClosestSide)
</span><span class="cx">         return std::min(center, boxWidthOrHeight - center);
</span><span class="lines">@@ -142,14 +142,14 @@
</span><span class="cx">     return std::max(center, boxWidthOrHeight - center);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void BasicShapeEllipse::path(Path&amp; path, const FloatRect&amp; boundingBox, RenderView* view)
</del><ins>+void BasicShapeEllipse::path(Path&amp; path, const FloatRect&amp; boundingBox)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(path.isEmpty());
</span><span class="cx"> 
</span><del>-    float centerX = floatValueForCenterCoordinate(m_centerX, boundingBox.width(), view);
-    float centerY = floatValueForCenterCoordinate(m_centerY, boundingBox.height(), view);
-    float radiusX = floatValueForRadiusInBox(m_radiusX, centerX, boundingBox.width(), view);
-    float radiusY = floatValueForRadiusInBox(m_radiusY, centerY, boundingBox.height(), view);
</del><ins>+    float centerX = floatValueForCenterCoordinate(m_centerX, boundingBox.width());
+    float centerY = floatValueForCenterCoordinate(m_centerY, boundingBox.height());
+    float radiusX = floatValueForRadiusInBox(m_radiusX, centerX, boundingBox.width());
+    float radiusY = floatValueForRadiusInBox(m_radiusY, centerY, boundingBox.height());
</ins><span class="cx">     path.addEllipse(FloatRect(
</span><span class="cx">         centerX - radiusX + boundingBox.x(),
</span><span class="cx">         centerY - radiusY + boundingBox.y(),
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx">     return result.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void BasicShapePolygon::path(Path&amp; path, const FloatRect&amp; boundingBox, RenderView* view)
</del><ins>+void BasicShapePolygon::path(Path&amp; path, const FloatRect&amp; boundingBox)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(path.isEmpty());
</span><span class="cx">     ASSERT(!(m_values.size() % 2));
</span><span class="lines">@@ -188,11 +188,11 @@
</span><span class="cx">     if (!length)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    path.moveTo(FloatPoint(floatValueForLength(m_values.at(0), boundingBox.width(), view) + boundingBox.x(),
-        floatValueForLength(m_values.at(1), boundingBox.height(), view) + boundingBox.y()));
</del><ins>+    path.moveTo(FloatPoint(floatValueForLength(m_values.at(0), boundingBox.width()) + boundingBox.x(),
+        floatValueForLength(m_values.at(1), boundingBox.height()) + boundingBox.y()));
</ins><span class="cx">     for (size_t i = 2; i &lt; length; i = i + 2) {
</span><del>-        path.addLineTo(FloatPoint(floatValueForLength(m_values.at(i), boundingBox.width(), view) + boundingBox.x(),
-            floatValueForLength(m_values.at(i + 1), boundingBox.height(), view) + boundingBox.y()));
</del><ins>+        path.addLineTo(FloatPoint(floatValueForLength(m_values.at(i), boundingBox.width()) + boundingBox.x(),
+            floatValueForLength(m_values.at(i + 1), boundingBox.height()) + boundingBox.y()));
</ins><span class="cx">     }
</span><span class="cx">     path.closeSubpath();
</span><span class="cx"> }
</span><span class="lines">@@ -220,28 +220,28 @@
</span><span class="cx">     return result.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static FloatSize floatSizeForLengthSize(const LengthSize&amp; lengthSize, const FloatRect&amp; boundingBox, RenderView* view)
</del><ins>+static FloatSize floatSizeForLengthSize(const LengthSize&amp; lengthSize, const FloatRect&amp; boundingBox)
</ins><span class="cx"> {
</span><del>-    return FloatSize(floatValueForLength(lengthSize.width(), boundingBox.width(), view),
-        floatValueForLength(lengthSize.height(), boundingBox.height(), view));
</del><ins>+    return FloatSize(floatValueForLength(lengthSize.width(), boundingBox.width()),
+        floatValueForLength(lengthSize.height(), boundingBox.height()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void BasicShapeInset::path(Path&amp; path, const FloatRect&amp; boundingBox, RenderView* view)
</del><ins>+void BasicShapeInset::path(Path&amp; path, const FloatRect&amp; boundingBox)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(path.isEmpty());
</span><del>-    float left = floatValueForLength(m_left, boundingBox.width(), view);
-    float top = floatValueForLength(m_top, boundingBox.height(), view);
</del><ins>+    float left = floatValueForLength(m_left, boundingBox.width());
+    float top = floatValueForLength(m_top, boundingBox.height());
</ins><span class="cx">     FloatRoundedRect r = FloatRoundedRect(
</span><span class="cx">         FloatRect(
</span><span class="cx">             left + boundingBox.x(),
</span><span class="cx">             top + boundingBox.y(),
</span><del>-            std::max&lt;float&gt;(boundingBox.width() - left - floatValueForLength(m_right, boundingBox.width(), view), 0),
-            std::max&lt;float&gt;(boundingBox.height() - top - floatValueForLength(m_bottom, boundingBox.height(), view), 0)
</del><ins>+            std::max&lt;float&gt;(boundingBox.width() - left - floatValueForLength(m_right, boundingBox.width()), 0),
+            std::max&lt;float&gt;(boundingBox.height() - top - floatValueForLength(m_bottom, boundingBox.height()), 0)
</ins><span class="cx">         ),
</span><del>-        floatSizeForLengthSize(m_topLeftRadius, boundingBox, view),
-        floatSizeForLengthSize(m_topRightRadius, boundingBox, view),
-        floatSizeForLengthSize(m_bottomLeftRadius, boundingBox, view),
-        floatSizeForLengthSize(m_bottomRightRadius, boundingBox, view)
</del><ins>+        floatSizeForLengthSize(m_topLeftRadius, boundingBox),
+        floatSizeForLengthSize(m_topRightRadius, boundingBox),
+        floatSizeForLengthSize(m_bottomLeftRadius, boundingBox),
+        floatSizeForLengthSize(m_bottomRightRadius, boundingBox)
</ins><span class="cx">     );
</span><span class="cx">     path.addRoundedRect(r);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleBasicShapesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/BasicShapes.h (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/BasicShapes.h        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/style/BasicShapes.h        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -43,7 +43,6 @@
</span><span class="cx"> class FloatRect;
</span><span class="cx"> class Path;
</span><span class="cx"> class RenderBox;
</span><del>-class RenderView;
</del><span class="cx"> 
</span><span class="cx"> class BasicShape : public RefCounted&lt;BasicShape&gt; {
</span><span class="cx"> public:
</span><span class="lines">@@ -58,7 +57,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool canBlend(const BasicShape*) const;
</span><span class="cx"> 
</span><del>-    virtual void path(Path&amp;, const FloatRect&amp;, RenderView*) = 0;
</del><ins>+    virtual void path(Path&amp;, const FloatRect&amp;) = 0;
</ins><span class="cx">     virtual WindRule windRule() const { return RULE_NONZERO; }
</span><span class="cx">     virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const = 0;
</span><span class="cx"> 
</span><span class="lines">@@ -152,13 +151,13 @@
</span><span class="cx">     const BasicShapeCenterCoordinate&amp; centerX() const { return m_centerX; }
</span><span class="cx">     const BasicShapeCenterCoordinate&amp; centerY() const { return m_centerY; }
</span><span class="cx">     const BasicShapeRadius&amp; radius() const { return m_radius; }
</span><del>-    float floatValueForRadiusInBox(float boxWidth, float boxHeight, RenderView*) const;
</del><ins>+    float floatValueForRadiusInBox(float boxWidth, float boxHeight) const;
</ins><span class="cx"> 
</span><span class="cx">     void setCenterX(BasicShapeCenterCoordinate centerX) { m_centerX = std::move(centerX); }
</span><span class="cx">     void setCenterY(BasicShapeCenterCoordinate centerY) { m_centerY = std::move(centerY); }
</span><span class="cx">     void setRadius(BasicShapeRadius radius) { m_radius = std::move(radius); }
</span><span class="cx"> 
</span><del>-    virtual void path(Path&amp;, const FloatRect&amp;, RenderView*) override;
</del><ins>+    virtual void path(Path&amp;, const FloatRect&amp;) override;
</ins><span class="cx">     virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const override;
</span><span class="cx"> 
</span><span class="cx">     virtual Type type() const override { return BasicShapeCircleType; }
</span><span class="lines">@@ -178,14 +177,14 @@
</span><span class="cx">     const BasicShapeCenterCoordinate&amp; centerY() const { return m_centerY; }
</span><span class="cx">     const BasicShapeRadius&amp; radiusX() const { return m_radiusX; }
</span><span class="cx">     const BasicShapeRadius&amp; radiusY() const { return m_radiusY; }
</span><del>-    float floatValueForRadiusInBox(const BasicShapeRadius&amp;, float center, float boxWidthOrHeight, RenderView*) const;
</del><ins>+    float floatValueForRadiusInBox(const BasicShapeRadius&amp;, float center, float boxWidthOrHeight) const;
</ins><span class="cx"> 
</span><span class="cx">     void setCenterX(BasicShapeCenterCoordinate centerX) { m_centerX = std::move(centerX); }
</span><span class="cx">     void setCenterY(BasicShapeCenterCoordinate centerY) { m_centerY = std::move(centerY); }
</span><span class="cx">     void setRadiusX(BasicShapeRadius radiusX) { m_radiusX = std::move(radiusX); }
</span><span class="cx">     void setRadiusY(BasicShapeRadius radiusY) { m_radiusY = std::move(radiusY); }
</span><span class="cx"> 
</span><del>-    virtual void path(Path&amp;, const FloatRect&amp;, RenderView*) override;
</del><ins>+    virtual void path(Path&amp;, const FloatRect&amp;) override;
</ins><span class="cx">     virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const override;
</span><span class="cx"> 
</span><span class="cx">     virtual Type type() const override { return BasicShapeEllipseType; }
</span><span class="lines">@@ -209,7 +208,7 @@
</span><span class="cx">     void setWindRule(WindRule windRule) { m_windRule = windRule; }
</span><span class="cx">     void appendPoint(Length x, Length y) { m_values.append(std::move(x)); m_values.append(std::move(y)); }
</span><span class="cx"> 
</span><del>-    virtual void path(Path&amp;, const FloatRect&amp;, RenderView*) override;
</del><ins>+    virtual void path(Path&amp;, const FloatRect&amp;) override;
</ins><span class="cx">     virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const override;
</span><span class="cx"> 
</span><span class="cx">     virtual WindRule windRule() const override { return m_windRule; }
</span><span class="lines">@@ -248,7 +247,7 @@
</span><span class="cx">     void setBottomRightRadius(LengthSize radius) { m_bottomRightRadius = std::move(radius); }
</span><span class="cx">     void setBottomLeftRadius(LengthSize radius) { m_bottomLeftRadius = std::move(radius); }
</span><span class="cx"> 
</span><del>-    virtual void path(Path&amp;, const FloatRect&amp;, RenderView*) override;
</del><ins>+    virtual void path(Path&amp;, const FloatRect&amp;) override;
</ins><span class="cx">     virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const override;
</span><span class="cx"> 
</span><span class="cx">     virtual Type type() const override { return BasicShapeInsetType; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -1027,17 +1027,17 @@
</span><span class="cx">     rareData-&gt;m_boxShadow = std::move(shadowData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static RoundedRect::Radii calcRadiiFor(const BorderData&amp; border, const LayoutSize&amp; size, RenderView* renderView)
</del><ins>+static RoundedRect::Radii calcRadiiFor(const BorderData&amp; border, const LayoutSize&amp; size)
</ins><span class="cx"> {
</span><span class="cx">     return RoundedRect::Radii(
</span><del>-        LayoutSize(valueForLength(border.topLeft().width(), size.width(), renderView),
-            valueForLength(border.topLeft().height(), size.height(), renderView)),
-        LayoutSize(valueForLength(border.topRight().width(), size.width(), renderView),
-            valueForLength(border.topRight().height(), size.height(), renderView)),
-        LayoutSize(valueForLength(border.bottomLeft().width(), size.width(), renderView),
-            valueForLength(border.bottomLeft().height(), size.height(), renderView)),
-        LayoutSize(valueForLength(border.bottomRight().width(), size.width(), renderView),
-            valueForLength(border.bottomRight().height(), size.height(), renderView)));
</del><ins>+        LayoutSize(valueForLength(border.topLeft().width(), size.width()),
+            valueForLength(border.topLeft().height(), size.height())),
+        LayoutSize(valueForLength(border.topRight().width(), size.width()),
+            valueForLength(border.topRight().height(), size.height())),
+        LayoutSize(valueForLength(border.bottomLeft().width(), size.width()),
+            valueForLength(border.bottomLeft().height(), size.height())),
+        LayoutSize(valueForLength(border.bottomRight().width(), size.width()),
+            valueForLength(border.bottomRight().height(), size.height())));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> StyleImage* RenderStyle::listStyleImage() const { return rareInheritedData-&gt;listStyleImage.get(); }
</span><span class="lines">@@ -1057,11 +1057,11 @@
</span><span class="cx"> void RenderStyle::setHorizontalBorderSpacing(short v) { SET_VAR(inherited, horizontal_border_spacing, v); }
</span><span class="cx"> void RenderStyle::setVerticalBorderSpacing(short v) { SET_VAR(inherited, vertical_border_spacing, v); }
</span><span class="cx"> 
</span><del>-RoundedRect RenderStyle::getRoundedBorderFor(const LayoutRect&amp; borderRect, RenderView* renderView, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
</del><ins>+RoundedRect RenderStyle::getRoundedBorderFor(const LayoutRect&amp; borderRect, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
</ins><span class="cx"> {
</span><span class="cx">     RoundedRect roundedRect(borderRect);
</span><span class="cx">     if (hasBorderRadius()) {
</span><del>-        RoundedRect::Radii radii = calcRadiiFor(surround-&gt;border, borderRect.size(), renderView);
</del><ins>+        RoundedRect::Radii radii = calcRadiiFor(surround-&gt;border, borderRect.size());
</ins><span class="cx">         radii.scale(calcBorderRadiiConstraintScaleFor(borderRect, radii));
</span><span class="cx">         roundedRect.includeLogicalEdges(radii, isHorizontalWritingMode(), includeLogicalLeftEdge, includeLogicalRightEdge);
</span><span class="cx">     }
</span><span class="lines">@@ -1342,7 +1342,7 @@
</span><span class="cx"> }
</span><span class="cx"> void RenderStyle::setLineHeight(Length specifiedLineHeight) { SET_VAR(inherited, line_height, specifiedLineHeight); }
</span><span class="cx"> 
</span><del>-int RenderStyle::computedLineHeight(RenderView* renderView) const
</del><ins>+int RenderStyle::computedLineHeight() const
</ins><span class="cx"> {
</span><span class="cx">     const Length&amp; lh = lineHeight();
</span><span class="cx"> 
</span><span class="lines">@@ -1353,9 +1353,6 @@
</span><span class="cx">     if (lh.isPercent())
</span><span class="cx">         return minimumValueForLength(lh, fontSize());
</span><span class="cx"> 
</span><del>-    if (lh.isViewportPercentage())
-        return valueForLength(lh, 0, renderView);
-
</del><span class="cx">     return lh.value();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -176,7 +176,8 @@
</span><span class="cx">                 | pageBreakMask &lt;&lt; pageBreakBeforeOffset
</span><span class="cx">                 | pageBreakMask &lt;&lt; pageBreakAfterOffset
</span><span class="cx">                 | oneBitMask &lt;&lt; explicitInheritanceOffset
</span><del>-                | tableLayoutBitMask &lt;&lt; tableLayoutOffset;
</del><ins>+                | tableLayoutBitMask &lt;&lt; tableLayoutOffset
+                | hasViewportUnitsBitMask &lt;&lt; hasViewportUnitsOffset;
</ins><span class="cx"> 
</span><span class="cx">             m_flags = (m_flags &amp; ~nonInheritedMask) | (other.m_flags &amp; nonInheritedMask);
</span><span class="cx">         }
</span><span class="lines">@@ -202,6 +203,9 @@
</span><span class="cx">         EUnicodeBidi unicodeBidi() const { return static_cast&lt;EUnicodeBidi&gt;(getValue(unicodeBidiMask, unicodeBidiOffset)); }
</span><span class="cx">         void setUnicodeBidi(EUnicodeBidi unicodeBidi) { updateValue(unicodeBidi, unicodeBidiMask, unicodeBidiOffset); }
</span><span class="cx"> 
</span><ins>+        bool hasViewportUnits() const { return getBoolean(hasViewportUnitsOffset); }
+        void setHasViewportUnits(bool value) { updateBoolean(value, hasViewportUnitsOffset); }
+
</ins><span class="cx">         EVerticalAlign verticalAlign() const { return static_cast&lt;EVerticalAlign&gt;(getValue(verticalAlignMask, verticalAlignOffset)); }
</span><span class="cx">         void setVerticalAlign(EVerticalAlign verticalAlign) { updateValue(verticalAlign, verticalAlignMask, verticalAlignOffset); }
</span><span class="cx"> 
</span><span class="lines">@@ -360,17 +364,19 @@
</span><span class="cx"> 
</span><span class="cx">         // Byte 6.
</span><span class="cx">         static const unsigned pseudoBitsBitCount = 7;
</span><del>-        static const unsigned pseudoBitsPadding = 1;
-        static const unsigned pseudoBitsAndPaddingBitCount = pseudoBitsBitCount + pseudoBitsPadding;
-        static const uint64_t pseudoBitsMask = (oneBitMask &lt;&lt; pseudoBitsAndPaddingBitCount) - 1;
-        static const unsigned pseudoBitsOffset = verticalAlignOffset + verticalAlignAndPaddingBitCount;
</del><ins>+        static const uint64_t pseudoBitsMask = (oneBitMask &lt;&lt; pseudoBitsBitCount) - 1;
+        static const unsigned pseudoBitsOffset = verticalAlignOffset + verticalAlignBitCount;
</ins><span class="cx"> 
</span><ins>+        static const unsigned hasViewportUnitsBitCount = 1;
+        static const uint64_t hasViewportUnitsBitMask = (oneBitMask &lt;&lt; hasViewportUnitsBitCount) - 1;
+        static const unsigned hasViewportUnitsOffset = pseudoBitsOffset + pseudoBitsBitCount;
+
</ins><span class="cx">         // Byte 7.
</span><span class="cx">         static const unsigned styleTypeBitCount = 6;
</span><span class="cx">         static const unsigned styleTypePadding = 2;
</span><span class="cx">         static const unsigned styleTypeAndPaddingBitCount = styleTypeBitCount + styleTypePadding;
</span><span class="cx">         static const uint64_t styleTypeMask = (oneBitMask &lt;&lt; styleTypeAndPaddingBitCount) - 1;
</span><del>-        static const unsigned styleTypeOffset = pseudoBitsOffset + pseudoBitsAndPaddingBitCount;
</del><ins>+        static const unsigned styleTypeOffset = hasViewportUnitsBitCount + hasViewportUnitsOffset;
</ins><span class="cx"> 
</span><span class="cx">         // Byte 8.
</span><span class="cx">         static const unsigned isUniqueOffset = styleTypeOffset + styleTypeAndPaddingBitCount;
</span><span class="lines">@@ -382,7 +388,8 @@
</span><span class="cx">         static const unsigned affectedByDragOffset = affectedByActiveOffset + 1;
</span><span class="cx">         static const unsigned isLinkOffset = affectedByDragOffset + 1;
</span><span class="cx"> 
</span><del>-        // Only 59 bits are assigned. There are 5 bits available currently used as padding to improve code generation.
</del><ins>+
+        // Only 60 bits are assigned. There are 4 bits available currently used as padding to improve code generation.
</ins><span class="cx">         // If you add more style bits here, you will also need to update RenderStyle::copyNonInheritedFrom().
</span><span class="cx">         uint64_t m_flags;
</span><span class="cx">     };
</span><span class="lines">@@ -470,7 +477,6 @@
</span><span class="cx">     NonInheritedFlags noninherited_flags;
</span><span class="cx"> 
</span><span class="cx"> // !END SYNC!
</span><del>-
</del><span class="cx"> private:
</span><span class="cx">     // used to create the default style.
</span><span class="cx">     ALWAYS_INLINE RenderStyle(bool);
</span><span class="lines">@@ -502,6 +508,9 @@
</span><span class="cx"> 
</span><span class="cx">     const PseudoStyleCache* cachedPseudoStyles() const { return m_cachedPseudoStyles.get(); }
</span><span class="cx"> 
</span><ins>+    void setHasViewportUnits(bool hasViewportUnits = true) { noninherited_flags.setHasViewportUnits(hasViewportUnits); }
+    bool hasViewportUnits() const { return noninherited_flags.hasViewportUnits(); }
+
</ins><span class="cx">     bool affectedByHover() const { return noninherited_flags.affectedByHover(); }
</span><span class="cx">     bool affectedByActive() const { return noninherited_flags.affectedByActive(); }
</span><span class="cx">     bool affectedByDrag() const { return noninherited_flags.affectedByDrag(); }
</span><span class="lines">@@ -721,7 +730,7 @@
</span><span class="cx"> 
</span><span class="cx">     const Length&amp; specifiedLineHeight() const;
</span><span class="cx">     Length lineHeight() const;
</span><del>-    int computedLineHeight(RenderView* = 0) const;
</del><ins>+    int computedLineHeight() const;
</ins><span class="cx"> 
</span><span class="cx">     EWhiteSpace whiteSpace() const { return static_cast&lt;EWhiteSpace&gt;(inherited_flags._white_space); }
</span><span class="cx">     static bool autoWrap(EWhiteSpace ws)
</span><span class="lines">@@ -1222,7 +1231,7 @@
</span><span class="cx">         setBorderRadius(LengthSize(Length(s.width(), Fixed), Length(s.height(), Fixed)));
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    RoundedRect getRoundedBorderFor(const LayoutRect&amp; borderRect, RenderView* = 0, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
</del><ins>+    RoundedRect getRoundedBorderFor(const LayoutRect&amp; borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
</ins><span class="cx">     RoundedRect getRoundedInnerBorderFor(const LayoutRect&amp; borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
</span><span class="cx"> 
</span><span class="cx">     RoundedRect getRoundedInnerBorderFor(const LayoutRect&amp; borderRect, LayoutUnit topWidth, LayoutUnit bottomWidth,
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGRootcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -117,9 +117,9 @@
</span><span class="cx">     return frame().document()-&gt;isSVGDocument();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline LayoutUnit resolveLengthAttributeForSVG(const Length&amp; length, float scale, float maxSize, RenderView* renderView)
</del><ins>+static inline LayoutUnit resolveLengthAttributeForSVG(const Length&amp; length, float scale, float maxSize)
</ins><span class="cx"> {
</span><del>-    return valueForLength(length, maxSize, renderView) * (length.isFixed() ? scale : 1);
</del><ins>+    return valueForLength(length, maxSize) * (length.isFixed() ? scale : 1);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> LayoutUnit RenderSVGRoot::computeReplacedLogicalWidth(ShouldComputePreferred shouldComputePreferred) const
</span><span class="lines">@@ -135,7 +135,7 @@
</span><span class="cx">         return RenderReplaced::computeReplacedLogicalWidth(shouldComputePreferred);
</span><span class="cx"> 
</span><span class="cx">     if (svgSVGElement().hasIntrinsicWidth())
</span><del>-        return resolveLengthAttributeForSVG(svgSVGElement().intrinsicWidth(), style().effectiveZoom(), containingBlock()-&gt;availableLogicalWidth(), &amp;view());
</del><ins>+        return resolveLengthAttributeForSVG(svgSVGElement().intrinsicWidth(), style().effectiveZoom(), containingBlock()-&gt;availableLogicalWidth());
</ins><span class="cx"> 
</span><span class="cx">     // SVG embedded via SVGImage (background-image/border-image/etc) / Inline SVG.
</span><span class="cx">     return RenderReplaced::computeReplacedLogicalWidth(shouldComputePreferred);
</span><span class="lines">@@ -154,7 +154,7 @@
</span><span class="cx">         return RenderReplaced::computeReplacedLogicalHeight();
</span><span class="cx"> 
</span><span class="cx">     if (svgSVGElement().hasIntrinsicHeight())
</span><del>-        return resolveLengthAttributeForSVG(svgSVGElement().intrinsicHeight(), style().effectiveZoom(), containingBlock()-&gt;availableLogicalHeight(IncludeMarginBorderPadding).toFloat(), &amp;view());
</del><ins>+        return resolveLengthAttributeForSVG(svgSVGElement().intrinsicHeight(), style().effectiveZoom(), containingBlock()-&gt;availableLogicalHeight(IncludeMarginBorderPadding).toFloat());
</ins><span class="cx"> 
</span><span class="cx">     // SVG embedded via SVGImage (background-image/border-image/etc) / Inline SVG.
</span><span class="cx">     return RenderReplaced::computeReplacedLogicalHeight();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp (169406 => 169407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp        2014-05-28 00:28:52 UTC (rev 169406)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp        2014-05-28 01:33:26 UTC (rev 169407)
</span><span class="lines">@@ -153,7 +153,7 @@
</span><span class="cx">             referenceBox.setHeight(viewportSize.height());
</span><span class="cx">         } else
</span><span class="cx">             referenceBox = renderer.objectBoundingBox();
</span><del>-        m_paintInfo-&gt;context-&gt;clipPath(clipPath.pathForReferenceRect(referenceBox, &amp;renderer.view()), clipPath.windRule());
</del><ins>+        m_paintInfo-&gt;context-&gt;clipPath(clipPath.pathForReferenceRect(referenceBox), clipPath.windRule());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(*m_renderer);
</span></span></pre>
</div>
</div>

</body>
</html>