CSS3 calc: image sizing works with mixed percentage/absolute
authormikelawther@chromium.org <mikelawther@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2012 18:30:01 +0000 (18:30 +0000)
committermikelawther@chromium.org <mikelawther@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2012 18:30:01 +0000 (18:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82017

Reviewed by Ojan Vafai.

Source/WebCore:

Test: css3/calc/img-size-expected.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):

LayoutTests:

Test is now expected to match.

* css3/calc/img-size-expected.html: Renamed from LayoutTests/css3/calc/img-size-expected-mismatch.html.

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

LayoutTests/ChangeLog
LayoutTests/css3/calc/img-size-expected.html [moved from LayoutTests/css3/calc/img-size-expected-mismatch.html with 100% similarity]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp

index 26fe3a372efe93a06ea4c0fc0d9ae823ee0f654b..be8dc6a8177af9d8baa981faec8ec2fcee980eb9 100644 (file)
@@ -1,3 +1,14 @@
+2012-03-23  Mike Lawther  <mikelawther@chromium.org>
+
+        CSS3 calc: image sizing works with mixed percentage/absolute
+        https://bugs.webkit.org/show_bug.cgi?id=82017
+
+        Reviewed by Ojan Vafai.
+
+        Test is now expected to match.
+
+        * css3/calc/img-size-expected.html: Renamed from LayoutTests/css3/calc/img-size-expected-mismatch.html.
+
 2012-03-23  Julien Chaffraix  <jchaffraix@webkit.org>
 
         REGRESSION(107971): Google Voice contact list is broken in WebKit due to badly allocating the extra height
index 4ff759aff4169e1daee3900a8beba51343da42c8..6d5b3e36a1a6d875188394c405b47a530e101fb7 100644 (file)
@@ -1,3 +1,16 @@
+2012-03-23  Mike Lawther  <mikelawther@chromium.org>
+
+        CSS3 calc: image sizing works with mixed percentage/absolute
+        https://bugs.webkit.org/show_bug.cgi?id=82017
+
+        Reviewed by Ojan Vafai.
+
+        Test: css3/calc/img-size-expected.html
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
+        (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
+
 2012-03-23  Julien Chaffraix  <jchaffraix@webkit.org>
 
         REGRESSION(107971): Google Voice contact list is broken in WebKit due to badly allocating the extra height
index 1fb573b44c953ac383fbe0f716d62ffd65ac2a9b..97779f45b1a617be0428dfcd8c7fbdba6c222a4f 100644 (file)
@@ -2274,7 +2274,8 @@ LayoutUnit RenderBox::computeReplacedLogicalWidthUsing(Length logicalWidth) cons
     switch (logicalWidth.type()) {
         case Fixed:
             return computeContentBoxLogicalWidth(logicalWidth.value());
-        case Percent: {
+        case Percent: 
+        case Calculated: {
             // FIXME: containingBlockLogicalWidthForContent() is wrong if the replaced element's block-flow is perpendicular to the
             // containing block's block-flow.
             // https://bugs.webkit.org/show_bug.cgi?id=46496
@@ -2306,6 +2307,7 @@ LayoutUnit RenderBox::computeReplacedLogicalHeightUsing(Length logicalHeight) co
         case Fixed:
             return computeContentBoxLogicalHeight(logicalHeight.value());
         case Percent:
+        case Calculated:
         {
             RenderObject* cb = isPositioned() ? container() : containingBlock();
             while (cb->isAnonymous()) {