| 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 2726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2737 LayoutUnit availableLogicalWidth = 0; | 2737 LayoutUnit availableLogicalWidth = 0; |
| 2738 return computeIntrinsicLogicalWidthUsing(logicalWidth, availableLogi
calWidth, borderAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth(); | 2738 return computeIntrinsicLogicalWidthUsing(logicalWidth, availableLogi
calWidth, borderAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth(); |
| 2739 } | 2739 } |
| 2740 case ViewportPercentageWidth: | 2740 case ViewportPercentageWidth: |
| 2741 case ViewportPercentageHeight: | 2741 case ViewportPercentageHeight: |
| 2742 case ViewportPercentageMin: | 2742 case ViewportPercentageMin: |
| 2743 case ViewportPercentageMax: | 2743 case ViewportPercentageMax: |
| 2744 return adjustContentBoxLogicalWidthForBoxSizing(valueForLength(logic
alWidth, 0, view())); | 2744 return adjustContentBoxLogicalWidthForBoxSizing(valueForLength(logic
alWidth, 0, view())); |
| 2745 case FitContent: | 2745 case FitContent: |
| 2746 case FillAvailable: | 2746 case FillAvailable: |
| 2747 case Percent: | 2747 case Percent: |
| 2748 case Calculated: { | 2748 case Calculated: { |
| 2749 // FIXME: containingBlockLogicalWidthForContent() is wrong if the re
placed element's block-flow is perpendicular to the | 2749 // FIXME: containingBlockLogicalWidthForContent() is wrong if the re
placed element's block-flow is perpendicular to the |
| 2750 // containing block's block-flow. | 2750 // containing block's block-flow. |
| 2751 // https://bugs.webkit.org/show_bug.cgi?id=46496 | 2751 // https://bugs.webkit.org/show_bug.cgi?id=46496 |
| 2752 const LayoutUnit cw = isOutOfFlowPositioned() ? containingBlockLogic
alWidthForPositioned(toRenderBoxModelObject(container())) : containingBlockLogic
alWidthForContent(); | 2752 const LayoutUnit cw = isOutOfFlowPositioned() ? containingBlockLogic
alWidthForPositioned(toRenderBoxModelObject(container())) : containingBlockLogic
alWidthForContent(); |
| 2753 Length containerLogicalWidth = containingBlock()->style()->logicalWi
dth(); | 2753 Length containerLogicalWidth = containingBlock()->style()->logicalWi
dth(); |
| 2754 // FIXME: Handle cases when containing block width is calculated or
viewport percent. | 2754 // FIXME: Handle cases when containing block width is calculated or
viewport percent. |
| 2755 // https://bugs.webkit.org/show_bug.cgi?id=91071 | 2755 // https://bugs.webkit.org/show_bug.cgi?id=91071 |
| 2756 if (logicalWidth.isIntrinsic()) | 2756 if (logicalWidth.isIntrinsic()) |
| 2757 return computeIntrinsicLogicalWidthUsing(logicalWidth, cw, borde
rAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth(); | 2757 return computeIntrinsicLogicalWidthUsing(logicalWidth, cw, borde
rAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth(); |
| 2758 if (cw > 0 || (!cw && (containerLogicalWidth.isFixed() || containerL
ogicalWidth.isPercent()))) | 2758 if (cw > 0 || (!cw && (containerLogicalWidth.isFixed() || containerL
ogicalWidth.isPercent()))) |
| 2759 return adjustContentBoxLogicalWidthForBoxSizing(minimumValueForL
ength(logicalWidth, cw)); | 2759 return adjustContentBoxLogicalWidthForBoxSizing(minimumValueForL
ength(logicalWidth, cw)); |
| 2760 } | 2760 } |
| 2761 // fall through | 2761 // fall through |
| 2762 case Intrinsic: | 2762 case Intrinsic: |
| 2763 case MinIntrinsic: | 2763 case MinIntrinsic: |
| 2764 case Auto: | 2764 case Auto: |
| 2765 case Relative: | 2765 case Relative: |
| 2766 case ExtendToZoom: |
| 2766 case Undefined: | 2767 case Undefined: |
| 2767 return intrinsicLogicalWidth(); | 2768 return intrinsicLogicalWidth(); |
| 2768 } | 2769 } |
| 2769 | 2770 |
| 2770 ASSERT_NOT_REACHED(); | 2771 ASSERT_NOT_REACHED(); |
| 2771 return 0; | 2772 return 0; |
| 2772 } | 2773 } |
| 2773 | 2774 |
| 2774 LayoutUnit RenderBox::computeReplacedLogicalHeight() const | 2775 LayoutUnit RenderBox::computeReplacedLogicalHeight() const |
| 2775 { | 2776 { |
| (...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4628 } | 4629 } |
| 4629 | 4630 |
| 4630 if (didSplitParentAnonymousBoxes) | 4631 if (didSplitParentAnonymousBoxes) |
| 4631 markBoxForRelayoutAfterSplit(this); | 4632 markBoxForRelayoutAfterSplit(this); |
| 4632 | 4633 |
| 4633 ASSERT(beforeChild->parent() == this); | 4634 ASSERT(beforeChild->parent() == this); |
| 4634 return beforeChild; | 4635 return beforeChild; |
| 4635 } | 4636 } |
| 4636 | 4637 |
| 4637 } // namespace WebCore | 4638 } // namespace WebCore |
| OLD | NEW |