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

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

Issue 25086004: offsetWidth on a table cell with fixed width is wrong (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/table/table-cell-offset-width-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 RenderStyle* style = this->style(); 413 RenderStyle* style = this->style();
414 return !style->width().isFixed() 414 return !style->width().isFixed()
415 || !style->minWidth().isFixed() 415 || !style->minWidth().isFixed()
416 || (!style->maxWidth().isUndefined() && !style->maxWidth().isFixed()) 416 || (!style->maxWidth().isUndefined() && !style->maxWidth().isFixed())
417 || !style->paddingLeft().isFixed() 417 || !style->paddingLeft().isFixed()
418 || !style->paddingRight().isFixed() 418 || !style->paddingRight().isFixed()
419 || style->resize() != RESIZE_NONE 419 || style->resize() != RESIZE_NONE
420 || style->boxSizing() == BORDER_BOX 420 || style->boxSizing() == BORDER_BOX
421 || !isRenderBlock() 421 || !isRenderBlock()
422 || !isRenderBlockFlow() 422 || !isRenderBlockFlow()
423 || isFlexItemIncludingDeprecated(); 423 || isFlexItemIncludingDeprecated()
424 // TableCells can expand beyond a specified width.
425 || isTableCell();
eae 2013/09/27 19:56:56 This should probably be isTableCell() && !table->i
Julien - ping for review 2013/09/27 20:03:54 I don't think so. Fixed table layout will also for
424 } 426 }
425 427
426 LayoutUnit RenderBox::fixedOffsetWidth() const 428 LayoutUnit RenderBox::fixedOffsetWidth() const
427 { 429 {
428 ASSERT(!requiresLayoutToDetermineWidth()); 430 ASSERT(!requiresLayoutToDetermineWidth());
429 431
430 RenderStyle* style = this->style(); 432 RenderStyle* style = this->style();
431 433
432 LayoutUnit width = std::max(LayoutUnit(style->minWidth().value()), LayoutUni t(style->width().value())); 434 LayoutUnit width = std::max(LayoutUnit(style->minWidth().value()), LayoutUni t(style->width().value()));
433 if (style->maxWidth().isFixed()) 435 if (style->maxWidth().isFixed())
(...skipping 4331 matching lines...) Expand 10 before | Expand all | Expand 10 after
4765 return 0; 4767 return 0;
4766 4768
4767 if (!layoutState && !flowThreadContainingBlock()) 4769 if (!layoutState && !flowThreadContainingBlock())
4768 return 0; 4770 return 0;
4769 4771
4770 RenderBlock* containerBlock = containingBlock(); 4772 RenderBlock* containerBlock = containingBlock();
4771 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); 4773 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
4772 } 4774 }
4773 4775
4774 } // namespace WebCore 4776 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/table/table-cell-offset-width-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698