OLD | NEW |
---|---|
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 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2710 // FIXME: Check logicalTop/logicalBottom here to correctly handle vertical w riting-mode. | 2710 // FIXME: Check logicalTop/logicalBottom here to correctly handle vertical w riting-mode. |
2711 // https://bugs.webkit.org/show_bug.cgi?id=46500 | 2711 // https://bugs.webkit.org/show_bug.cgi?id=46500 |
2712 if (isLayoutBlock() && isOutOfFlowPositioned() && style()->height().isAuto() && !(style()->top().isAuto() || style()->bottom().isAuto())) { | 2712 if (isLayoutBlock() && isOutOfFlowPositioned() && style()->height().isAuto() && !(style()->top().isAuto() || style()->bottom().isAuto())) { |
2713 LayoutBlock* block = const_cast<LayoutBlock*>(toLayoutBlock(this)); | 2713 LayoutBlock* block = const_cast<LayoutBlock*>(toLayoutBlock(this)); |
2714 LogicalExtentComputedValues computedValues; | 2714 LogicalExtentComputedValues computedValues; |
2715 block->computeLogicalHeight(block->logicalHeight(), 0, computedValues); | 2715 block->computeLogicalHeight(block->logicalHeight(), 0, computedValues); |
2716 LayoutUnit newContentHeight = computedValues.m_extent - block->borderAnd PaddingLogicalHeight() - block->scrollbarLogicalHeight(); | 2716 LayoutUnit newContentHeight = computedValues.m_extent - block->borderAnd PaddingLogicalHeight() - block->scrollbarLogicalHeight(); |
2717 return adjustContentBoxLogicalHeightForBoxSizing(newContentHeight); | 2717 return adjustContentBoxLogicalHeightForBoxSizing(newContentHeight); |
2718 } | 2718 } |
2719 | 2719 |
2720 // FIXME: This is wrong if the containingBlock has a perpendicular writing m ode. | 2720 const LayoutBlock* cb = isLayoutBlock() ? toLayoutBlock(this) : containingBl ock(); |
rune
2015/03/16 13:34:03
You removed this FIXME. Is it fixed?
|
mstensho (USE GERRIT)
2015/03/23 14:27:55
Pretending that we're our own containing block? Th
changseok
2015/03/26 07:12:04
Agree. I looked into this area more. I don't know
mstensho (USE GERRIT)
2015/03/26 12:53:37
Yeah, but resolving percentage heights isn't as si
|
2721 LayoutUnit availableHeight = containingBlockLogicalHeightForContent(heightTy pe); | 2721 LayoutUnit availableHeight = cb->clientLogicalHeight(); |
rune
2015/03/16 13:34:03
This seems quite different from containingBlockLog
changseok
2015/03/26 07:12:04
Yeah.. I think containingBlockLogicalHeightForCont
| |
2722 if (heightType == ExcludeMarginBorderPadding) { | 2722 if (heightType == ExcludeMarginBorderPadding) |
2723 // FIXME: Margin collapsing hasn't happened yet, so this incorrectly rem oves collapsed margins. | 2723 availableHeight -= paddingBefore() + paddingAfter(); |
rune
2015/03/16 13:34:03
You removed this FIXME. Is it fixed?
| |
2724 availableHeight -= marginBefore() + marginAfter() + borderAndPaddingLogi calHeight(); | 2724 else if (heightType == IncludeMarginBorderPadding) |
2725 } | 2725 availableHeight += marginBefore() + marginAfter() + borderBefore() + bor derAfter(); |
2726 return availableHeight; | 2726 return availableHeight; |
2727 } | 2727 } |
2728 | 2728 |
2729 void LayoutBox::computeAndSetBlockDirectionMargins(const LayoutBlock* containing Block) | 2729 void LayoutBox::computeAndSetBlockDirectionMargins(const LayoutBlock* containing Block) |
2730 { | 2730 { |
2731 LayoutUnit marginBefore; | 2731 LayoutUnit marginBefore; |
2732 LayoutUnit marginAfter; | 2732 LayoutUnit marginAfter; |
2733 computeMarginsForDirection(BlockDirection, containingBlock, containingBlockL ogicalWidthForContent(), logicalHeight(), marginBefore, marginAfter, | 2733 computeMarginsForDirection(BlockDirection, containingBlock, containingBlockL ogicalWidthForContent(), logicalHeight(), marginBefore, marginAfter, |
2734 style()->marginBeforeUsing(containingBlock->style()), | 2734 style()->marginBeforeUsing(containingBlock->style()), |
2735 style()->marginAfterUsing(containingBlock->style())); | 2735 style()->marginAfterUsing(containingBlock->style())); |
(...skipping 1908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4644 computedValues.m_margins.m_end = marginEnd(); | 4644 computedValues.m_margins.m_end = marginEnd(); |
4645 | 4645 |
4646 setLogicalTop(oldLogicalTop); | 4646 setLogicalTop(oldLogicalTop); |
4647 setLogicalWidth(oldLogicalWidth); | 4647 setLogicalWidth(oldLogicalWidth); |
4648 setLogicalLeft(oldLogicalLeft); | 4648 setLogicalLeft(oldLogicalLeft); |
4649 setMarginLeft(oldMarginLeft); | 4649 setMarginLeft(oldMarginLeft); |
4650 setMarginRight(oldMarginRight); | 4650 setMarginRight(oldMarginRight); |
4651 } | 4651 } |
4652 | 4652 |
4653 } // namespace blink | 4653 } // namespace blink |
OLD | NEW |