Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: Source/core/rendering/RenderTable.cpp

Issue 341523002: Resolve percent lengths for abs. positioned tables against padding box. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved.
8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 LogicalExtentComputedValues computedValues; 254 LogicalExtentComputedValues computedValues;
255 computePositionedLogicalWidth(computedValues); 255 computePositionedLogicalWidth(computedValues);
256 setLogicalWidth(computedValues.m_extent); 256 setLogicalWidth(computedValues.m_extent);
257 setLogicalLeft(computedValues.m_position); 257 setLogicalLeft(computedValues.m_position);
258 setMarginStart(computedValues.m_margins.m_start); 258 setMarginStart(computedValues.m_margins.m_start);
259 setMarginEnd(computedValues.m_margins.m_end); 259 setMarginEnd(computedValues.m_margins.m_end);
260 } 260 }
261 261
262 RenderBlock* cb = containingBlock(); 262 RenderBlock* cb = containingBlock();
263 263
264 LayoutUnit availableLogicalWidth = containingBlockLogicalWidthForContent(); 264 LayoutUnit availableLogicalWidth = containingBlockLogicalWidthForContent() + (isOutOfFlowPositioned() ? cb->paddingLogicalWidth() : 0);
265 bool hasPerpendicularContainingBlock = cb->style()->isHorizontalWritingMode( ) != style()->isHorizontalWritingMode(); 265 bool hasPerpendicularContainingBlock = cb->style()->isHorizontalWritingMode( ) != style()->isHorizontalWritingMode();
266 LayoutUnit containerWidthInInlineDirection = hasPerpendicularContainingBlock ? perpendicularContainingBlockLogicalHeight() : availableLogicalWidth; 266 LayoutUnit containerWidthInInlineDirection = hasPerpendicularContainingBlock ? perpendicularContainingBlockLogicalHeight() : availableLogicalWidth;
267 267
268 Length styleLogicalWidth = style()->logicalWidth(); 268 Length styleLogicalWidth = style()->logicalWidth();
269 if ((styleLogicalWidth.isSpecified() && styleLogicalWidth.isPositive()) || s tyleLogicalWidth.isIntrinsic()) 269 if ((styleLogicalWidth.isSpecified() && styleLogicalWidth.isPositive()) || s tyleLogicalWidth.isIntrinsic())
270 setLogicalWidth(convertStyleLogicalWidthToComputedWidth(styleLogicalWidt h, containerWidthInInlineDirection)); 270 setLogicalWidth(convertStyleLogicalWidthToComputedWidth(styleLogicalWidt h, containerWidthInInlineDirection));
271 else { 271 else {
272 // Subtract out any fixed margins from our available width for auto widt h tables. 272 // Subtract out any fixed margins from our available width for auto widt h tables.
273 LayoutUnit marginStart = minimumValueForLength(style()->marginStart(), a vailableLogicalWidth); 273 LayoutUnit marginStart = minimumValueForLength(style()->marginStart(), a vailableLogicalWidth);
274 LayoutUnit marginEnd = minimumValueForLength(style()->marginEnd(), avail ableLogicalWidth); 274 LayoutUnit marginEnd = minimumValueForLength(style()->marginEnd(), avail ableLogicalWidth);
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const 1453 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const
1454 { 1454 {
1455 ASSERT(cell->isFirstOrLastCellInRow()); 1455 ASSERT(cell->isFirstOrLastCellInRow());
1456 if (hasSameDirectionAs(cell->row())) 1456 if (hasSameDirectionAs(cell->row()))
1457 return style()->borderEnd(); 1457 return style()->borderEnd();
1458 1458
1459 return style()->borderStart(); 1459 return style()->borderStart();
1460 } 1460 }
1461 1461
1462 } 1462 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698