Changeset 96157 in webkit


Ignore:
Timestamp:
Sep 27, 2011 2:19:16 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

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 <webkit.review.bot@gmail.com> 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.
Location:
trunk
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r96156 r96157  
     12011-09-27  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r96139.
     4        http://trac.webkit.org/changeset/96139
     5        https://bugs.webkit.org/show_bug.cgi?id=68933
     6
     7        Broke table-percent-height.html on Mac bots (Requested by
     8        mwenge2 on #webkit).
     9
     10        * fast/replaced/table-percent-width-expected.txt: Removed.
     11        * fast/replaced/table-percent-width.html: Removed.
     12
    1132011-09-27  Mike Reed  <reed@google.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r96155 r96157  
     12011-09-27  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r96139.
     4        http://trac.webkit.org/changeset/96139
     5        https://bugs.webkit.org/show_bug.cgi?id=68933
     6
     7        Broke table-percent-height.html on Mac bots (Requested by
     8        mwenge2 on #webkit).
     9
     10        * rendering/RenderBox.cpp:
     11        (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
     12        (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
     13        * rendering/RenderBox.h:
     14
    1152011-09-27  Tim Horton  <timothy_horton@apple.com>
    216
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r96152 r96157  
    12171217}
    12181218
    1219 static bool avoidSqueezingWidth(RenderBlock* cb)
    1220 {
    1221     while (cb && !cb->isRenderView()) {
    1222         if (!cb->style()->logicalWidth().isAuto() && !cb->style()->logicalWidth().isPercent())
    1223             return false;
    1224         cb = cb->containingBlock();
    1225     }
    1226     return true;
    1227 }
    1228 
    1229 static bool avoidSqueezingHeight(RenderBlock* cb)
    1230 {
    1231     while (cb && !cb->isRenderView()) {
    1232         if (!cb->style()->logicalHeight().isAuto() && !cb->style()->logicalHeight().isPercent())
    1233             return false;
    1234         cb = cb->containingBlock();
    1235     }
    1236     return true;
    1237 }
    1238 
    1239 int RenderBox::containingBlockReplacedLogicalWidthForContent() const
    1240 {
    1241     RenderBlock* cb = containingBlock();
    1242     // Don't let table cells squeeze percent-height replaced elements
    1243     // <http://bugs.webkit.org/show_bug.cgi?id=29447>
    1244     if (cb->isTableCell() && avoidSqueezingWidth(cb))
    1245         return max(shrinkToAvoidFloats() ? cb->availableLogicalWidthForLine(y(), false) : cb->availableLogicalWidth(), intrinsicLogicalWidth());
    1246 
    1247     return containingBlockLogicalWidthForContent();
    1248 }
    1249 
    12501219LayoutUnit RenderBox::containingBlockLogicalWidthForContent() const
    12511220{
     
    20462015            // containing block's block-flow.
    20472016            // https://bugs.webkit.org/show_bug.cgi?id=46496
    2048             const LayoutUnit cw = isPositioned() ? containingBlockLogicalWidthForPositioned(toRenderBoxModelObject(container())) : containingBlockReplacedLogicalWidthForContent();
     2017            const LayoutUnit cw = isPositioned() ? containingBlockLogicalWidthForPositioned(toRenderBoxModelObject(container())) : containingBlockLogicalWidthForContent();
    20492018            if (cw > 0)
    20502019                return computeContentBoxLogicalWidth(logicalWidth.calcMinValue(cw));
     
    21062075                // FIXME: This needs to be made block-flow-aware.  If the cell and image are perpendicular block-flows, this isn't right.
    21072076                // https://bugs.webkit.org/show_bug.cgi?id=46997
    2108                 if (cb->isTableCell() && avoidSqueezingHeight(toRenderBlock(cb))) {
    2109                     // Don't let table cells squeeze percent-height replaced elements
    2110                     // <http://bugs.webkit.org/show_bug.cgi?id=15359>
    2111                     availableHeight = max(availableHeight, intrinsicLogicalHeight());
    2112                     return logicalHeight.calcValue(availableHeight - borderAndPaddingLogicalHeight());
     2077                while (cb && !cb->isRenderView() && (cb->style()->logicalHeight().isAuto() || cb->style()->logicalHeight().isPercent())) {
     2078                    if (cb->isTableCell()) {
     2079                        // Don't let table cells squeeze percent-height replaced elements
     2080                        // <http://bugs.webkit.org/show_bug.cgi?id=15359>
     2081                        availableHeight = max(availableHeight, intrinsicLogicalHeight());
     2082                        return logicalHeight.calcValue(availableHeight - borderAndPaddingLogicalHeight());
     2083                    }
     2084                    cb = cb->containingBlock();
    21132085                }
    21142086            }
  • trunk/Source/WebCore/rendering/RenderBox.h

    r96152 r96157  
    291291    virtual LayoutUnit containingBlockLogicalWidthForContent() const;
    292292    LayoutUnit perpendicularContainingBlockLogicalHeight() const;
    293     int containingBlockReplacedLogicalWidthForContent() const;
    294293   
    295294    virtual void computeLogicalWidth();
Note: See TracChangeset for help on using the changeset viewer.