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

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

Issue 25206002: A height of a table which has position: absolute and box-sizing: border-box ignores half of the bor… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: /Users/yukisekiguchi/work/chromium-blink/src/third_party/WebKit/LayoutTests/fast/box-sizing/table-c… 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
« no previous file with comments | « LayoutTests/fast/box-sizing/table-no-collapse-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 3645 matching lines...) Expand 10 before | Expand all | Expand 10 after
3656 3656
3657 const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidth ForPositioned(containerBlock, 0, false); 3657 const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidth ForPositioned(containerBlock, 0, false);
3658 3658
3659 LayoutUnit logicalTopValue = 0; 3659 LayoutUnit logicalTopValue = 0;
3660 3660
3661 bool logicalHeightIsAuto = logicalHeightLength.isAuto(); 3661 bool logicalHeightIsAuto = logicalHeightLength.isAuto();
3662 bool logicalTopIsAuto = logicalTop.isAuto(); 3662 bool logicalTopIsAuto = logicalTop.isAuto();
3663 bool logicalBottomIsAuto = logicalBottom.isAuto(); 3663 bool logicalBottomIsAuto = logicalBottom.isAuto();
3664 RenderView* renderView = view(); 3664 RenderView* renderView = view();
3665 3665
3666 LayoutUnit resolvedLogicalHeight;
3666 // Height is never unsolved for tables. 3667 // Height is never unsolved for tables.
3667 if (isTable()) { 3668 if (isTable()) {
3668 logicalHeightLength.setValue(Fixed, contentLogicalHeight); 3669 resolvedLogicalHeight = contentLogicalHeight;
3669 logicalHeightIsAuto = false; 3670 logicalHeightIsAuto = false;
3671 } else {
3672 if (logicalHeightLength.isIntrinsic())
3673 resolvedLogicalHeight = computeIntrinsicLogicalContentHeightUsing(lo gicalHeightLength, contentLogicalHeight, bordersPlusPadding);
3674 else
3675 resolvedLogicalHeight = adjustContentBoxLogicalHeightForBoxSizing(va lueForLength(logicalHeightLength, containerLogicalHeight, renderView));
3670 } 3676 }
3671 3677
3672 LayoutUnit resolvedLogicalHeight;
3673 if (logicalHeightLength.isIntrinsic())
3674 resolvedLogicalHeight = computeIntrinsicLogicalContentHeightUsing(logica lHeightLength, contentLogicalHeight, bordersPlusPadding);
3675 else
3676 resolvedLogicalHeight = adjustContentBoxLogicalHeightForBoxSizing(valueF orLength(logicalHeightLength, containerLogicalHeight, renderView));
3677
3678 if (!logicalTopIsAuto && !logicalHeightIsAuto && !logicalBottomIsAuto) { 3678 if (!logicalTopIsAuto && !logicalHeightIsAuto && !logicalBottomIsAuto) {
3679 /*---------------------------------------------------------------------- -*\ 3679 /*---------------------------------------------------------------------- -*\
3680 * If none of the three are 'auto': If both 'margin-top' and 'margin- 3680 * If none of the three are 'auto': If both 'margin-top' and 'margin-
3681 * bottom' are 'auto', solve the equation under the extra constraint tha t 3681 * bottom' are 'auto', solve the equation under the extra constraint tha t
3682 * the two margins get equal values. If one of 'margin-top' or 'margin- 3682 * the two margins get equal values. If one of 'margin-top' or 'margin-
3683 * bottom' is 'auto', solve the equation for that value. If the values 3683 * bottom' is 'auto', solve the equation for that value. If the values
3684 * are over-constrained, ignore the value for 'bottom' and solve for tha t 3684 * are over-constrained, ignore the value for 'bottom' and solve for tha t
3685 * value. 3685 * value.
3686 \*---------------------------------------------------------------------- -*/ 3686 \*---------------------------------------------------------------------- -*/
3687 // NOTE: It is not necessary to solve for 'bottom' in the over constrai ned 3687 // NOTE: It is not necessary to solve for 'bottom' in the over constrai ned
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
4767 return 0; 4767 return 0;
4768 4768
4769 if (!layoutState && !flowThreadContainingBlock()) 4769 if (!layoutState && !flowThreadContainingBlock())
4770 return 0; 4770 return 0;
4771 4771
4772 RenderBlock* containerBlock = containingBlock(); 4772 RenderBlock* containerBlock = containingBlock();
4773 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); 4773 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
4774 } 4774 }
4775 4775
4776 } // namespace WebCore 4776 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/box-sizing/table-no-collapse-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698