Changeset 97635 in webkit
- Timestamp:
- Oct 17, 2011 11:20:38 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r97632 r97635 1 2011-10-17 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/10293929> REGRESSION (r97525): iChat transcript has horizontal scroll bar when the conversation includes a wide image 4 https://bugs.webkit.org/show_bug.cgi?id=70204 5 6 Reviewed by Darin Adler. 7 8 * fast/replaced/table-percent-width-expected.txt: Updated the results to 9 show that this test is failing after reverting r97525. 10 1 11 2011-10-17 Ryosuke Niwa <rniwa@webkit.org> 2 12 -
trunk/LayoutTests/fast/replaced/table-percent-width-expected.txt
r97525 r97635 16 16 PASS getWidth('img-3') is '40px' 17 17 PASS getHeight('img-3') is '40px' 18 PASS getWidth('img-4') is '36px' 19 PASS getHeight('img-4') is '36px' 18 FAIL getWidth('img-4') should be 36px. Was 98px. 19 FAIL getHeight('img-4') should be 36px. Was 98px. 20 20 PASS getWidth('img-5') is '40px' 21 PASS getHeight('img-5') is '36px' 21 FAIL getHeight('img-5') should be 36px. Was 98px. 22 22 PASS successfullyParsed is true 23 23 -
trunk/Source/WebCore/ChangeLog
r97633 r97635 1 2011-10-17 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/10293929> REGRESSION (r97525): iChat transcript has horizontal scroll bar when the conversation includes a wide image 4 https://bugs.webkit.org/show_bug.cgi?id=70204 5 6 Reviewed by Darin Adler. 7 8 Reverted r97525, which was supposed to fix <http://webkit.org/b/29447>. 9 10 * rendering/RenderBox.cpp: 11 (WebCore::RenderBox::computeReplacedLogicalWidthUsing): 12 (WebCore::RenderBox::computeReplacedLogicalHeightUsing): 13 * rendering/RenderBox.h: 14 1 15 2011-10-17 Ada Chan <adachan@apple.com> 2 16 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r97525 r97635 1272 1272 } 1273 1273 1274 enum IntrinsicDimension { LogicalHeightDimension, LogicalWidthDimension };1275 1276 static bool shouldExpandToIntrinsicDimension(RenderBlock* cb, IntrinsicDimension dimension)1277 {1278 // This function allows images to size correctly to their intrinsic height/width when inside table cells1279 // that only have percent or auto height/width.1280 // It's only interested in inspecting as far as the containing table, if there is one.1281 bool inTableCell = false;1282 while (cb && !cb->isRenderView()) {1283 if (cb->isTableCell())1284 inTableCell = true;1285 1286 if (dimension == LogicalHeightDimension && !cb->style()->logicalHeight().isAuto() && !cb->style()->logicalHeight().isPercent())1287 return false;1288 if (dimension == LogicalWidthDimension && !cb->style()->logicalWidth().isAuto() && !cb->style()->logicalWidth().isPercent())1289 return false;1290 1291 if (cb->isTable())1292 break;1293 1294 cb = cb->containingBlock();1295 }1296 return inTableCell;1297 }1298 1299 LayoutUnit RenderBox::containingBlockReplacedLogicalWidthForContent() const1300 {1301 RenderBlock* cb = containingBlock();1302 if (shouldExpandToIntrinsicDimension(cb, LogicalWidthDimension))1303 return max(shrinkToAvoidFloats() ? cb->availableLogicalWidthForLine(logicalTop(), false) : cb->availableLogicalWidth(), intrinsicLogicalWidth());1304 return containingBlockLogicalWidthForContent();1305 }1306 1307 1274 LayoutUnit RenderBox::containingBlockLogicalWidthForContent() const 1308 1275 { … … 2211 2178 // containing block's block-flow. 2212 2179 // https://bugs.webkit.org/show_bug.cgi?id=46496 2213 const LayoutUnit cw = isPositioned() ? containingBlockLogicalWidthForPositioned(toRenderBoxModelObject(container())) : containingBlock ReplacedLogicalWidthForContent();2180 const LayoutUnit cw = isPositioned() ? containingBlockLogicalWidthForPositioned(toRenderBoxModelObject(container())) : containingBlockLogicalWidthForContent(); 2214 2181 if (cw > 0) 2215 2182 return computeContentBoxLogicalWidth(logicalWidth.calcMinValue(cw)); … … 2271 2238 // FIXME: This needs to be made block-flow-aware. If the cell and image are perpendicular block-flows, this isn't right. 2272 2239 // https://bugs.webkit.org/show_bug.cgi?id=46997 2273 if (shouldExpandToIntrinsicDimension(toRenderBlock(cb), LogicalHeightDimension)) { 2274 availableHeight = max(availableHeight, intrinsicLogicalHeight()); 2275 return logicalHeight.calcValue(availableHeight - borderAndPaddingLogicalHeight()); 2240 while (cb && !cb->isRenderView() && (cb->style()->logicalHeight().isAuto() || cb->style()->logicalHeight().isPercent())) { 2241 if (cb->isTableCell()) { 2242 // Don't let table cells squeeze percent-height replaced elements 2243 // <http://bugs.webkit.org/show_bug.cgi?id=15359> 2244 availableHeight = max(availableHeight, intrinsicLogicalHeight()); 2245 return logicalHeight.calcValue(availableHeight - borderAndPaddingLogicalHeight()); 2246 } 2247 cb = cb->containingBlock(); 2276 2248 } 2277 2249 } -
trunk/Source/WebCore/rendering/RenderBox.h
r97525 r97635 298 298 LayoutUnit containingBlockLogicalWidthForContentInRegion(RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const; 299 299 LayoutUnit perpendicularContainingBlockLogicalHeight() const; 300 LayoutUnit containingBlockReplacedLogicalWidthForContent() const;301 300 302 301 virtual void computeLogicalWidth();
Note: See TracChangeset
for help on using the changeset viewer.