Unreviewed, rolling out r121285.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jun 2012 21:35:55 +0000 (21:35 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jun 2012 21:35:55 +0000 (21:35 +0000)
http://trac.webkit.org/changeset/121285
https://bugs.webkit.org/show_bug.cgi?id=90014

"We misinterpreted 'size of the initial containing block'"
(Requested by tomz on #webkit).

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

Source/WebCore:

* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcValue::computeLengthPx):
(WebCore::CSSCalcPrimitiveValue::toCalcValue):
(WebCore::CSSCalcPrimitiveValue::computeLengthPx):
(WebCore::CSSCalcBinaryOperation::toCalcValue):
(WebCore::CSSCalcBinaryOperation::computeLengthPx):
* css/CSSCalculationValue.h:
(CSSCalcExpressionNode):
(WebCore::CSSCalcValue::toCalcValue):
(CSSCalcValue):
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::addStops):
(WebCore::positionFromValue):
(WebCore::CSSGradientValue::computeEndPoint):
(WebCore::CSSLinearGradientValue::createGradient):
(WebCore::CSSRadialGradientValue::resolveRadius):
(WebCore::CSSRadialGradientValue::createGradient):
* css/CSSGradientValue.h:
(CSSGradientValue):
(CSSRadialGradientValue):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeLength):
(WebCore::CSSPrimitiveValue::computeLengthDouble):
* css/CSSPrimitiveValue.h:
(CSSPrimitiveValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::convertToLength):
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapFillSize):
(WebCore::CSSToStyleMap::mapFillXPosition):
(WebCore::CSSToStyleMap::mapFillYPosition):
(WebCore::CSSToStyleMap::mapNinePieceImageQuad):
* css/CSSToStyleMap.h:
(CSSToStyleMap):
* css/MediaQueryEvaluator.cpp:
(WebCore::computeLength):
(WebCore::device_heightMediaFeatureEval):
(WebCore::device_widthMediaFeatureEval):
(WebCore::heightMediaFeatureEval):
(WebCore::widthMediaFeatureEval):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/StyleBuilder.cpp:
(WebCore::ApplyPropertyAuto::applyValue):
(WebCore::ApplyPropertyClip::convertToLength):
(WebCore::ApplyPropertyLength::applyValue):
(WebCore::ApplyPropertyBorderRadius::applyValue):
(WebCore::ApplyPropertyComputeLength::applyValue):
(WebCore::ApplyPropertyFontSize::applyValue):
(WebCore::ApplyPropertyLineHeight::applyValue):
(WebCore::ApplyPropertyPageSize::mmLength):
(WebCore::ApplyPropertyPageSize::inchLength):
(WebCore::ApplyPropertyPageSize::applyValue):
(WebCore::ApplyPropertyVerticalAlign::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* css/StyleResolver.h:
(StyleResolver):
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):

LayoutTests:

* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border-expected.html: Removed.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border.html: Removed.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border-expected.html: Removed.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border.html: Removed.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border-expected.htm: Removed.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border.html: Removed.
* ietestcenter/css3/valuesandunits/units-000.htm:
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121289 268f45cc-cd09-0410-ab3c-d52691b4dbfc

29 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border-expected.html [deleted file]
LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border.html [deleted file]
LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border-expected.html [deleted file]
LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border.html [deleted file]
LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border-expected.htm [deleted file]
LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border.html [deleted file]
LayoutTests/ietestcenter/css3/valuesandunits/units-000.htm
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/qt/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/css/CSSCalculationValue.cpp
Source/WebCore/css/CSSCalculationValue.h
Source/WebCore/css/CSSGradientValue.cpp
Source/WebCore/css/CSSGradientValue.h
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/css/CSSPrimitiveValue.h
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSToStyleMap.cpp
Source/WebCore/css/CSSToStyleMap.h
Source/WebCore/css/MediaQueryEvaluator.cpp
Source/WebCore/css/SVGCSSStyleSelector.cpp
Source/WebCore/css/StyleBuilder.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleResolver.h
Source/WebCore/css/WebKitCSSMatrix.cpp

index a62d98d..f7befde 100644 (file)
@@ -1,3 +1,25 @@
+2012-06-26  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r121285.
+        http://trac.webkit.org/changeset/121285
+        https://bugs.webkit.org/show_bug.cgi?id=90014
+
+        "We misinterpreted 'size of the initial containing block'"
+        (Requested by tomz on #webkit).
+
+        * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border-expected.html: Removed.
+        * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border.html: Removed.
+        * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border-expected.html: Removed.
+        * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border.html: Removed.
+        * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border-expected.htm: Removed.
+        * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border.html: Removed.
+        * ietestcenter/css3/valuesandunits/units-000.htm:
+        * platform/chromium/TestExpectations:
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/mac/TestExpectations:
+        * platform/qt/TestExpectations:
+
 2012-06-26  Ryosuke Niwa  <rniwa@webkit.org>
 
         Convert editing/deleting/delete-3959464-fix.html, delete-at-paragraph-boundaries-001.html, merge-into-empty-block-1.html and merge-into-empty-block-2.html to dump-as-markup tests
diff --git a/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border-expected.html b/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border-expected.html
deleted file mode 100644 (file)
index 4adedfd..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-    <head>
-        <title>CSS Test: vh unit - Reference</title>
-        <link rel="author" title="Codeaurora" href="http://www.codeaurora.org/" />
-        <link rel="help" href="http://www.w3.org/TR/CSS21/" />
-        <style type="text/css">
-            body div
-            {
-                font: 16px/1em ahem;
-                color: green;
-                height: 16px;
-            }
-            #parent
-            {
-                background: green;
-                position: relative;
-                overflow: hidden;
-                width: 1in;
-                height: 1in;
-            }
-        </style>
-    </head>
-    <body>
-        <p>Test passes if there is no red visible on the page.</p>
-        <div id="parent">
-        </div>
-    </body>
-</html>
diff --git a/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border.html b/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border.html
deleted file mode 100644 (file)
index a40564c..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-    <head>
-        <title>CSS Test: vh unit</title>
-        <link rel="author" title="Codeaurora" href="http://www.codeaurora.org/" />
-        <link rel="help" href="http://www.w3.org/TR/CSS21/" />
-        <meta name="assert" content="Verifying vh unit values are supported." />
-        <style type="text/css">
-            body div
-            {
-                font: 16px/1em ahem;
-                color: green;
-                height: 16px;
-            }
-            #parent
-            {
-                background: red;
-                position: relative;
-                overflow: hidden;
-                width: 1in;
-                height: 1in;
-            }
-            #div-vh
-            {
-                border-right: solid green 100vh;
-                height: 16px;
-                width: 0;
-            }
-            #div-fill
-            {
-                background: green;
-                width: 1in;
-                height: 80px;
-            }
-        </style>
-    </head>
-    <body>
-        <p>Test passes if there is no red visible on the page.</p>
-        <div id="parent">
-            <div id="div-vh"></div>
-            <div id="div-fill"></div>
-        </div>
-    </body>
-</html>
diff --git a/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border-expected.html b/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border-expected.html
deleted file mode 100644 (file)
index 71c0b9b..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-    <head>
-        <title>CSS Test: vmin unit - Reference</title>
-        <link rel="author" title="Codeaurora" href="http://www.codeaurora.org/" />
-        <link rel="help" href="http://www.w3.org/TR/CSS21/" />
-        <style type="text/css">
-            body div
-            {
-                font: 16px/1em ahem;
-                color: green;
-                height: 16px;
-            }
-            #parent
-            {
-                background: green;
-                position: relative;
-                overflow: hidden;
-                width: 1in;
-                height: 112px;
-            }
-        </style>
-    </head>
-    <body>
-        <p>Test passes if there is no red visible on the page.</p>
-        <div id="parent">
-        </div>
-    </body>
-</html>
diff --git a/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border.html b/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border.html
deleted file mode 100644 (file)
index 9ace027..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-    <head>
-        <title>CSS Test: vmin unit</title>
-        <link rel="author" title="Codeaurora" href="http://www.codeaurora.org/" />
-        <link rel="help" href="http://www.w3.org/TR/CSS21/" />
-        <meta name="assert" content="Verifying vmin unit values are supported." />
-        <style type="text/css">
-            body div
-            {
-                font: 16px/1em ahem;
-                color: green;
-                height: 16px;
-            }
-            #parent
-            {
-                background: red;
-                position: relative;
-                overflow: hidden;
-                width: 1in;
-                height: 112px;
-            }
-            #div-vh
-            {
-                border-right: solid green 100vmin;
-                height: 16px;
-                width: 0;
-            }
-            #div-fill
-            {
-                background: green;
-                width: 1in;
-                height: 96px;
-            }
-        </style>
-    </head>
-    <body>
-        <p>Test passes if there is no red visible on the page.</p>
-        <div id="parent">
-            <div id="div-vh"></div>
-            <div id="div-fill"></div>
-        </div>
-    </body>
-</html>
diff --git a/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border-expected.htm b/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border-expected.htm
deleted file mode 100644 (file)
index 9d87bb8..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-    <head>
-        <title>CSS Test: vw unit - Reference</title>
-        <link rel="author" title="Codeaurora" href="http://www.codeaurora.org/" />
-        <link rel="help" href="http://www.w3.org/TR/CSS21/" />
-        <style type="text/css">
-            body div
-            {
-                font: 16px/1em ahem;
-                color: green;
-                height: 16px;
-            }
-            #parent
-            {
-                background: green;
-                position: relative;
-                overflow: hidden;
-                width: 1in;
-                height: 16px;
-            }
-        </style>
-    </head>
-    <body>
-        <p>Test passes if there is no red visible on the page.</p>
-        <div id="parent">
-        </div>
-    </body>
-</html>
diff --git a/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border.html b/LayoutTests/css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border.html
deleted file mode 100644 (file)
index 57f860c..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-    <head>
-        <title>CSS Test: vw unit</title>
-        <link rel="author" title="Codeaurora" href="http://www.codeaurora.org/" />
-        <link rel="help" href="http://www.w3.org/TR/CSS21/" />
-        <meta name="assert" content="Verifying vw unit values are supported." />
-        <style type="text/css">
-            body div
-            {
-                font: 16px/1em ahem;
-                color: green;
-                height: 16px;
-            }
-            #parent
-            {
-                background: red;
-                position: relative;
-                overflow: hidden;
-                width: 1in;
-                height: 16px;
-            }
-            #div-vh
-            {
-                border-right: solid green 100vw;
-                height: 16px;
-                width: 0;
-            }
-        </style>
-    </head>
-    <body>
-        <p>Test passes if there is no red visible on the page.</p>
-        <div id="parent">
-            <div id="div-vh"></div>
-        </div>
-    </body>
-</html>
index e764c82..6d79e9e 100644 (file)
             }
             #div12
             {
-                border-right: solid green 100vmin;
+                border-right: solid green 100vm;
                 height: 16px;
                 width: 0;
             }
index dfde98a..9cad67a 100644 (file)
@@ -3461,7 +3461,8 @@ BUGWK84778 : ietestcenter/css3/multicolumn/column-width-negative-001.htm = IMAGE
 BUGWK85211 : ietestcenter/css3/flexbox/flexbox-align-stretch-001.htm = IMAGE
 BUGWK85212 : ietestcenter/css3/flexbox/flexbox-layout-002.htm = IMAGE
 // IETC CSS units
-BUGWK85308 : ietestcenter/css3/valuesandunits/units-000.htm = IMAGE
+BUGWK85308 DEBUG : ietestcenter/css3/valuesandunits/units-000.htm = CRASH
+BUGWK85308 RELEASE : ietestcenter/css3/valuesandunits/units-000.htm = IMAGE
 BUGWK85310 : ietestcenter/css3/valuesandunits/units-010.htm = IMAGE
 // IETC namespace failures
 BUGWK86137 : ietestcenter/css3/namespaces/prefix-007.xml = IMAGE
index 1ccb31e..e7d9b4b 100644 (file)
@@ -577,7 +577,7 @@ BUGWK85902 SLOW DEBUG : fast/overflow/lots-of-sibling-inline-boxes.html = PASS
 BUGWKEFL SLOW DEBUG : http/tests/incremental/slow-utf8-html.pl = PASS
 
 // Tests imported in r116658
-BUGWK85308 : ietestcenter/css3/valuesandunits/units-000.htm = IMAGE
+BUGWK85308 : ietestcenter/css3/valuesandunits/units-000.htm = IMAGE CRASH
 BUGWK85310 : ietestcenter/css3/valuesandunits/units-010.htm = IMAGE
 
 // New test introduced in r116694 fails
index 4fd3f0e..b9ffed1 100644 (file)
@@ -356,6 +356,8 @@ BUGWK85811 DEBUG : fast/events/message-port-close.html = CRASH PASS
 BUGWK86443 : plugins/npruntime/delete-plugin-within-getProperty.html = CRASH
 BUGWK86443 : plugins/npruntime/delete-plugin-within-invoke.html = CRASH
 
+BUGWK86176 DEBUG : ietestcenter/css3/valuesandunits/units-000.htm = CRASH
+
 BUGWK89188 RELEASE : storage/websql/quota-tracking.html = CRASH PASS
 
 BUGWK89954 DEBUG : http/tests/xmlhttprequest/reentrant-cancel.html = CRASH
@@ -1169,8 +1171,7 @@ BUGWK85969 : http/tests/loading/post-in-iframe-with-back-navigation.html = TEXT
 // Started failing after it was added in r116563
 BUGWK86061 : http/tests/security/referrer-policy-redirect-link.html = TEXT
 
-// IETC Units test failures
-BUGWK85308 : ietestcenter/css3/valuesandunits/units-000.htm = IMAGE
+BUGWK85308 RELEASE : ietestcenter/css3/valuesandunits/units-000.htm = IMAGE
 BUGWK85310 : ietestcenter/css3/valuesandunits/units-010.htm = IMAGE
 
 // IETC namespace failures
index 0fc3c93..9dec4f9 100644 (file)
@@ -243,8 +243,8 @@ BUGWK85565 : fast/css/border-solid-single-edge-antialias.html = IMAGE
 // Interferes with the tests that should pass
 BUGWK85689 SKIP : fast/animation/request-animation-frame-disabled.html = TEXT
 
-// IETC units test failures
-BUGWK85308 : ietestcenter/css3/valuesandunits/units-000.htm = IMAGE
+// Hits assert https://bugs.webkit.org/show_bug.cgi?id=86208
+BUGWK85308 SKIP : ietestcenter/css3/valuesandunits/units-000.htm = IMAGE
 BUGWK85310 : ietestcenter/css3/valuesandunits/units-010.htm = IMAGE
 
 // IETC namespace failures
index e1b6ce4..4760254 100644 (file)
@@ -59,8 +59,9 @@ BUGWK85567 : fast/images/png-suite/test.html = IMAGE
 // Interferes with the tests that should pass
 BUGWK85689 SKIP : fast/animation/request-animation-frame-disabled.html = TEXT
 
-// IETC units test failures
-BUGWK85308 : ietestcenter/css3/valuesandunits/units-000.htm = IMAGE
+// ietestcenter/css3/valuesandunits/units-000.htm asserts
+// https://bugs.webkit.org/show_bug.cgi?id=86176
+BUGWK85308 SKIP : ietestcenter/css3/valuesandunits/units-000.htm = IMAGE
 BUGWK85310 : ietestcenter/css3/valuesandunits/units-010.htm = IMAGE
 
 // IETC namespace failures
index 9eda6ea..34759f0 100755 (executable)
@@ -1,3 +1,73 @@
+2012-06-26  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r121285.
+        http://trac.webkit.org/changeset/121285
+        https://bugs.webkit.org/show_bug.cgi?id=90014
+
+        "We misinterpreted 'size of the initial containing block'"
+        (Requested by tomz on #webkit).
+
+        * css/CSSCalculationValue.cpp:
+        (WebCore::CSSCalcValue::computeLengthPx):
+        (WebCore::CSSCalcPrimitiveValue::toCalcValue):
+        (WebCore::CSSCalcPrimitiveValue::computeLengthPx):
+        (WebCore::CSSCalcBinaryOperation::toCalcValue):
+        (WebCore::CSSCalcBinaryOperation::computeLengthPx):
+        * css/CSSCalculationValue.h:
+        (CSSCalcExpressionNode):
+        (WebCore::CSSCalcValue::toCalcValue):
+        (CSSCalcValue):
+        * css/CSSGradientValue.cpp:
+        (WebCore::CSSGradientValue::addStops):
+        (WebCore::positionFromValue):
+        (WebCore::CSSGradientValue::computeEndPoint):
+        (WebCore::CSSLinearGradientValue::createGradient):
+        (WebCore::CSSRadialGradientValue::resolveRadius):
+        (WebCore::CSSRadialGradientValue::createGradient):
+        * css/CSSGradientValue.h:
+        (CSSGradientValue):
+        (CSSRadialGradientValue):
+        * css/CSSPrimitiveValue.cpp:
+        (WebCore::CSSPrimitiveValue::computeLength):
+        (WebCore::CSSPrimitiveValue::computeLengthDouble):
+        * css/CSSPrimitiveValue.h:
+        (CSSPrimitiveValue):
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::convertToLength):
+        * css/CSSToStyleMap.cpp:
+        (WebCore::CSSToStyleMap::mapFillSize):
+        (WebCore::CSSToStyleMap::mapFillXPosition):
+        (WebCore::CSSToStyleMap::mapFillYPosition):
+        (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
+        * css/CSSToStyleMap.h:
+        (CSSToStyleMap):
+        * css/MediaQueryEvaluator.cpp:
+        (WebCore::computeLength):
+        (WebCore::device_heightMediaFeatureEval):
+        (WebCore::device_widthMediaFeatureEval):
+        (WebCore::heightMediaFeatureEval):
+        (WebCore::widthMediaFeatureEval):
+        * css/SVGCSSStyleSelector.cpp:
+        (WebCore::StyleResolver::applySVGProperty):
+        * css/StyleBuilder.cpp:
+        (WebCore::ApplyPropertyAuto::applyValue):
+        (WebCore::ApplyPropertyClip::convertToLength):
+        (WebCore::ApplyPropertyLength::applyValue):
+        (WebCore::ApplyPropertyBorderRadius::applyValue):
+        (WebCore::ApplyPropertyComputeLength::applyValue):
+        (WebCore::ApplyPropertyFontSize::applyValue):
+        (WebCore::ApplyPropertyLineHeight::applyValue):
+        (WebCore::ApplyPropertyPageSize::mmLength):
+        (WebCore::ApplyPropertyPageSize::inchLength):
+        (WebCore::ApplyPropertyPageSize::applyValue):
+        (WebCore::ApplyPropertyVerticalAlign::applyValue):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::collectMatchingRulesForList):
+        * css/StyleResolver.h:
+        (StyleResolver):
+        * css/WebKitCSSMatrix.cpp:
+        (WebCore::WebKitCSSMatrix::setMatrixValue):
+
 2012-06-26  Dave Tu  <dtu@chromium.org>
 
         [chromium] Expose rendering statistics to WebWidget.
index 777a016..54247e0 100755 (executable)
@@ -97,9 +97,9 @@ double CSSCalcValue::doubleValue() const
     return clampToPermittedRange(m_expression->doubleValue());
 }
 
-double CSSCalcValue::computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, RenderStyle* parentStyle, double multiplier, bool computingFontSize) const
+double CSSCalcValue::computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, double multiplier, bool computingFontSize) const
 {
-    return clampToPermittedRange(m_expression->computeLengthPx(currentStyle, rootStyle, parentStyle, multiplier, computingFontSize));
+    return clampToPermittedRange(m_expression->computeLengthPx(currentStyle, rootStyle, multiplier, computingFontSize));
 }
     
 CSSCalcExpressionNode::~CSSCalcExpressionNode() 
@@ -124,16 +124,16 @@ public:
         return m_value->cssText();
     }
 
-    virtual PassOwnPtr<CalcExpressionNode> toCalcValue(RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, double zoom) const
+    virtual PassOwnPtr<CalcExpressionNode> toCalcValue(RenderStyle* style, RenderStyle* rootStyle, double zoom) const
     {
         switch (m_category) {
         case CalcNumber:
             return adoptPtr(new CalcExpressionNumber(m_value->getFloatValue()));
         case CalcLength:
-            return adoptPtr(new CalcExpressionNumber(m_value->computeLength<float>(style, rootStyle, parentStyle, zoom)));
+            return adoptPtr(new CalcExpressionNumber(m_value->computeLength<float>(style, rootStyle, zoom)));
         case CalcPercent:
         case CalcPercentLength:
-            return adoptPtr(new CalcExpressionLength(StyleResolver::convertToFloatLength(m_value.get(), style, rootStyle, parentStyle, zoom)));
+            return adoptPtr(new CalcExpressionLength(StyleResolver::convertToFloatLength(m_value.get(), style, rootStyle, zoom)));
         // Only types that could be part of a Length expression can be converted
         // to a CalcExpressionNode. CalcPercentNumber makes no sense as a Length.
         case CalcPercentNumber:
@@ -159,11 +159,11 @@ public:
         return 0;
     }
     
-    virtual double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, RenderStyle* parentStyle, double multiplier, bool computingFontSize) const
+    virtual double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, double multiplier, bool computingFontSize) const
     {
         switch (m_category) {
         case CalcLength:
-            return m_value->computeLength<double>(currentStyle, rootStyle, parentStyle, multiplier, computingFontSize);
+            return m_value->computeLength<double>(currentStyle, rootStyle, multiplier, computingFontSize);
         case CalcPercent:
         case CalcNumber:
             return m_value->getDoubleValue();
@@ -237,12 +237,12 @@ public:
         return !doubleValue();
     }
 
-    virtual PassOwnPtr<CalcExpressionNode> toCalcValue(RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, double zoom) const
+    virtual PassOwnPtr<CalcExpressionNode> toCalcValue(RenderStyle* style, RenderStyle* rootStyle, double zoom) const
     {
-        OwnPtr<CalcExpressionNode> left(m_leftSide->toCalcValue(style, rootStyle, parentStyle, zoom));
+        OwnPtr<CalcExpressionNode> left(m_leftSide->toCalcValue(style, rootStyle, zoom));
         if (!left)
             return nullptr;
-        OwnPtr<CalcExpressionNode> right(m_rightSide->toCalcValue(style, rootStyle, parentStyle, zoom));
+        OwnPtr<CalcExpressionNode> right(m_rightSide->toCalcValue(style, rootStyle, zoom));
         if (!right)
             return nullptr;
         return adoptPtr(new CalcExpressionBinaryOperation(left.release(), right.release(), m_operator));
@@ -253,10 +253,10 @@ public:
         return evaluate(m_leftSide->doubleValue(), m_rightSide->doubleValue());
     }
     
-    virtual double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, RenderStyle* parentStyle, double multiplier, bool computingFontSize) const
+    virtual double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, double multiplier, bool computingFontSize) const
     {
-        const double leftValue = m_leftSide->computeLengthPx(currentStyle, rootStyle, parentStyle, multiplier, computingFontSize);
-        const double rightValue = m_rightSide->computeLengthPx(currentStyle, rootStyle, parentStyle, multiplier, computingFontSize);
+        const double leftValue = m_leftSide->computeLengthPx(currentStyle, rootStyle, multiplier, computingFontSize);
+        const double rightValue = m_rightSide->computeLengthPx(currentStyle, rootStyle, multiplier, computingFontSize);
         return evaluate(leftValue, rightValue);
     }
 
index 3afdec8..57a249f 100755 (executable)
@@ -60,9 +60,9 @@ public:
     
     virtual ~CSSCalcExpressionNode() = 0;
     virtual bool isZero() const = 0;
-    virtual PassOwnPtr<CalcExpressionNode> toCalcValue(RenderStyle*, RenderStyle* rootStyle, RenderStyle* parentStyle, double zoom = 1.0) const = 0;
+    virtual PassOwnPtr<CalcExpressionNode> toCalcValue(RenderStyle*, RenderStyle* rootStyle, double zoom = 1.0) const = 0;    
     virtual double doubleValue() const = 0;
-    virtual double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, RenderStyle* parentStyle, double multiplier = 1.0, bool computingFontSize = false) const = 0;
+    virtual double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, double multiplier = 1.0, bool computingFontSize = false) const = 0;
     virtual String customCssText() const = 0;
     
     CalculationCategory category() const { return m_category; }    
@@ -84,15 +84,15 @@ public:
     static PassRefPtr<CSSCalcValue> create(CSSParserString name, CSSParserValueList*, CalculationPermittedValueRange);
     static PassRefPtr<CSSCalcValue> create(CalculationValue*);
 
-    PassRefPtr<CalculationValue> toCalcValue(RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, double zoom = 1.0) const
+    PassRefPtr<CalculationValue> toCalcValue(RenderStyle* style, RenderStyle* rootStyle, double zoom = 1.0) const
     {
-        return CalculationValue::create(m_expression->toCalcValue(style, rootStyle, parentStyle, zoom), m_nonNegative ? CalculationRangeNonNegative : CalculationRangeAll);
+        return CalculationValue::create(m_expression->toCalcValue(style, rootStyle, zoom), m_nonNegative ? CalculationRangeNonNegative : CalculationRangeAll);
     }
     CalculationCategory category() const { return m_expression->category(); }
     bool isInt() const { return m_expression->isInteger(); }    
     double doubleValue() const;
     bool isNegative() const { return m_expression->doubleValue() < 0; }
-    double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, RenderStyle* parentStyle, double multiplier = 1.0, bool computingFontSize = false) const;
+    double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, double multiplier = 1.0, bool computingFontSize = false) const;
         
     String customCssText() const;
     
index daeeabf..a314a86 100644 (file)
@@ -105,7 +105,7 @@ struct GradientStop {
     { }
 };
 
-void CSSGradientValue::addStops(Gradient* gradient, RenderObject* renderer, RenderStyle* rootStyle, RenderStyle* parentStyle, float maxLengthForRepeat)
+void CSSGradientValue::addStops(Gradient* gradient, RenderObject* renderer, RenderStyle* rootStyle, float maxLengthForRepeat)
 {
     RenderStyle* style = renderer->style();
 
@@ -160,9 +160,9 @@ void CSSGradientValue::addStops(Gradient* gradient, RenderObject* renderer, Rend
                 }
                 float length;
                 if (stop.m_position->isLength())
-                    length = stop.m_position->computeLength<float>(style, rootStyle, parentStyle, style->effectiveZoom());
+                    length = stop.m_position->computeLength<float>(style, rootStyle, style->effectiveZoom());
                 else 
-                    length = stop.m_position->cssCalcValue()->toCalcValue(style, rootStyle, parentStyle, style->effectiveZoom())->evaluate(gradientLength);
+                    length = stop.m_position->cssCalcValue()->toCalcValue(style, rootStyle, style->effectiveZoom())->evaluate(gradientLength);
                 stops[i].offset = (gradientLength > 0) ? length / gradientLength : 0;
             } else {
                 ASSERT_NOT_REACHED();
@@ -363,7 +363,7 @@ void CSSGradientValue::addStops(Gradient* gradient, RenderObject* renderer, Rend
     gradient->setStopsSorted(true);
 }
 
-static float positionFromValue(CSSPrimitiveValue* value, RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, const IntSize& size, bool isHorizontal)
+static float positionFromValue(CSSPrimitiveValue* value, RenderStyle* style, RenderStyle* rootStyle, const IntSize& size, bool isHorizontal)
 {
     float zoomFactor = style->effectiveZoom();
 
@@ -375,7 +375,7 @@ static float positionFromValue(CSSPrimitiveValue* value, RenderStyle* style, Ren
         return value->getFloatValue() / 100.f * edgeDistance;
 
     if (value->isCalculatedPercentageWithLength())
-        return value->cssCalcValue()->toCalcValue(style, rootStyle, parentStyle, style->effectiveZoom())->evaluate(edgeDistance);
+        return value->cssCalcValue()->toCalcValue(style, rootStyle, style->effectiveZoom())->evaluate(edgeDistance);
 
     switch (value->getIdent()) {
     case CSSValueTop:
@@ -392,18 +392,18 @@ static float positionFromValue(CSSPrimitiveValue* value, RenderStyle* style, Ren
         return size.width();
     }
 
-    return value->computeLength<float>(style, rootStyle, parentStyle, zoomFactor);
+    return value->computeLength<float>(style, rootStyle, zoomFactor);
 }
 
-FloatPoint CSSGradientValue::computeEndPoint(CSSPrimitiveValue* first, CSSPrimitiveValue* second, RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, const IntSize& size)
+FloatPoint CSSGradientValue::computeEndPoint(CSSPrimitiveValue* first, CSSPrimitiveValue* second, RenderStyle* style, RenderStyle* rootStyle, const IntSize& size)
 {
     FloatPoint result;
 
     if (first)
-        result.setX(positionFromValue(first, style, rootStyle, parentStyle, size, true));
+        result.setX(positionFromValue(first, style, rootStyle, size, true));
 
     if (second)
-        result.setY(positionFromValue(second, style, rootStyle, parentStyle, size, false));
+        result.setY(positionFromValue(second, style, rootStyle, size, false));
 
     return result;
 }
@@ -542,8 +542,6 @@ PassRefPtr<Gradient> CSSLinearGradientValue::createGradient(RenderObject* render
     ASSERT(!size.isEmpty());
 
     RenderStyle* rootStyle = renderer->document()->documentElement()->renderStyle();
-    RenderObject* parent = renderer->parent();
-    RenderStyle* parentStyle = parent ? parent->style() : 0;
 
     FloatPoint firstPoint;
     FloatPoint secondPoint;
@@ -551,10 +549,10 @@ PassRefPtr<Gradient> CSSLinearGradientValue::createGradient(RenderObject* render
         float angle = m_angle->getFloatValue(CSSPrimitiveValue::CSS_DEG);
         endPointsFromAngle(angle, size, firstPoint, secondPoint);
     } else {
-        firstPoint = computeEndPoint(m_firstX.get(), m_firstY.get(), renderer->style(), rootStyle, parentStyle, size);
+        firstPoint = computeEndPoint(m_firstX.get(), m_firstY.get(), renderer->style(), rootStyle, size);
 
         if (m_secondX || m_secondY)
-            secondPoint = computeEndPoint(m_secondX.get(), m_secondY.get(), renderer->style(), rootStyle, parentStyle, size);
+            secondPoint = computeEndPoint(m_secondX.get(), m_secondY.get(), renderer->style(), rootStyle, size);
         else {
             if (m_firstX)
                 secondPoint.setX(size.width() - firstPoint.x());
@@ -566,7 +564,7 @@ PassRefPtr<Gradient> CSSLinearGradientValue::createGradient(RenderObject* render
     RefPtr<Gradient> gradient = Gradient::create(firstPoint, secondPoint);
 
     // Now add the stops.
-    addStops(gradient.get(), renderer, rootStyle, parentStyle, 1);
+    addStops(gradient.get(), renderer, rootStyle, 1);
 
     return gradient.release();
 }
@@ -640,7 +638,7 @@ String CSSRadialGradientValue::customCssText() const
     return result;
 }
 
-float CSSRadialGradientValue::resolveRadius(CSSPrimitiveValue* radius, RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, float* widthOrHeight)
+float CSSRadialGradientValue::resolveRadius(CSSPrimitiveValue* radius, RenderStyle* style, RenderStyle* rootStyle, float* widthOrHeight)
 {
     float zoomFactor = style->effectiveZoom();
 
@@ -650,7 +648,7 @@ float CSSRadialGradientValue::resolveRadius(CSSPrimitiveValue* radius, RenderSty
     else if (widthOrHeight && radius->isPercentage())
         result = *widthOrHeight * radius->getFloatValue() / 100;
     else
-        result = radius->computeLength<float>(style, rootStyle, parentStyle, zoomFactor);
+        result = radius->computeLength<float>(style, rootStyle, zoomFactor);
 
     return result;
 }
@@ -737,16 +735,14 @@ PassRefPtr<Gradient> CSSRadialGradientValue::createGradient(RenderObject* render
     ASSERT(!size.isEmpty());
 
     RenderStyle* rootStyle = renderer->document()->documentElement()->renderStyle();
-    RenderObject* parent = renderer->parent();
-    RenderStyle* parentStyle = parent ? parent->style() : 0;
 
-    FloatPoint firstPoint = computeEndPoint(m_firstX.get(), m_firstY.get(), renderer->style(), rootStyle, parentStyle, size);
+    FloatPoint firstPoint = computeEndPoint(m_firstX.get(), m_firstY.get(), renderer->style(), rootStyle, size);
     if (!m_firstX)
         firstPoint.setX(size.width() / 2);
     if (!m_firstY)
         firstPoint.setY(size.height() / 2);
 
-    FloatPoint secondPoint = computeEndPoint(m_secondX.get(), m_secondY.get(), renderer->style(), rootStyle, parentStyle, size);
+    FloatPoint secondPoint = computeEndPoint(m_secondX.get(), m_secondY.get(), renderer->style(), rootStyle, size);
     if (!m_secondX)
         secondPoint.setX(size.width() / 2);
     if (!m_secondY)
@@ -754,17 +750,17 @@ PassRefPtr<Gradient> CSSRadialGradientValue::createGradient(RenderObject* render
 
     float firstRadius = 0;
     if (m_firstRadius)
-        firstRadius = resolveRadius(m_firstRadius.get(), renderer->style(), rootStyle, parentStyle);
+        firstRadius = resolveRadius(m_firstRadius.get(), renderer->style(), rootStyle);
 
     float secondRadius = 0;
     float aspectRatio = 1; // width / height.
     if (m_secondRadius)
-        secondRadius = resolveRadius(m_secondRadius.get(), renderer->style(), rootStyle, parentStyle);
+        secondRadius = resolveRadius(m_secondRadius.get(), renderer->style(), rootStyle);
     else if (m_endHorizontalSize || m_endVerticalSize) {
         float width = size.width();
         float height = size.height();
-        secondRadius = resolveRadius(m_endHorizontalSize.get(), renderer->style(), rootStyle, parentStyle, &width);
-        aspectRatio = secondRadius / resolveRadius(m_endVerticalSize.get(), renderer->style(), rootStyle, parentStyle, &height);
+        secondRadius = resolveRadius(m_endHorizontalSize.get(), renderer->style(), rootStyle, &width);
+        aspectRatio = secondRadius / resolveRadius(m_endVerticalSize.get(), renderer->style(), rootStyle, &height);
     } else {
         enum GradientShape { Circle, Ellipse };
         GradientShape shape = Ellipse;
@@ -865,7 +861,7 @@ PassRefPtr<Gradient> CSSRadialGradientValue::createGradient(RenderObject* render
     }
 
     // Now add the stops.
-    addStops(gradient.get(), renderer, rootStyle, parentStyle, maxExtent);
+    addStops(gradient.get(), renderer, rootStyle, maxExtent);
 
     return gradient.release();
 }
index 0292c14..ea10eb8 100644 (file)
@@ -81,10 +81,10 @@ protected:
     {
     }
 
-    void addStops(Gradient*, RenderObject*, RenderStyle* rootStyle, RenderStyle* parentStyle, float maxLengthForRepeat = 0);
+    void addStops(Gradient*, RenderObject*, RenderStyle* rootStyle, float maxLengthForRepeat = 0);
 
     // Resolve points/radii to front end values.
-    FloatPoint computeEndPoint(CSSPrimitiveValue*, CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, RenderStyle* parentStyle, const IntSize&);
+    FloatPoint computeEndPoint(CSSPrimitiveValue*, CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, const IntSize&);
 
     bool isCacheable() const;
 
@@ -154,7 +154,7 @@ private:
     }
 
     // Resolve points/radii to front end values.
-    float resolveRadius(CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, RenderStyle* parentStyle, float* widthOrHeight = 0);
+    float resolveRadius(CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, float* widthOrHeight = 0);
 
     // These may be null for non-deprecated gradients.
     RefPtr<CSSPrimitiveValue> m_firstRadius;
index c53f28c..16e43dc 100644 (file)
@@ -455,46 +455,46 @@ double CSSPrimitiveValue::computeDegrees()
     }
 }
 
-template<> int CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, float multiplier, bool computingFontSize)
+template<> int CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize)
 {
-    return roundForImpreciseConversion<int>(computeLengthDouble(style, rootStyle, parentStyle, multiplier, computingFontSize));
+    return roundForImpreciseConversion<int>(computeLengthDouble(style, rootStyle, multiplier, computingFontSize));
 }
 
-template<> unsigned CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, float multiplier, bool computingFontSize)
+template<> unsigned CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize)
 {
-    return roundForImpreciseConversion<unsigned>(computeLengthDouble(style, rootStyle, parentStyle, multiplier, computingFontSize));
+    return roundForImpreciseConversion<unsigned>(computeLengthDouble(style, rootStyle, multiplier, computingFontSize));
 }
 
-template<> Length CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, float multiplier, bool computingFontSize)
+template<> Length CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize)
 {
 #if ENABLE(SUBPIXEL_LAYOUT)
-    return Length(static_cast<float>(computeLengthDouble(style, rootStyle, parentStyle, multiplier, computingFontSize)), Fixed);
+    return Length(static_cast<float>(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)), Fixed);
 #else
-    return Length(roundForImpreciseConversion<float>(computeLengthDouble(style, rootStyle, parentStyle, multiplier, computingFontSize)), Fixed);
+    return Length(roundForImpreciseConversion<float>(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)), Fixed);
 #endif
 }
 
-template<> short CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, float multiplier, bool computingFontSize)
+template<> short CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize)
 {
-    return roundForImpreciseConversion<short>(computeLengthDouble(style, rootStyle, parentStyle, multiplier, computingFontSize));
+    return roundForImpreciseConversion<short>(computeLengthDouble(style, rootStyle, multiplier, computingFontSize));
 }
 
-template<> unsigned short CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, float multiplier, bool computingFontSize)
+template<> unsigned short CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize)
 {
-    return roundForImpreciseConversion<unsigned short>(computeLengthDouble(style, rootStyle, parentStyle, multiplier, computingFontSize));
+    return roundForImpreciseConversion<unsigned short>(computeLengthDouble(style, rootStyle, multiplier, computingFontSize));
 }
 
-template<> float CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, float multiplier, bool computingFontSize)
+template<> float CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize)
 {
-    return static_cast<float>(computeLengthDouble(style, rootStyle, parentStyle, multiplier, computingFontSize));
+    return static_cast<float>(computeLengthDouble(style, rootStyle, multiplier, computingFontSize));
 }
 
-template<> double CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, float multiplier, bool computingFontSize)
+template<> double CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize)
 {
-    return computeLengthDouble(style, rootStyle, parentStyle, multiplier, computingFontSize);
+    return computeLengthDouble(style, rootStyle, multiplier, computingFontSize);
 }
 
-double CSSPrimitiveValue::computeLengthDouble(RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, float multiplier, bool computingFontSize)
+double CSSPrimitiveValue::computeLengthDouble(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize)
 {
     double factor;
 
@@ -537,17 +537,6 @@ double CSSPrimitiveValue::computeLengthDouble(RenderStyle* style, RenderStyle* r
         case CSS_CALC_PERCENTAGE_WITH_NUMBER:
             ASSERT_NOT_REACHED();
             return -1.0;
-        case CSS_VW:
-            factor = parentStyle ? 0.01 * parentStyle->width().getFloatValue() : 0;
-            break;
-        case CSS_VH:
-            factor = parentStyle ? 0.01 * parentStyle->height().getFloatValue() : 0;
-            break;
-        case CSS_VMIN:
-            factor = 0;
-            if (parentStyle)
-                factor = .01 * (float) min(parentStyle->width().getFloatValue(), parentStyle->height().getFloatValue());
-            break;
         default:
             ASSERT_NOT_REACHED();
             return -1.0;
@@ -556,7 +545,7 @@ double CSSPrimitiveValue::computeLengthDouble(RenderStyle* style, RenderStyle* r
     double computedValue;
     if (m_primitiveUnitType == CSS_CALC)
         // The multiplier is passed in as 1.0 here to ensure it is only applied once
-        computedValue = m_value.calc->computeLengthPx(style, rootStyle, parentStyle, 1.0, computingFontSize);
+        computedValue = m_value.calc->computeLengthPx(style, rootStyle, 1.0, computingFontSize);
     else
         computedValue = getDoubleValue();
     
index 4084045..87069c0 100644 (file)
@@ -238,10 +238,10 @@ public:
      * this is screen/printer dependent, so we probably need a config option for this,
      * and some tool to calibrate.
      */
-    template<typename T> T computeLength(RenderStyle* currStyle, RenderStyle* rootStyle, RenderStyle* parentStyle, float multiplier = 1.0f, bool computingFontSize = false);
+    template<typename T> T computeLength(RenderStyle* currStyle, RenderStyle* rootStyle, float multiplier = 1.0f, bool computingFontSize = false);
 
     // Converts to a Length, mapping various unit types appropriately.
-    template<int> Length convertToLength(RenderStyle* currStyle, RenderStyle* rootStyle, RenderStyle* parentStyle, double multiplier = 1.0, bool computingFontSize = false);
+    template<int> Length convertToLength(RenderStyle* currStyle, RenderStyle* rootStyle, double multiplier = 1.0, bool computingFontSize = false);
 
     // use with care!!!
     void setPrimitiveType(unsigned short type) { m_primitiveUnitType = type; }
@@ -342,7 +342,7 @@ private:
     void init(PassRefPtr<CSSCalcValue>);
     bool getDoubleValueInternal(UnitTypes targetUnitType, double* result) const;
 
-    double computeLengthDouble(RenderStyle* currentStyle, RenderStyle* rootStyle, RenderStyle* parentStyle, float multiplier, bool computingFontSize);
+    double computeLengthDouble(RenderStyle* currentStyle, RenderStyle* rootStyle, float multiplier, bool computingFontSize);
 
     union {
         int ident;
index 2f19c7d..4855ec3 100644 (file)
@@ -3799,14 +3799,14 @@ enum LengthConversion {
     ViewportPercentageConversion = 1 << 6
 };
 
-template<int supported> Length CSSPrimitiveValue::convertToLength(RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, double multiplier, bool computingFontSize)
+template<int supported> Length CSSPrimitiveValue::convertToLength(RenderStyle* style, RenderStyle* rootStyle, double multiplier, bool computingFontSize)
 {
     if ((supported & (FixedIntegerConversion | FixedFloatConversion)) && isFontRelativeLength() && (!style || !rootStyle))
         return Length(Undefined);
     if ((supported & FixedIntegerConversion) && isLength())
-        return computeLength<Length>(style, rootStyle, parentStyle, multiplier, computingFontSize);
+        return computeLength<Length>(style, rootStyle, multiplier, computingFontSize);
     if ((supported & FixedFloatConversion) && isLength())
-        return Length(computeLength<double>(style, rootStyle, parentStyle, multiplier), Fixed);
+        return Length(computeLength<double>(style, rootStyle, multiplier), Fixed);
     if ((supported & PercentConversion) && isPercentage())
         return Length(getDoubleValue(), Percent);
     if ((supported & FractionConversion) && isNumber())
@@ -3814,7 +3814,7 @@ template<int supported> Length CSSPrimitiveValue::convertToLength(RenderStyle* s
     if ((supported & AutoConversion) && getIdent() == CSSValueAuto)
         return Length(Auto);
     if ((supported & CalculatedConversion) && isCalculated())
-        return Length(cssCalcValue()->toCalcValue(style, rootStyle, parentStyle, multiplier));
+        return Length(cssCalcValue()->toCalcValue(style, rootStyle, multiplier));
     if ((supported & ViewportPercentageConversion) && isViewportPercentageLength())
         return viewportPercentageLength();
     return Length(Undefined);
index 0e9e2d7..e154cec 100644 (file)
@@ -51,11 +51,6 @@ RenderStyle* CSSToStyleMap::rootElementStyle() const
     return m_resolver->rootElementStyle();
 }
 
-RenderStyle* CSSToStyleMap::parentStyle() const
-{
-    return m_resolver->parentStyle();
-}
-
 bool CSSToStyleMap::useSVGZoomRules() const
 {
     return m_resolver->useSVGZoomRules();
@@ -203,10 +198,10 @@ void CSSToStyleMap::mapFillSize(CSSPropertyID, FillLayer* layer, CSSValue* value
     if (Pair* pair = primitiveValue->getPairValue()) {
         CSSPrimitiveValue* first = static_cast<CSSPrimitiveValue*>(pair->first());
         CSSPrimitiveValue* second = static_cast<CSSPrimitiveValue*>(pair->second());
-        firstLength = first->convertToLength<AnyConversion>(style(), rootElementStyle(), parentStyle(), zoomFactor);
-        secondLength = second->convertToLength<AnyConversion>(style(), rootElementStyle(), parentStyle(),  zoomFactor);
+        firstLength = first->convertToLength<AnyConversion>(style(), rootElementStyle(), zoomFactor);
+        secondLength = second->convertToLength<AnyConversion>(style(), rootElementStyle(), zoomFactor);
     } else {
-        firstLength = primitiveValue->convertToLength<AnyConversion>(style(), rootElementStyle(), parentStyle(), zoomFactor);
+        firstLength = primitiveValue->convertToLength<AnyConversion>(style(), rootElementStyle(), zoomFactor);
         secondLength = Length();
     }
 
@@ -233,11 +228,11 @@ void CSSToStyleMap::mapFillXPosition(CSSPropertyID, FillLayer* layer, CSSValue*
     CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     Length length;
     if (primitiveValue->isLength())
-        length = primitiveValue->computeLength<Length>(style(), rootElementStyle(), parentStyle(), zoomFactor);
+        length = primitiveValue->computeLength<Length>(style(), rootElementStyle(), zoomFactor);
     else if (primitiveValue->isPercentage())
         length = Length(primitiveValue->getDoubleValue(), Percent);
     else if (primitiveValue->isCalculatedPercentageWithLength())
-        length = Length(primitiveValue->cssCalcValue()->toCalcValue(style(), rootElementStyle(), parentStyle(), zoomFactor));
+        length = Length(primitiveValue->cssCalcValue()->toCalcValue(style(), rootElementStyle(), zoomFactor));
     else if (primitiveValue->isViewportPercentageLength())
         length = primitiveValue->viewportPercentageLength();
     else
@@ -260,11 +255,11 @@ void CSSToStyleMap::mapFillYPosition(CSSPropertyID, FillLayer* layer, CSSValue*
     CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     Length length;
     if (primitiveValue->isLength())
-        length = primitiveValue->computeLength<Length>(style(), rootElementStyle(), parentStyle(), zoomFactor);
+        length = primitiveValue->computeLength<Length>(style(), rootElementStyle(), zoomFactor);
     else if (primitiveValue->isPercentage())
         length = Length(primitiveValue->getDoubleValue(), Percent);
     else if (primitiveValue->isCalculatedPercentageWithLength())
-        length = Length(primitiveValue->cssCalcValue()->toCalcValue(style(), rootElementStyle(), parentStyle(), zoomFactor));
+        length = Length(primitiveValue->cssCalcValue()->toCalcValue(style(), rootElementStyle(), zoomFactor));
     else if (primitiveValue->isViewportPercentageLength())
         length = primitiveValue->viewportPercentageLength();
     else
@@ -587,28 +582,28 @@ LengthBox CSSToStyleMap::mapNinePieceImageQuad(CSSValue* value)
     else if (slices->top()->isPercentage())
         box.m_top = Length(slices->top()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
     else if (slices->top()->getIdent() != CSSValueAuto)
-        box.m_top = slices->top()->computeLength<Length>(style(), rootElementStyle(), parentStyle(), zoom);
+        box.m_top = slices->top()->computeLength<Length>(style(), rootElementStyle(), zoom);
 
     if (slices->right()->isNumber())
         box.m_right = Length(slices->right()->getIntValue(), Relative);
     else if (slices->right()->isPercentage())
         box.m_right = Length(slices->right()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
     else if (slices->right()->getIdent() != CSSValueAuto)
-        box.m_right = slices->right()->computeLength<Length>(style(), rootElementStyle(), parentStyle(), zoom);
+        box.m_right = slices->right()->computeLength<Length>(style(), rootElementStyle(), zoom);
 
     if (slices->bottom()->isNumber())
         box.m_bottom = Length(slices->bottom()->getIntValue(), Relative);
     else if (slices->bottom()->isPercentage())
         box.m_bottom = Length(slices->bottom()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
     else if (slices->bottom()->getIdent() != CSSValueAuto)
-        box.m_bottom = slices->bottom()->computeLength<Length>(style(), rootElementStyle(), parentStyle(), zoom);
+        box.m_bottom = slices->bottom()->computeLength<Length>(style(), rootElementStyle(), zoom);
 
     if (slices->left()->isNumber())
         box.m_left = Length(slices->left()->getIntValue(), Relative);
     else if (slices->left()->isPercentage())
         box.m_left = Length(slices->left()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
     else if (slices->left()->getIdent() != CSSValueAuto)
-        box.m_left = slices->left()->computeLength<Length>(style(), rootElementStyle(), parentStyle(), zoom);
+        box.m_left = slices->left()->computeLength<Length>(style(), rootElementStyle(), zoom);
 
     return box;
 }
index 5e449f5..8e0fc95 100644 (file)
@@ -73,7 +73,6 @@ private:
     // the current paint/layout.
     RenderStyle* style() const;
     RenderStyle* rootElementStyle() const;
-    RenderStyle* parentStyle() const;
     bool useSVGZoomRules() const;
 
     // FIXME: This should be part of some sort of StyleImageCache object which
index fc13649..90c9df2 100644 (file)
@@ -307,7 +307,7 @@ static bool gridMediaFeatureEval(CSSValue* value, RenderStyle*, Frame*, MediaFea
     return false;
 }
 
-static bool computeLength(CSSValue* value, bool strict, RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, int& result)
+static bool computeLength(CSSValue* value, bool strict, RenderStyle* style, RenderStyle* rootStyle, int& result)
 {
     if (!value->isPrimitiveValue())
         return false;
@@ -320,7 +320,7 @@ static bool computeLength(CSSValue* value, bool strict, RenderStyle* style, Rend
     }
 
     if (primitiveValue->isLength()) {
-        result = primitiveValue->computeLength<int>(style, rootStyle, parentStyle);
+        result = primitiveValue->computeLength<int>(style, rootStyle);
         return true;
     }
 
@@ -332,12 +332,10 @@ static bool device_heightMediaFeatureEval(CSSValue* value, RenderStyle* style, F
     if (value) {
         FloatRect sg = screenRect(frame->page()->mainFrame()->view());
         RenderStyle* rootStyle = frame->document()->documentElement()->renderStyle();
-        ContainerNode* parentNode = frame->document()->documentElement()->parentNodeForRenderingAndStyle();
-        RenderStyle* parentStyle = parentNode ? parentNode->renderStyle() : 0;
         int length;
         long height = sg.height();
         InspectorInstrumentation::applyScreenHeightOverride(frame, &height);
-        return computeLength(value, !frame->document()->inQuirksMode(), style, rootStyle, parentStyle, length) && compareValue(static_cast<int>(height), length, op);
+        return computeLength(value, !frame->document()->inQuirksMode(), style, rootStyle, length) && compareValue(static_cast<int>(height), length, op);
     }
     // ({,min-,max-}device-height)
     // assume if we have a device, assume non-zero
@@ -349,12 +347,10 @@ static bool device_widthMediaFeatureEval(CSSValue* value, RenderStyle* style, Fr
     if (value) {
         FloatRect sg = screenRect(frame->page()->mainFrame()->view());
         RenderStyle* rootStyle = frame->document()->documentElement()->renderStyle();
-        ContainerNode* parentNode = frame->document()->documentElement()->parentNodeForRenderingAndStyle();
-        RenderStyle* parentStyle = parentNode ? parentNode->renderStyle() : 0;
         int length;
         long width = sg.width();
         InspectorInstrumentation::applyScreenWidthOverride(frame, &width);
-        return computeLength(value, !frame->document()->inQuirksMode(), style, rootStyle, parentStyle, length) && compareValue(static_cast<int>(width), length, op);
+        return computeLength(value, !frame->document()->inQuirksMode(), style, rootStyle, length) && compareValue(static_cast<int>(width), length, op);
     }
     // ({,min-,max-}device-width)
     // assume if we have a device, assume non-zero
@@ -367,10 +363,8 @@ static bool heightMediaFeatureEval(CSSValue* value, RenderStyle* style, Frame* f
 
     if (value) {
         RenderStyle* rootStyle = frame->document()->documentElement()->renderStyle();
-        ContainerNode* parentNode = frame->document()->documentElement()->parentNodeForRenderingAndStyle();
-        RenderStyle* parentStyle = parentNode ? parentNode->renderStyle() : 0;
         int length;
-        return computeLength(value, !frame->document()->inQuirksMode(), style, rootStyle, parentStyle, length) && compareValue(view->layoutHeight(), length, op);
+        return computeLength(value, !frame->document()->inQuirksMode(), style, rootStyle, length) && compareValue(view->layoutHeight(), length, op);
     }
 
     return view->layoutHeight() != 0;
@@ -382,10 +376,8 @@ static bool widthMediaFeatureEval(CSSValue* value, RenderStyle* style, Frame* fr
 
     if (value) {
         RenderStyle* rootStyle = frame->document()->documentElement()->renderStyle();
-        ContainerNode* parentNode = frame->document()->documentElement()->parentNodeForRenderingAndStyle();
-        RenderStyle* parentStyle = parentNode ? parentNode->renderStyle() : 0;
         int length;
-        return computeLength(value, !frame->document()->inQuirksMode(), style, rootStyle, parentStyle, length) && compareValue(view->layoutWidth(), length, op);
+        return computeLength(value, !frame->document()->inQuirksMode(), style, rootStyle, length) && compareValue(view->layoutWidth(), length, op);
     }
 
     return view->layoutWidth() != 0;
index 620ba0d..5b3547f 100644 (file)
@@ -559,9 +559,9 @@ void StyleResolver::applySVGProperty(CSSPropertyID id, CSSValue* value)
             if (!firstValue->isShadowValue())
                 return;
             ShadowValue* item = static_cast<ShadowValue*>(firstValue);
-            IntPoint location(item->x->computeLength<int>(style(), m_rootElementStyle, m_parentStyle),
-                              item->y->computeLength<int>(style(), m_rootElementStyle, m_parentStyle));
-            int blur = item->blur ? item->blur->computeLength<int>(style(), m_rootElementStyle, m_parentStyle) : 0;
+            IntPoint location(item->x->computeLength<int>(style(), m_rootElementStyle),
+                              item->y->computeLength<int>(style(), m_rootElementStyle));
+            int blur = item->blur ? item->blur->computeLength<int>(style(), m_rootElementStyle) : 0;
             Color color;
             if (item->color)
                 color = colorFromPrimitiveValue(item->color.get());
index ac51f30..20d02cc 100644 (file)
@@ -34,7 +34,6 @@
 #include "CursorList.h"
 #include "Document.h"
 #include "Element.h"
-#include "NodeRenderStyle.h"
 #include "Pair.h"
 #include "Rect.h"
 #include "RenderObject.h"
@@ -213,7 +212,7 @@ public:
         else if (valueType == Number)
             setValue(styleResolver->style(), *primitiveValue);
         else if (valueType == ComputeLength)
-            setValue(styleResolver->style(), primitiveValue->computeLength<T>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->parentStyle(), styleResolver->style()->effectiveZoom()));
+            setValue(styleResolver->style(), primitiveValue->computeLength<T>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom()));
     }
 
     static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
@@ -223,7 +222,7 @@ class ApplyPropertyClip {
 private:
     static Length convertToLength(StyleResolver* styleResolver, CSSPrimitiveValue* value)
     {
-        return value->convertToLength<FixedIntegerConversion | PercentConversion | FractionConversion | AutoConversion>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->parentStyle(), styleResolver->style()->effectiveZoom());
+        return value->convertToLength<FixedIntegerConversion | PercentConversion | FractionConversion | AutoConversion>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom());
     }
 public:
     static void applyInheritValue(StyleResolver* styleResolver)
@@ -380,13 +379,13 @@ public:
         if (autoEnabled && primitiveValue->getIdent() == CSSValueAuto)
             setValue(styleResolver->style(), Length());
         else if (primitiveValue->isLength()) {
-            Length length = primitiveValue->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->parentStyle(), styleResolver->style()->effectiveZoom());
+            Length length = primitiveValue->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom());
             length.setQuirk(primitiveValue->isQuirkValue());
             setValue(styleResolver->style(), length);
         } else if (primitiveValue->isPercentage())
             setValue(styleResolver->style(), Length(primitiveValue->getDoubleValue(), Percent));
         else if (primitiveValue->isCalculatedPercentageWithLength())
-            setValue(styleResolver->style(), Length(primitiveValue->cssCalcValue()->toCalcValue(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->parentStyle(), styleResolver->style()->effectiveZoom())));
+            setValue(styleResolver->style(), Length(primitiveValue->cssCalcValue()->toCalcValue(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom())));
         else if (primitiveValue->isViewportPercentageLength())
             setValue(styleResolver->style(), primitiveValue->viewportPercentageLength());
     }
@@ -446,7 +445,7 @@ public:
             // handle this case
             return;
         } else
-            radiusWidth = pair->first()->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->parentStyle(), styleResolver->style()->effectiveZoom());
+            radiusWidth = pair->first()->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom());
         if (pair->second()->isPercentage())
             radiusHeight = Length(pair->second()->getDoubleValue(), Percent);
         else if (pair->second()->isViewportPercentageLength())
@@ -456,7 +455,7 @@ public:
             // handle this case
             return;
         } else
-            radiusHeight = pair->second()->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->parentStyle(), styleResolver->style()->effectiveZoom());
+            radiusHeight = pair->second()->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom());
         int width = radiusWidth.value();
         int height = radiusHeight.value();
         if (width < 0 || height < 0)
@@ -601,7 +600,7 @@ public:
             length = 5;
         } else if (ident == CSSValueInvalid) {
             float zoom = (svgZoomEnabled && styleResolver->useSVGZoomRules()) ? 1.0f : styleResolver->style()->effectiveZoom();
-            length = primitiveValue->computeLength<T>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->parentStyle(), zoom);
+            length = primitiveValue->computeLength<T>(styleResolver->style(), styleResolver->rootElementStyle(), zoom);
         } else {
             ASSERT_NOT_REACHED();
             length = 0;
@@ -739,20 +738,12 @@ public:
         } else {
             fontDescription.setIsAbsoluteSize(parentIsAbsoluteSize
                                               || !(primitiveValue->isPercentage() || primitiveValue->isFontRelativeLength()));
-
-            RenderStyle* gpStyle = 0;
-            ContainerNode* parentNode = styleResolver->parentNode();
-            if (parentNode) {
-                ContainerNode* gpNode = parentNode->parentNodeForRenderingAndStyle();
-                gpStyle = gpNode ? gpNode->renderStyle() : 0;
-            }
-
             if (primitiveValue->isLength())
-                size = primitiveValue->computeLength<float>(styleResolver->parentStyle(), styleResolver->rootElementStyle(), gpStyle, 1.0, true);
+                size = primitiveValue->computeLength<float>(styleResolver->parentStyle(), styleResolver->rootElementStyle(), 1.0, true);
             else if (primitiveValue->isPercentage())
                 size = (primitiveValue->getFloatValue() * parentSize) / 100.0f;
             else if (primitiveValue->isCalculatedPercentageWithLength())
-                size = primitiveValue->cssCalcValue()->toCalcValue(styleResolver->parentStyle(), styleResolver->rootElementStyle(), gpStyle)->evaluate(parentSize);
+                size = primitiveValue->cssCalcValue()->toCalcValue(styleResolver->parentStyle(), styleResolver->rootElementStyle())->evaluate(parentSize);
             else if (primitiveValue->isViewportPercentageLength())
                 size = valueForLength(primitiveValue->viewportPercentageLength(), 0, styleResolver->document()->renderView());
             else
@@ -1209,7 +1200,7 @@ public:
                 if (Frame* frame = styleResolver->document()->frame())
                     multiplier *= frame->textZoomFactor();
             }
-            lineHeight = primitiveValue->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->parentStyle(), multiplier);
+            lineHeight = primitiveValue->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), multiplier);
         } else if (primitiveValue->isPercentage()) {
             // FIXME: percentage should not be restricted to an integer here.
             lineHeight = Length((styleResolver->style()->fontSize() * primitiveValue->getIntValue()) / 100, Fixed);
@@ -1231,8 +1222,8 @@ public:
 
 class ApplyPropertyPageSize {
 private:
-    static Length mmLength(double mm) { return CSSPrimitiveValue::create(mm, CSSPrimitiveValue::CSS_MM)->computeLength<Length>(0, 0, 0); }
-    static Length inchLength(double inch) { return CSSPrimitiveValue::create(inch, CSSPrimitiveValue::CSS_IN)->computeLength<Length>(0, 0, 0); }
+    static Length mmLength(double mm) { return CSSPrimitiveValue::create(mm, CSSPrimitiveValue::CSS_MM)->computeLength<Length>(0, 0); }
+    static Length inchLength(double inch) { return CSSPrimitiveValue::create(inch, CSSPrimitiveValue::CSS_IN)->computeLength<Length>(0, 0); }
     static bool getPageSizeFromName(CSSPrimitiveValue* pageSizeName, CSSPrimitiveValue* pageOrientation, Length& width, Length& height)
     {
         DEFINE_STATIC_LOCAL(Length, a5Width, (mmLength(148)));
@@ -1327,8 +1318,8 @@ public:
                 // <length>{2}
                 if (!second->isLength())
                     return;
-                width = first->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->parentStyle());
-                height = second->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->parentStyle());
+                width = first->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle());
+                height = second->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle());
             } else {
                 // <page-size> <orientation>
                 // The value order is guaranteed. See CSSParser::parseSizeParameter.
@@ -1346,7 +1337,7 @@ public:
             if (primitiveValue->isLength()) {
                 // <length>
                 pageSizeType = PAGE_SIZE_RESOLVED;
-                width = height = primitiveValue->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->parentStyle());
+                width = height = primitiveValue->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle());
             } else {
                 switch (primitiveValue->getIdent()) {
                 case 0:
@@ -1580,7 +1571,7 @@ public:
         if (primitiveValue->getIdent())
             return styleResolver->style()->setVerticalAlign(*primitiveValue);
 
-        styleResolver->style()->setVerticalAlignLength(primitiveValue->convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion | ViewportPercentageConversion>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->parentStyle(), styleResolver->style()->effectiveZoom()));
+        styleResolver->style()->setVerticalAlignLength(primitiveValue->convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion | ViewportPercentageConversion>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom()));
     }
 
     static PropertyHandler createHandler()
index e1fee7b..de3a0a9 100644 (file)
@@ -2757,14 +2757,14 @@ void RuleSet::shrinkToFit()
 // -------------------------------------------------------------------------------------
 // this is mostly boring stuff on how to apply a certain rule to the renderstyle...
 
-Length StyleResolver::convertToIntLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, double multiplier)
+Length StyleResolver::convertToIntLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier)
 {
-    return primitiveValue ? primitiveValue->convertToLength<FixedIntegerConversion | PercentConversion | FractionConversion | ViewportPercentageConversion>(style, rootStyle, parentStyle, multiplier) : Length(Undefined);
+    return primitiveValue ? primitiveValue->convertToLength<FixedIntegerConversion | PercentConversion | FractionConversion | ViewportPercentageConversion>(style, rootStyle, multiplier) : Length(Undefined);
 }
 
-Length StyleResolver::convertToFloatLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, double multiplier)
+Length StyleResolver::convertToFloatLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier)
 {
-    return primitiveValue ? primitiveValue->convertToLength<FixedFloatConversion | PercentConversion | FractionConversion | ViewportPercentageConversion>(style, rootStyle, parentStyle, multiplier) : Length(Undefined);
+    return primitiveValue ? primitiveValue->convertToLength<FixedFloatConversion | PercentConversion | FractionConversion | ViewportPercentageConversion>(style, rootStyle, multiplier) : Length(Undefined);
 }
 
 template <StyleResolver::StyleApplicationPass pass>
@@ -3243,7 +3243,7 @@ bool StyleResolver::useSVGZoomRules()
 
 static bool createGridTrackBreadth(CSSPrimitiveValue* primitiveValue, StyleResolver* selector, Length& length)
 {
-    Length workingLength = primitiveValue->convertToLength<FixedIntegerConversion | PercentConversion | ViewportPercentageConversion | AutoConversion>(selector->style(), selector->rootElementStyle(), selector->parentStyle(), selector->style()->effectiveZoom());
+    Length workingLength = primitiveValue->convertToLength<FixedIntegerConversion | PercentConversion | ViewportPercentageConversion | AutoConversion>(selector->style(), selector->rootElementStyle(), selector->style()->effectiveZoom());
     if (workingLength.isUndefined())
         return false;
 
@@ -3706,10 +3706,10 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
             if (!currValue->isShadowValue())
                 continue;
             ShadowValue* item = static_cast<ShadowValue*>(currValue);
-            int x = item->x->computeLength<int>(style(), m_rootElementStyle, m_parentStyle, zoomFactor);
-            int y = item->y->computeLength<int>(style(), m_rootElementStyle, m_parentStyle, zoomFactor);
-            int blur = item->blur ? item->blur->computeLength<int>(style(), m_rootElementStyle, m_parentStyle, zoomFactor) : 0;
-            int spread = item->spread ? item->spread->computeLength<int>(style(), m_rootElementStyle, m_parentStyle, zoomFactor) : 0;
+            int x = item->x->computeLength<int>(style(), m_rootElementStyle, zoomFactor);
+            int y = item->y->computeLength<int>(style(), m_rootElementStyle, zoomFactor);
+            int blur = item->blur ? item->blur->computeLength<int>(style(), m_rootElementStyle, zoomFactor) : 0;
+            int spread = item->spread ? item->spread->computeLength<int>(style(), m_rootElementStyle, zoomFactor) : 0;
             ShadowStyle shadowStyle = item->style && item->style->getIdent() == CSSValueInset ? Inset : Normal;
             Color color;
             if (item->color)
@@ -3739,7 +3739,7 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
         RefPtr<StyleReflection> reflection = StyleReflection::create();
         reflection->setDirection(reflectValue->direction());
         if (reflectValue->offset())
-            reflection->setOffset(reflectValue->offset()->convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(style(), m_rootElementStyle, m_parentStyle, zoomFactor));
+            reflection->setOffset(reflectValue->offset()->convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(style(), m_rootElementStyle, zoomFactor));
         NinePieceImage mask;
         mask.setMaskDefaults();
         m_styleMap.mapNinePieceImage(id, reflectValue->mask(), mask);
@@ -3821,7 +3821,7 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
                 break;
             }
         } else {
-            Length marqueeLength = convertToIntLength(primitiveValue, style(), m_rootElementStyle, m_parentStyle);
+            Length marqueeLength = convertToIntLength(primitiveValue, style(), m_rootElementStyle);
             if (!marqueeLength.isUndefined())
                 m_style->setMarqueeIncrement(marqueeLength);
         }
@@ -3867,10 +3867,10 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
 
         DashboardRegion* first = region;
         while (region) {
-            Length top = convertToIntLength(region->top(), style(), m_rootElementStyle, m_parentStyle);
-            Length right = convertToIntLength(region->right(), style(), m_rootElementStyle, m_parentStyle);
-            Length bottom = convertToIntLength(region->bottom(), style(), m_rootElementStyle, m_parentStyle);
-            Length left = convertToIntLength(region->left(), style(), m_rootElementStyle, m_parentStyle);
+            Length top = convertToIntLength(region->top(), style(), m_rootElementStyle);
+            Length right = convertToIntLength(region->right(), style(), m_rootElementStyle);
+            Length bottom = convertToIntLength(region->bottom(), style(), m_rootElementStyle);
+            Length left = convertToIntLength(region->left(), style(), m_rootElementStyle);
 
             if (top.isUndefined())
                 top = Length();
@@ -3905,11 +3905,11 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
                 result *= 3;
             else if (primitiveValue->getIdent() == CSSValueThick)
                 result *= 5;
-            width = CSSPrimitiveValue::create(result, CSSPrimitiveValue::CSS_EMS)->computeLength<float>(style(), m_rootElementStyle, m_parentStyle, zoomFactor);
+            width = CSSPrimitiveValue::create(result, CSSPrimitiveValue::CSS_EMS)->computeLength<float>(style(), m_rootElementStyle, zoomFactor);
             break;
         }
         default:
-            width = primitiveValue->computeLength<float>(style(), m_rootElementStyle, m_parentStyle, zoomFactor);
+            width = primitiveValue->computeLength<float>(style(), m_rootElementStyle, zoomFactor);
             break;
         }
         m_style->setTextStrokeWidth(width);
@@ -3918,7 +3918,7 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
     case CSSPropertyWebkitTransform: {
         HANDLE_INHERIT_AND_INITIAL(transform, Transform);
         TransformOperations operations;
-        createTransformOperations(value, style(), m_rootElementStyle, m_parentStyle, operations);
+        createTransformOperations(value, style(), m_rootElementStyle, operations);
         m_style->setTransform(operations);
         return;
     }
@@ -3935,10 +3935,10 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
 
         float perspectiveValue;
         if (primitiveValue->isLength())
-            perspectiveValue = primitiveValue->computeLength<float>(style(), m_rootElementStyle, m_parentStyle, zoomFactor);
+            perspectiveValue = primitiveValue->computeLength<float>(style(), m_rootElementStyle, zoomFactor);
         else if (primitiveValue->isNumber()) {
             // For backward compatibility, treat valueless numbers as px.
-            perspectiveValue = CSSPrimitiveValue::create(primitiveValue->getDoubleValue(), CSSPrimitiveValue::CSS_PX)->computeLength<float>(style(), m_rootElementStyle, m_parentStyle, zoomFactor);
+            perspectiveValue = CSSPrimitiveValue::create(primitiveValue->getDoubleValue(), CSSPrimitiveValue::CSS_PX)->computeLength<float>(style(), m_rootElementStyle, zoomFactor);
         } else
             return;
 
@@ -4814,7 +4814,7 @@ static TransformOperation::OperationType getTransformOperationType(WebKitCSSTran
     return TransformOperation::NONE;
 }
 
-bool StyleResolver::createTransformOperations(CSSValue* inValue, RenderStyle* style, RenderStyle* rootStyle, RenderStyle* parentStyle, TransformOperations& outOperations)
+bool StyleResolver::createTransformOperations(CSSValue* inValue, RenderStyle* style, RenderStyle* rootStyle, TransformOperations& outOperations)
 {
     if (!inValue || !inValue->isValueList()) {
         outOperations.clear();
@@ -4898,13 +4898,13 @@ bool StyleResolver::createTransformOperations(CSSValue* inValue, RenderStyle* st
             Length tx = Length(0, Fixed);
             Length ty = Length(0, Fixed);
             if (transformValue->operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
-                ty = convertToFloatLength(firstValue, style, rootStyle, parentStyle, zoomFactor);
+                ty = convertToFloatLength(firstValue, style, rootStyle, zoomFactor);
             else {
-                tx = convertToFloatLength(firstValue, style, rootStyle, parentStyle, zoomFactor);
+                tx = convertToFloatLength(firstValue, style, rootStyle, zoomFactor);
                 if (transformValue->operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
                     if (transformValue->length() > 1) {
                         CSSPrimitiveValue* secondValue = static_cast<CSSPrimitiveValue*>(transformValue->itemWithoutBoundsCheck(1));
-                        ty = convertToFloatLength(secondValue, style, rootStyle, parentStyle, zoomFactor);
+                        ty = convertToFloatLength(secondValue, style, rootStyle, zoomFactor);
                     }
                 }
             }
@@ -4921,19 +4921,19 @@ bool StyleResolver::createTransformOperations(CSSValue* inValue, RenderStyle* st
             Length ty = Length(0, Fixed);
             Length tz = Length(0, Fixed);
             if (transformValue->operationType() == WebKitCSSTransformValue::TranslateZTransformOperation)
-                tz = convertToFloatLength(firstValue, style, rootStyle, parentStyle, zoomFactor);
+                tz = convertToFloatLength(firstValue, style, rootStyle, zoomFactor);
             else if (transformValue->operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
-                ty = convertToFloatLength(firstValue, style, rootStyle, parentStyle, zoomFactor);
+                ty = convertToFloatLength(firstValue, style, rootStyle, zoomFactor);
             else {
-                tx = convertToFloatLength(firstValue, style, rootStyle, parentStyle, zoomFactor);
+                tx = convertToFloatLength(firstValue, style, rootStyle, zoomFactor);
                 if (transformValue->operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
                     if (transformValue->length() > 2) {
                         CSSPrimitiveValue* thirdValue = static_cast<CSSPrimitiveValue*>(transformValue->itemWithoutBoundsCheck(2));
-                        tz = convertToFloatLength(thirdValue, style, rootStyle, parentStyle, zoomFactor);
+                        tz = convertToFloatLength(thirdValue, style, rootStyle, zoomFactor);
                     }
                     if (transformValue->length() > 1) {
                         CSSPrimitiveValue* secondValue = static_cast<CSSPrimitiveValue*>(transformValue->itemWithoutBoundsCheck(1));
-                        ty = convertToFloatLength(secondValue, style, rootStyle, parentStyle, zoomFactor);
+                        ty = convertToFloatLength(secondValue, style, rootStyle, zoomFactor);
                     }
                 }
             }
@@ -5036,7 +5036,7 @@ bool StyleResolver::createTransformOperations(CSSValue* inValue, RenderStyle* st
         case WebKitCSSTransformValue::PerspectiveTransformOperation: {
             Length p = Length(0, Fixed);
             if (firstValue->isLength())
-                p = convertToFloatLength(firstValue, style, rootStyle, parentStyle, zoomFactor);
+                p = convertToFloatLength(firstValue, style, rootStyle, zoomFactor);
             else {
                 // This is a quirk that should go away when 3d transforms are finalized.
                 double val = firstValue->getDoubleValue();
@@ -5400,7 +5400,7 @@ bool StyleResolver::createFilterOperations(CSSValue* inValue, RenderStyle* style
         case WebKitCSSFilterValue::BlurFilterOperation: {
             Length stdDeviation = Length(0, Fixed);
             if (filterValue->length() >= 1)
-                stdDeviation = convertToFloatLength(firstValue, style, rootStyle, parentStyle(), zoomFactor);
+                stdDeviation = convertToFloatLength(firstValue, style, rootStyle, zoomFactor);
             if (stdDeviation.isUndefined())
                 return false;
 
@@ -5416,9 +5416,9 @@ bool StyleResolver::createFilterOperations(CSSValue* inValue, RenderStyle* style
                 continue;
 
             ShadowValue* item = static_cast<ShadowValue*>(cssValue);
-            IntPoint location(item->x->computeLength<int>(style, rootStyle, m_parentStyle, zoomFactor),
-                              item->y->computeLength<int>(style, rootStyle, m_parentStyle, zoomFactor));
-            int blur = item->blur ? item->blur->computeLength<int>(style, rootStyle, m_parentStyle, zoomFactor) : 0;
+            IntPoint location(item->x->computeLength<int>(style, rootStyle, zoomFactor),
+                              item->y->computeLength<int>(style, rootStyle, zoomFactor));
+            int blur = item->blur ? item->blur->computeLength<int>(style, rootStyle, zoomFactor) : 0;
             Color color;
             if (item->color)
                 color = colorFromPrimitiveValue(item->color.get());
index 748fda6..4843eb5 100644 (file)
@@ -156,8 +156,7 @@ public:
     void setEffectiveZoom(float f) { m_fontDirty |= style()->setEffectiveZoom(f); }
     void setTextSizeAdjust(bool b) { m_fontDirty |= style()->setTextSizeAdjust(b); }
     bool hasParentNode() const { return m_parentNode; }
-    ContainerNode* parentNode() const { return m_parentNode; }
-
+    
     void appendAuthorStylesheets(unsigned firstNew, const Vector<RefPtr<StyleSheet> >&);
     
     // Find the ids or classes the selectors on a stylesheet are scoped to. The selectors only apply to elements in subtrees where the root element matches the scope.
@@ -245,7 +244,7 @@ public:
     bool usesBeforeAfterRules() const { return m_features.usesBeforeAfterRules; }
     bool usesLinkRules() const { return m_features.usesLinkRules; }
 
-    static bool createTransformOperations(CSSValue* inValue, RenderStyle* inStyle, RenderStyle* rootStyle, RenderStyle* parentStyle, TransformOperations& outOperations);
+    static bool createTransformOperations(CSSValue* inValue, RenderStyle* inStyle, RenderStyle* rootStyle, TransformOperations& outOperations);
     
     void invalidateMatchedPropertiesCache();
     
@@ -410,8 +409,8 @@ public:
     bool applyPropertyToRegularStyle() const { return m_applyPropertyToRegularStyle; }
     bool applyPropertyToVisitedLinkStyle() const { return m_applyPropertyToVisitedLinkStyle; }
 
-    static Length convertToIntLength(CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, RenderStyle* parentStyle, double multiplier = 1);
-    static Length convertToFloatLength(CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, RenderStyle* parentStyle, double multiplier = 1);
+    static Length convertToIntLength(CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, double multiplier = 1);
+    static Length convertToFloatLength(CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, double multiplier = 1);
 
     CSSToStyleMap* styleMap() { return &m_styleMap; }
     
index 872236b..92bfce3 100644 (file)
@@ -66,7 +66,7 @@ void WebKitCSSMatrix::setMatrixValue(const String& string, ExceptionCode& ec)
             return;
 
         TransformOperations operations;
-        if (!StyleResolver::createTransformOperations(value.get(), 0, 0, 0, operations)) {
+        if (!StyleResolver::createTransformOperations(value.get(), 0, 0, operations)) {
             ec = SYNTAX_ERR;
             return;
         }