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 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1759 | 1759 |
1760 RenderBlock* cb = containingBlock(); | 1760 RenderBlock* cb = containingBlock(); |
1761 if (cb->hasOverrideHeight()) | 1761 if (cb->hasOverrideHeight()) |
1762 return cb->overrideLogicalContentHeight(); | 1762 return cb->overrideLogicalContentHeight(); |
1763 | 1763 |
1764 RenderStyle* containingBlockStyle = cb->style(); | 1764 RenderStyle* containingBlockStyle = cb->style(); |
1765 Length logicalHeightLength = containingBlockStyle->logicalHeight(); | 1765 Length logicalHeightLength = containingBlockStyle->logicalHeight(); |
1766 | 1766 |
1767 // FIXME: For now just support fixed heights. Eventually should support per centage heights as well. | 1767 // FIXME: For now just support fixed heights. Eventually should support per centage heights as well. |
1768 if (!logicalHeightLength.isFixed()) { | 1768 if (!logicalHeightLength.isFixed()) { |
1769 LayoutUnit fillFallbackExtent = containingBlockStyle->isHorizontalWritin gMode() ? view()->frameView()->visibleHeight() : view()->frameView()->visibleWid th(); | 1769 LayoutUnit fillFallbackExtent = containingBlockStyle->isHorizontalWritin gMode() |
1770 ? view()->frameView()->unscaledVisibleContentSize().height() | |
1771 : view()->frameView()->unscaledVisibleContentSize().width(); | |
1770 LayoutUnit fillAvailableExtent = containingBlock()->availableLogicalHeig ht(ExcludeMarginBorderPadding); | 1772 LayoutUnit fillAvailableExtent = containingBlock()->availableLogicalHeig ht(ExcludeMarginBorderPadding); |
1771 return std::min(fillAvailableExtent, fillFallbackExtent); | 1773 return std::min(fillAvailableExtent, fillFallbackExtent); |
1772 } | 1774 } |
1773 | 1775 |
1774 // Use the content box logical height as specified by the style. | 1776 // Use the content box logical height as specified by the style. |
1775 return cb->adjustContentBoxLogicalHeightForBoxSizing(logicalHeightLength.val ue()); | 1777 return cb->adjustContentBoxLogicalHeightForBoxSizing(logicalHeightLength.val ue()); |
1776 } | 1778 } |
1777 | 1779 |
1778 void RenderBox::mapLocalToContainer(const RenderLayerModelObject* repaintContain er, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed, co nst PaintInvalidationState* paintInvalidationState) const | 1780 void RenderBox::mapLocalToContainer(const RenderLayerModelObject* repaintContain er, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed, co nst PaintInvalidationState* paintInvalidationState) const |
1779 { | 1781 { |
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2846 | 2848 |
2847 LayoutUnit RenderBox::availableLogicalHeight(AvailableLogicalHeightType heightTy pe) const | 2849 LayoutUnit RenderBox::availableLogicalHeight(AvailableLogicalHeightType heightTy pe) const |
2848 { | 2850 { |
2849 // http://www.w3.org/TR/CSS2/visudet.html#propdef-height - We are interested in the content height. | 2851 // http://www.w3.org/TR/CSS2/visudet.html#propdef-height - We are interested in the content height. |
2850 return constrainContentBoxLogicalHeightByMinMax(availableLogicalHeightUsing( style()->logicalHeight(), heightType), -1); | 2852 return constrainContentBoxLogicalHeightByMinMax(availableLogicalHeightUsing( style()->logicalHeight(), heightType), -1); |
2851 } | 2853 } |
2852 | 2854 |
2853 LayoutUnit RenderBox::availableLogicalHeightUsing(const Length& h, AvailableLogi calHeightType heightType) const | 2855 LayoutUnit RenderBox::availableLogicalHeightUsing(const Length& h, AvailableLogi calHeightType heightType) const |
2854 { | 2856 { |
2855 if (isRenderView()) | 2857 if (isRenderView()) |
2856 return isHorizontalWritingMode() ? toRenderView(this)->frameView()->visi bleHeight() : toRenderView(this)->frameView()->visibleWidth(); | 2858 return isHorizontalWritingMode() ? toRenderView(this)->frameView()->unsc aledVisibleContentSize().height() : toRenderView(this)->frameView()->unscaledVis ibleContentSize().width(); |
Julien - ping for review
2014/08/15 18:25:19
AFAICT those were the only 2 uses of visibleWidth
bokan
2014/08/15 22:50:42
visibleWidth/Height are actually declared in Scrol
| |
2857 | 2859 |
2858 // We need to stop here, since we don't want to increase the height of the t able | 2860 // We need to stop here, since we don't want to increase the height of the t able |
2859 // artificially. We're going to rely on this cell getting expanded to some new | 2861 // artificially. We're going to rely on this cell getting expanded to some new |
2860 // height, and then when we lay out again we'll use the calculation below. | 2862 // height, and then when we lay out again we'll use the calculation below. |
2861 if (isTableCell() && (h.isAuto() || h.isPercent())) { | 2863 if (isTableCell() && (h.isAuto() || h.isPercent())) { |
2862 if (hasOverrideHeight()) | 2864 if (hasOverrideHeight()) |
2863 return overrideLogicalContentHeight(); | 2865 return overrideLogicalContentHeight(); |
2864 return logicalHeight() - borderAndPaddingLogicalHeight(); | 2866 return logicalHeight() - borderAndPaddingLogicalHeight(); |
2865 } | 2867 } |
2866 | 2868 |
(...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4699 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 4701 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
4700 { | 4702 { |
4701 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); | 4703 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); |
4702 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 4704 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
4703 ASSERT(hasBackground == style.hasBackground()); | 4705 ASSERT(hasBackground == style.hasBackground()); |
4704 hasBorder = style.hasBorder(); | 4706 hasBorder = style.hasBorder(); |
4705 hasAppearance = style.hasAppearance(); | 4707 hasAppearance = style.hasAppearance(); |
4706 } | 4708 } |
4707 | 4709 |
4708 } // namespace blink | 4710 } // namespace blink |
OLD | NEW |