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 2766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2777 // containing block's block-flow. | 2777 // containing block's block-flow. |
2778 // https://bugs.webkit.org/show_bug.cgi?id=46496 | 2778 // https://bugs.webkit.org/show_bug.cgi?id=46496 |
2779 const LayoutUnit cw = isOutOfFlowPositioned() ? containingBlockLogic
alWidthForPositioned(toRenderBoxModelObject(container())) : containingBlockLogic
alWidthForContent(); | 2779 const LayoutUnit cw = isOutOfFlowPositioned() ? containingBlockLogic
alWidthForPositioned(toRenderBoxModelObject(container())) : containingBlockLogic
alWidthForContent(); |
2780 Length containerLogicalWidth = containingBlock()->style()->logicalWi
dth(); | 2780 Length containerLogicalWidth = containingBlock()->style()->logicalWi
dth(); |
2781 // FIXME: Handle cases when containing block width is calculated or
viewport percent. | 2781 // FIXME: Handle cases when containing block width is calculated or
viewport percent. |
2782 // https://bugs.webkit.org/show_bug.cgi?id=91071 | 2782 // https://bugs.webkit.org/show_bug.cgi?id=91071 |
2783 if (logicalWidth.isIntrinsic()) | 2783 if (logicalWidth.isIntrinsic()) |
2784 return computeIntrinsicLogicalWidthUsing(logicalWidth, cw, borde
rAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth(); | 2784 return computeIntrinsicLogicalWidthUsing(logicalWidth, cw, borde
rAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth(); |
2785 if (cw > 0 || (!cw && (containerLogicalWidth.isFixed() || containerL
ogicalWidth.isPercent()))) | 2785 if (cw > 0 || (!cw && (containerLogicalWidth.isFixed() || containerL
ogicalWidth.isPercent()))) |
2786 return adjustContentBoxLogicalWidthForBoxSizing(minimumValueForL
ength(logicalWidth, cw)); | 2786 return adjustContentBoxLogicalWidthForBoxSizing(minimumValueForL
ength(logicalWidth, cw)); |
| 2787 return 0; |
2787 } | 2788 } |
2788 // fall through | |
2789 case Intrinsic: | 2789 case Intrinsic: |
2790 case MinIntrinsic: | 2790 case MinIntrinsic: |
2791 case Auto: | 2791 case Auto: |
2792 case Undefined: | 2792 case Undefined: |
2793 return intrinsicLogicalWidth(); | 2793 return intrinsicLogicalWidth(); |
2794 case ExtendToZoom: | 2794 case ExtendToZoom: |
2795 case DeviceWidth: | 2795 case DeviceWidth: |
2796 case DeviceHeight: | 2796 case DeviceHeight: |
2797 break; | 2797 break; |
2798 } | 2798 } |
(...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4662 return 0; | 4662 return 0; |
4663 | 4663 |
4664 if (!layoutState && !flowThreadContainingBlock()) | 4664 if (!layoutState && !flowThreadContainingBlock()) |
4665 return 0; | 4665 return 0; |
4666 | 4666 |
4667 RenderBlock* containerBlock = containingBlock(); | 4667 RenderBlock* containerBlock = containingBlock(); |
4668 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4668 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
4669 } | 4669 } |
4670 | 4670 |
4671 } // namespace WebCore | 4671 } // namespace WebCore |
OLD | NEW |