| 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 2734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2745 LayoutUnit availableLogicalWidth = 0; | 2745 LayoutUnit availableLogicalWidth = 0; |
| 2746 return computeIntrinsicLogicalWidthUsing(logicalWidth, availableLogi
calWidth, borderAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth(); | 2746 return computeIntrinsicLogicalWidthUsing(logicalWidth, availableLogi
calWidth, borderAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth(); |
| 2747 } | 2747 } |
| 2748 case ViewportPercentageWidth: | 2748 case ViewportPercentageWidth: |
| 2749 case ViewportPercentageHeight: | 2749 case ViewportPercentageHeight: |
| 2750 case ViewportPercentageMin: | 2750 case ViewportPercentageMin: |
| 2751 case ViewportPercentageMax: | 2751 case ViewportPercentageMax: |
| 2752 return adjustContentBoxLogicalWidthForBoxSizing(valueForLength(logic
alWidth, 0, view())); | 2752 return adjustContentBoxLogicalWidthForBoxSizing(valueForLength(logic
alWidth, 0, view())); |
| 2753 case FitContent: | 2753 case FitContent: |
| 2754 case FillAvailable: | 2754 case FillAvailable: |
| 2755 case Percent: | 2755 case Percent: |
| 2756 case Calculated: { | 2756 case Calculated: { |
| 2757 // FIXME: containingBlockLogicalWidthForContent() is wrong if the re
placed element's block-flow is perpendicular to the | 2757 // FIXME: containingBlockLogicalWidthForContent() is wrong if the re
placed element's block-flow is perpendicular to the |
| 2758 // containing block's block-flow. | 2758 // containing block's block-flow. |
| 2759 // https://bugs.webkit.org/show_bug.cgi?id=46496 | 2759 // https://bugs.webkit.org/show_bug.cgi?id=46496 |
| 2760 const LayoutUnit cw = isOutOfFlowPositioned() ? containingBlockLogic
alWidthForPositioned(toRenderBoxModelObject(container())) : containingBlockLogic
alWidthForContent(); | 2760 const LayoutUnit cw = isOutOfFlowPositioned() ? containingBlockLogic
alWidthForPositioned(toRenderBoxModelObject(container())) : containingBlockLogic
alWidthForContent(); |
| 2761 Length containerLogicalWidth = containingBlock()->style()->logicalWi
dth(); | 2761 Length containerLogicalWidth = containingBlock()->style()->logicalWi
dth(); |
| 2762 // FIXME: Handle cases when containing block width is calculated or
viewport percent. | 2762 // FIXME: Handle cases when containing block width is calculated or
viewport percent. |
| 2763 // https://bugs.webkit.org/show_bug.cgi?id=91071 | 2763 // https://bugs.webkit.org/show_bug.cgi?id=91071 |
| 2764 if (logicalWidth.isIntrinsic()) | 2764 if (logicalWidth.isIntrinsic()) |
| 2765 return computeIntrinsicLogicalWidthUsing(logicalWidth, cw, borde
rAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth(); | 2765 return computeIntrinsicLogicalWidthUsing(logicalWidth, cw, borde
rAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth(); |
| 2766 if (cw > 0 || (!cw && (containerLogicalWidth.isFixed() || containerL
ogicalWidth.isPercent()))) | 2766 if (cw > 0 || (!cw && (containerLogicalWidth.isFixed() || containerL
ogicalWidth.isPercent()))) |
| 2767 return adjustContentBoxLogicalWidthForBoxSizing(minimumValueForL
ength(logicalWidth, cw)); | 2767 return adjustContentBoxLogicalWidthForBoxSizing(minimumValueForL
ength(logicalWidth, cw)); |
| 2768 } | 2768 } |
| 2769 // fall through | 2769 // fall through |
| 2770 case Intrinsic: | 2770 case Intrinsic: |
| 2771 case MinIntrinsic: | 2771 case MinIntrinsic: |
| 2772 case Auto: | 2772 case Auto: |
| 2773 case Relative: | 2773 case Relative: |
| 2774 case ExtendToZoom: |
| 2774 case Undefined: | 2775 case Undefined: |
| 2775 return intrinsicLogicalWidth(); | 2776 return intrinsicLogicalWidth(); |
| 2776 } | 2777 } |
| 2777 | 2778 |
| 2778 ASSERT_NOT_REACHED(); | 2779 ASSERT_NOT_REACHED(); |
| 2779 return 0; | 2780 return 0; |
| 2780 } | 2781 } |
| 2781 | 2782 |
| 2782 LayoutUnit RenderBox::computeReplacedLogicalHeight() const | 2783 LayoutUnit RenderBox::computeReplacedLogicalHeight() const |
| 2783 { | 2784 { |
| (...skipping 1868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4652 | 4653 |
| 4653 void RenderBox::reportStaticMembersMemoryUsage(MemoryInstrumentation* memoryInst
rumentation) | 4654 void RenderBox::reportStaticMembersMemoryUsage(MemoryInstrumentation* memoryInst
rumentation) |
| 4654 { | 4655 { |
| 4655 memoryInstrumentation->addRootObject(gOverrideHeightMap, WebCoreMemoryTypes:
:RenderingStructures); | 4656 memoryInstrumentation->addRootObject(gOverrideHeightMap, WebCoreMemoryTypes:
:RenderingStructures); |
| 4656 memoryInstrumentation->addRootObject(gOverrideWidthMap, WebCoreMemoryTypes::
RenderingStructures); | 4657 memoryInstrumentation->addRootObject(gOverrideWidthMap, WebCoreMemoryTypes::
RenderingStructures); |
| 4657 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalHeightMa
p, WebCoreMemoryTypes::RenderingStructures); | 4658 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalHeightMa
p, WebCoreMemoryTypes::RenderingStructures); |
| 4658 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalWidthMap
, WebCoreMemoryTypes::RenderingStructures); | 4659 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalWidthMap
, WebCoreMemoryTypes::RenderingStructures); |
| 4659 } | 4660 } |
| 4660 | 4661 |
| 4661 } // namespace WebCore | 4662 } // namespace WebCore |
| OLD | NEW |