From fad7eaf8cc4f50f6c3bfc0485b6a68b634cf11de Mon Sep 17 00:00:00 2001 From: "commit-queue@webkit.org" Date: Tue, 27 Sep 2011 21:19:16 +0000 Subject: [PATCH] Unreviewed, rolling out r96139. http://trac.webkit.org/changeset/96139 https://bugs.webkit.org/show_bug.cgi?id=68933 Broke table-percent-height.html on Mac bots (Requested by mwenge2 on #webkit). Patch by Sheriff Bot on 2011-09-27 Source/WebCore: * rendering/RenderBox.cpp: (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): * rendering/RenderBox.h: LayoutTests: * fast/replaced/table-percent-width-expected.txt: Removed. * fast/replaced/table-percent-width.html: Removed. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96157 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 12 +++ .../fast/replaced/table-percent-width-expected.txt | 25 ----- LayoutTests/fast/replaced/table-percent-width.html | 115 --------------------- Source/WebCore/ChangeLog | 14 +++ Source/WebCore/rendering/RenderBox.cpp | 46 ++------- Source/WebCore/rendering/RenderBox.h | 1 - 6 files changed, 35 insertions(+), 178 deletions(-) delete mode 100644 LayoutTests/fast/replaced/table-percent-width-expected.txt delete mode 100644 LayoutTests/fast/replaced/table-percent-width.html diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 04c1117..eaeb0c9 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,15 @@ +2011-09-27 Sheriff Bot + + Unreviewed, rolling out r96139. + http://trac.webkit.org/changeset/96139 + https://bugs.webkit.org/show_bug.cgi?id=68933 + + Broke table-percent-height.html on Mac bots (Requested by + mwenge2 on #webkit). + + * fast/replaced/table-percent-width-expected.txt: Removed. + * fast/replaced/table-percent-width.html: Removed. + 2011-09-27 Mike Reed need to rebseline these once new aa-gdi-text code lands in skia diff --git a/LayoutTests/fast/replaced/table-percent-width-expected.txt b/LayoutTests/fast/replaced/table-percent-width-expected.txt deleted file mode 100644 index e7f27fa..0000000 --- a/LayoutTests/fast/replaced/table-percent-width-expected.txt +++ /dev/null @@ -1,25 +0,0 @@ - - - - - -This test checks that a replaced element with percentage width (and no height specified) within a table cell is squeezed to the dimensions of the table cell. -See bug #29447. - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - - -PASS getWidth('img-1') is '105px' -PASS getHeight('img-1') is '105px' -PASS getWidth('img-2') is '98px' -PASS getHeight('img-2') is '98px' -PASS getWidth('img-3') is '40px' -PASS getHeight('img-3') is '40px' -PASS getWidth('img-4') is '36px' -PASS getHeight('img-4') is '36px' -PASS getWidth('img-5') is '40px' -PASS getHeight('img-5') is '36px' -PASS successfullyParsed is true - -TEST COMPLETE - diff --git a/LayoutTests/fast/replaced/table-percent-width.html b/LayoutTests/fast/replaced/table-percent-width.html deleted file mode 100644 index 7f6df9b..0000000 --- a/LayoutTests/fast/replaced/table-percent-width.html +++ /dev/null @@ -1,115 +0,0 @@ - - - webkit.org/b/29447: Replaced elements squeezed when width is specified as percentage inside a table with Auto layout - - - - - - - - - - -
- -
- - - - - -
- -
- - - - - -
- -
- - - - - -
- -
- - - - - -
- -
- -

-
- - diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 0a6aaad..39b5db1 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,17 @@ +2011-09-27 Sheriff Bot + + Unreviewed, rolling out r96139. + http://trac.webkit.org/changeset/96139 + https://bugs.webkit.org/show_bug.cgi?id=68933 + + Broke table-percent-height.html on Mac bots (Requested by + mwenge2 on #webkit). + + * rendering/RenderBox.cpp: + (WebCore::RenderBox::computeReplacedLogicalWidthUsing): + (WebCore::RenderBox::computeReplacedLogicalHeightUsing): + * rendering/RenderBox.h: + 2011-09-27 Tim Horton REGRESSION(65665): Pattern size being clamped to SVG size can prevent transformed elements from being fully covered by userSpaceOnUse patterns diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp index dee3741..5c8bee9 100644 --- a/Source/WebCore/rendering/RenderBox.cpp +++ b/Source/WebCore/rendering/RenderBox.cpp @@ -1216,37 +1216,6 @@ LayoutRect RenderBox::clipRect(const LayoutPoint& location) return clipRect; } -static bool avoidSqueezingWidth(RenderBlock* cb) -{ - while (cb && !cb->isRenderView()) { - if (!cb->style()->logicalWidth().isAuto() && !cb->style()->logicalWidth().isPercent()) - return false; - cb = cb->containingBlock(); - } - return true; -} - -static bool avoidSqueezingHeight(RenderBlock* cb) -{ - while (cb && !cb->isRenderView()) { - if (!cb->style()->logicalHeight().isAuto() && !cb->style()->logicalHeight().isPercent()) - return false; - cb = cb->containingBlock(); - } - return true; -} - -int RenderBox::containingBlockReplacedLogicalWidthForContent() const -{ - RenderBlock* cb = containingBlock(); - // Don't let table cells squeeze percent-height replaced elements - // - if (cb->isTableCell() && avoidSqueezingWidth(cb)) - return max(shrinkToAvoidFloats() ? cb->availableLogicalWidthForLine(y(), false) : cb->availableLogicalWidth(), intrinsicLogicalWidth()); - - return containingBlockLogicalWidthForContent(); -} - LayoutUnit RenderBox::containingBlockLogicalWidthForContent() const { RenderBlock* cb = containingBlock(); @@ -2045,7 +2014,7 @@ LayoutUnit RenderBox::computeReplacedLogicalWidthUsing(Length logicalWidth) cons // 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 - const LayoutUnit cw = isPositioned() ? containingBlockLogicalWidthForPositioned(toRenderBoxModelObject(container())) : containingBlockReplacedLogicalWidthForContent(); + const LayoutUnit cw = isPositioned() ? containingBlockLogicalWidthForPositioned(toRenderBoxModelObject(container())) : containingBlockLogicalWidthForContent(); if (cw > 0) return computeContentBoxLogicalWidth(logicalWidth.calcMinValue(cw)); } @@ -2105,11 +2074,14 @@ LayoutUnit RenderBox::computeReplacedLogicalHeightUsing(Length logicalHeight) co // table cells using percentage heights. // FIXME: This needs to be made block-flow-aware. If the cell and image are perpendicular block-flows, this isn't right. // https://bugs.webkit.org/show_bug.cgi?id=46997 - if (cb->isTableCell() && avoidSqueezingHeight(toRenderBlock(cb))) { - // Don't let table cells squeeze percent-height replaced elements - // - availableHeight = max(availableHeight, intrinsicLogicalHeight()); - return logicalHeight.calcValue(availableHeight - borderAndPaddingLogicalHeight()); + while (cb && !cb->isRenderView() && (cb->style()->logicalHeight().isAuto() || cb->style()->logicalHeight().isPercent())) { + if (cb->isTableCell()) { + // Don't let table cells squeeze percent-height replaced elements + // + availableHeight = max(availableHeight, intrinsicLogicalHeight()); + return logicalHeight.calcValue(availableHeight - borderAndPaddingLogicalHeight()); + } + cb = cb->containingBlock(); } } return computeContentBoxLogicalHeight(logicalHeight.calcValue(availableHeight)); diff --git a/Source/WebCore/rendering/RenderBox.h b/Source/WebCore/rendering/RenderBox.h index c27b0ce..45d4460 100644 --- a/Source/WebCore/rendering/RenderBox.h +++ b/Source/WebCore/rendering/RenderBox.h @@ -290,7 +290,6 @@ public: virtual LayoutUnit containingBlockLogicalWidthForContent() const; LayoutUnit perpendicularContainingBlockLogicalHeight() const; - int containingBlockReplacedLogicalWidthForContent() const; virtual void computeLogicalWidth(); virtual void computeLogicalHeight(); -- 2.7.4