| OLD | NEW |
| 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 Apple Inc. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. |
| 8 * All rights reserved. | 8 * All rights reserved. |
| 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 // FIXME: This value isn't the intrinsic content logical height, but we need | 328 // FIXME: This value isn't the intrinsic content logical height, but we need |
| 329 // to update the value as its used by flexbox layout. crbug.com/367324 | 329 // to update the value as its used by flexbox layout. crbug.com/367324 |
| 330 setIntrinsicContentLogicalHeight(contentLogicalHeight()); | 330 setIntrinsicContentLogicalHeight(contentLogicalHeight()); |
| 331 | 331 |
| 332 setCellWidthChanged(false); | 332 setCellWidthChanged(false); |
| 333 } | 333 } |
| 334 | 334 |
| 335 LayoutUnit LayoutTableCell::paddingTop() const { | 335 LayoutUnit LayoutTableCell::paddingTop() const { |
| 336 LayoutUnit result = computedCSSPaddingTop(); | 336 LayoutUnit result = computedCSSPaddingTop(); |
| 337 if (isHorizontalWritingMode()) | 337 if (isHorizontalWritingMode()) |
| 338 result += (style()->getWritingMode() == TopToBottomWritingMode | 338 result += (blink::isHorizontalWritingMode(style()->getWritingMode()) |
| 339 ? intrinsicPaddingBefore() | 339 ? intrinsicPaddingBefore() |
| 340 : intrinsicPaddingAfter()); | 340 : intrinsicPaddingAfter()); |
| 341 // TODO(leviw): The floor call should be removed when Table is sub-pixel | 341 // TODO(leviw): The floor call should be removed when Table is sub-pixel |
| 342 // aware. crbug.com/377847 | 342 // aware. crbug.com/377847 |
| 343 return LayoutUnit(result.floor()); | 343 return LayoutUnit(result.floor()); |
| 344 } | 344 } |
| 345 | 345 |
| 346 LayoutUnit LayoutTableCell::paddingBottom() const { | 346 LayoutUnit LayoutTableCell::paddingBottom() const { |
| 347 LayoutUnit result = computedCSSPaddingBottom(); | 347 LayoutUnit result = computedCSSPaddingBottom(); |
| 348 if (isHorizontalWritingMode()) | 348 if (isHorizontalWritingMode()) |
| 349 result += (style()->getWritingMode() == TopToBottomWritingMode | 349 result += (blink::isHorizontalWritingMode(style()->getWritingMode()) |
| 350 ? intrinsicPaddingAfter() | 350 ? intrinsicPaddingAfter() |
| 351 : intrinsicPaddingBefore()); | 351 : intrinsicPaddingBefore()); |
| 352 // TODO(leviw): The floor call should be removed when Table is sub-pixel | 352 // TODO(leviw): The floor call should be removed when Table is sub-pixel |
| 353 // aware. crbug.com/377847 | 353 // aware. crbug.com/377847 |
| 354 return LayoutUnit(result.floor()); | 354 return LayoutUnit(result.floor()); |
| 355 } | 355 } |
| 356 | 356 |
| 357 LayoutUnit LayoutTableCell::paddingLeft() const { | 357 LayoutUnit LayoutTableCell::paddingLeft() const { |
| 358 LayoutUnit result = computedCSSPaddingLeft(); | 358 LayoutUnit result = computedCSSPaddingLeft(); |
| 359 if (!isHorizontalWritingMode()) | 359 if (!isHorizontalWritingMode()) |
| 360 result += (style()->getWritingMode() == LeftToRightWritingMode | 360 result += (isFlippedLinesWritingMode(style()->getWritingMode()) |
| 361 ? intrinsicPaddingBefore() | 361 ? intrinsicPaddingBefore() |
| 362 : intrinsicPaddingAfter()); | 362 : intrinsicPaddingAfter()); |
| 363 // TODO(leviw): The floor call should be removed when Table is sub-pixel | 363 // TODO(leviw): The floor call should be removed when Table is sub-pixel |
| 364 // aware. crbug.com/377847 | 364 // aware. crbug.com/377847 |
| 365 return LayoutUnit(result.floor()); | 365 return LayoutUnit(result.floor()); |
| 366 } | 366 } |
| 367 | 367 |
| 368 LayoutUnit LayoutTableCell::paddingRight() const { | 368 LayoutUnit LayoutTableCell::paddingRight() const { |
| 369 LayoutUnit result = computedCSSPaddingRight(); | 369 LayoutUnit result = computedCSSPaddingRight(); |
| 370 if (!isHorizontalWritingMode()) | 370 if (!isHorizontalWritingMode()) |
| 371 result += (style()->getWritingMode() == LeftToRightWritingMode | 371 result += (isFlippedLinesWritingMode(style()->getWritingMode()) |
| 372 ? intrinsicPaddingAfter() | 372 ? intrinsicPaddingAfter() |
| 373 : intrinsicPaddingBefore()); | 373 : intrinsicPaddingBefore()); |
| 374 // TODO(leviw): The floor call should be removed when Table is sub-pixel | 374 // TODO(leviw): The floor call should be removed when Table is sub-pixel |
| 375 // aware. crbug.com/377847 | 375 // aware. crbug.com/377847 |
| 376 return LayoutUnit(result.floor()); | 376 return LayoutUnit(result.floor()); |
| 377 } | 377 } |
| 378 | 378 |
| 379 LayoutUnit LayoutTableCell::paddingBefore() const { | 379 LayoutUnit LayoutTableCell::paddingBefore() const { |
| 380 return LayoutUnit(computedCSSPaddingBefore().floor() + | 380 return LayoutUnit(computedCSSPaddingBefore().floor() + |
| 381 intrinsicPaddingBefore()); | 381 intrinsicPaddingBefore()); |
| (...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 cb->adjustChildDebugRect(rect); | 1483 cb->adjustChildDebugRect(rect); |
| 1484 | 1484 |
| 1485 return rect; | 1485 return rect; |
| 1486 } | 1486 } |
| 1487 | 1487 |
| 1488 void LayoutTableCell::adjustChildDebugRect(LayoutRect& r) const { | 1488 void LayoutTableCell::adjustChildDebugRect(LayoutRect& r) const { |
| 1489 r.move(0, -intrinsicPaddingBefore()); | 1489 r.move(0, -intrinsicPaddingBefore()); |
| 1490 } | 1490 } |
| 1491 | 1491 |
| 1492 } // namespace blink | 1492 } // namespace blink |
| OLD | NEW |