Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: sky/engine/core/rendering/RenderBox.cpp

Issue 684383002: Delete a ton more dead vertical writing mode code. (Closed) Base URL: git@github.com:domokit/mojo.git@writingmode1
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 rect.move(layer()->offsetForInFlowPosition()); 1685 rect.move(layer()->offsetForInFlowPosition());
1686 1686
1687 rect.moveBy(location()); 1687 rect.moveBy(location());
1688 rect.move(paintInvalidationState->paintOffset()); 1688 rect.move(paintInvalidationState->paintOffset());
1689 if (paintInvalidationState->isClipped()) 1689 if (paintInvalidationState->isClipped())
1690 rect.intersect(paintInvalidationState->clipRect()); 1690 rect.intersect(paintInvalidationState->clipRect());
1691 return; 1691 return;
1692 } 1692 }
1693 1693
1694 if (paintInvalidationContainer == this) { 1694 if (paintInvalidationContainer == this) {
1695 if (paintInvalidationContainer->style()->isFlippedBlocksWritingMode())
1696 flipForWritingMode(rect);
1697 return; 1695 return;
1698 } 1696 }
1699 1697
1700 bool containerSkipped; 1698 bool containerSkipped;
1701 RenderObject* o = container(paintInvalidationContainer, &containerSkipped); 1699 RenderObject* o = container(paintInvalidationContainer, &containerSkipped);
1702 if (!o) 1700 if (!o)
1703 return; 1701 return;
1704 1702
1705 if (isWritingModeRoot()) 1703 if (isWritingModeRoot())
1706 flipForWritingMode(rect); 1704 flipForWritingMode(rect);
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
2152 cb = cb->containingBlock(); 2150 cb = cb->containingBlock();
2153 } 2151 }
2154 cb->addPercentHeightDescendant(const_cast<RenderBox*>(this)); 2152 cb->addPercentHeightDescendant(const_cast<RenderBox*>(this));
2155 2153
2156 RenderStyle* cbstyle = cb->style(); 2154 RenderStyle* cbstyle = cb->style();
2157 2155
2158 // A positioned element that specified both top/bottom or that specifies hei ght should be treated as though it has a height 2156 // A positioned element that specified both top/bottom or that specifies hei ght should be treated as though it has a height
2159 // explicitly specified that can be used for any percentage computations. 2157 // explicitly specified that can be used for any percentage computations.
2160 bool isOutOfFlowPositionedWithSpecifiedHeight = cb->isOutOfFlowPositioned() && (!cbstyle->logicalHeight().isAuto() || (!cbstyle->logicalTop().isAuto() && !c bstyle->logicalBottom().isAuto())); 2158 bool isOutOfFlowPositionedWithSpecifiedHeight = cb->isOutOfFlowPositioned() && (!cbstyle->logicalHeight().isAuto() || (!cbstyle->logicalTop().isAuto() && !c bstyle->logicalBottom().isAuto()));
2161 2159
2162 if (isHorizontalWritingMode() != cb->isHorizontalWritingMode()) 2160 if (hasOverrideContainingBlockLogicalHeight())
2163 availableHeight = containingBlockChild->containingBlockLogicalWidthForCo ntent();
2164 else if (hasOverrideContainingBlockLogicalHeight())
2165 availableHeight = overrideContainingBlockContentLogicalHeight(); 2161 availableHeight = overrideContainingBlockContentLogicalHeight();
2166 else if (cbstyle->logicalHeight().isFixed()) { 2162 else if (cbstyle->logicalHeight().isFixed()) {
2167 LayoutUnit contentBoxHeight = cb->adjustContentBoxLogicalHeightForBoxSiz ing(cbstyle->logicalHeight().value()); 2163 LayoutUnit contentBoxHeight = cb->adjustContentBoxLogicalHeightForBoxSiz ing(cbstyle->logicalHeight().value());
2168 availableHeight = std::max<LayoutUnit>(0, cb->constrainContentBoxLogical HeightByMinMax(contentBoxHeight - cb->scrollbarLogicalHeight(), -1)); 2164 availableHeight = std::max<LayoutUnit>(0, cb->constrainContentBoxLogical HeightByMinMax(contentBoxHeight - cb->scrollbarLogicalHeight(), -1));
2169 } else if (cbstyle->logicalHeight().isPercent() && !isOutOfFlowPositionedWit hSpecifiedHeight) { 2165 } else if (cbstyle->logicalHeight().isPercent() && !isOutOfFlowPositionedWit hSpecifiedHeight) {
2170 // We need to recur and compute the percentage height for our containing block. 2166 // We need to recur and compute the percentage height for our containing block.
2171 LayoutUnit heightWithScrollbar = cb->computePercentageLogicalHeight(cbst yle->logicalHeight()); 2167 LayoutUnit heightWithScrollbar = cb->computePercentageLogicalHeight(cbst yle->logicalHeight());
2172 if (heightWithScrollbar != -1) { 2168 if (heightWithScrollbar != -1) {
2173 LayoutUnit contentBoxHeightWithScrollbar = cb->adjustContentBoxLogic alHeightForBoxSizing(heightWithScrollbar); 2169 LayoutUnit contentBoxHeightWithScrollbar = cb->adjustContentBoxLogic alHeightForBoxSizing(heightWithScrollbar);
2174 // We need to adjust for min/max height because this method does not 2170 // We need to adjust for min/max height because this method does not
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
2608 computedValues.m_margins.m_start = minValues.m_margins.m_start; 2604 computedValues.m_margins.m_start = minValues.m_margins.m_start;
2609 computedValues.m_margins.m_end = minValues.m_margins.m_end; 2605 computedValues.m_margins.m_end = minValues.m_margins.m_end;
2610 } 2606 }
2611 } 2607 }
2612 2608
2613 computedValues.m_extent += bordersPlusPadding; 2609 computedValues.m_extent += bordersPlusPadding;
2614 } 2610 }
2615 2611
2616 static void computeLogicalLeftPositionedOffset(LayoutUnit& logicalLeftPos, const RenderBox* child, LayoutUnit logicalWidthValue, const RenderBoxModelObject* con tainerBlock, LayoutUnit containerLogicalWidth) 2612 static void computeLogicalLeftPositionedOffset(LayoutUnit& logicalLeftPos, const RenderBox* child, LayoutUnit logicalWidthValue, const RenderBoxModelObject* con tainerBlock, LayoutUnit containerLogicalWidth)
2617 { 2613 {
2618 // Deal with differing writing modes here. Our offset needs to be in the co ntaining block's coordinate space. If the containing block is flipped 2614 // FIXME(sky): Remove
2619 // along this axis, then we need to flip the coordinate. This can only happ en if the containing block is both a flipped mode and perpendicular to us. 2615 logicalLeftPos += containerBlock->borderLeft();
2620 if (containerBlock->isHorizontalWritingMode() != child->isHorizontalWritingM ode() && containerBlock->style()->isFlippedBlocksWritingMode()) {
2621 logicalLeftPos = containerLogicalWidth - logicalWidthValue - logicalLeft Pos;
2622 logicalLeftPos += containerBlock->borderRight();
2623 } else {
2624 logicalLeftPos += containerBlock->borderLeft();
2625 }
2626 } 2616 }
2627 2617
2628 void RenderBox::shrinkToFitWidth(const LayoutUnit availableSpace, const LayoutUn it logicalLeftValue, const LayoutUnit bordersPlusPadding, LogicalExtentComputedV alues& computedValues) const 2618 void RenderBox::shrinkToFitWidth(const LayoutUnit availableSpace, const LayoutUn it logicalLeftValue, const LayoutUnit bordersPlusPadding, LogicalExtentComputedV alues& computedValues) const
2629 { 2619 {
2630 // FIXME: would it be better to have shrink-to-fit in one step? 2620 // FIXME: would it be better to have shrink-to-fit in one step?
2631 LayoutUnit preferredWidth = maxPreferredLogicalWidth() - bordersPlusPadding; 2621 LayoutUnit preferredWidth = maxPreferredLogicalWidth() - bordersPlusPadding;
2632 LayoutUnit preferredMinWidth = minPreferredLogicalWidth() - bordersPlusPaddi ng; 2622 LayoutUnit preferredMinWidth = minPreferredLogicalWidth() - bordersPlusPaddi ng;
2633 LayoutUnit availableWidth = availableSpace - logicalLeftValue; 2623 LayoutUnit availableWidth = availableSpace - logicalLeftValue;
2634 computedValues.m_extent = std::min(std::max(preferredMinWidth, availableWidt h), preferredWidth); 2624 computedValues.m_extent = std::min(std::max(preferredMinWidth, availableWidt h), preferredWidth);
2635 } 2625 }
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
2916 computedValues.m_margins.m_after = minValues.m_margins.m_after; 2906 computedValues.m_margins.m_after = minValues.m_margins.m_after;
2917 } 2907 }
2918 } 2908 }
2919 2909
2920 // Set final height value. 2910 // Set final height value.
2921 computedValues.m_extent += bordersPlusPadding; 2911 computedValues.m_extent += bordersPlusPadding;
2922 } 2912 }
2923 2913
2924 static void computeLogicalTopPositionedOffset(LayoutUnit& logicalTopPos, const R enderBox* child, LayoutUnit logicalHeightValue, const RenderBoxModelObject* cont ainerBlock, LayoutUnit containerLogicalHeight) 2914 static void computeLogicalTopPositionedOffset(LayoutUnit& logicalTopPos, const R enderBox* child, LayoutUnit logicalHeightValue, const RenderBoxModelObject* cont ainerBlock, LayoutUnit containerLogicalHeight)
2925 { 2915 {
2926 // Deal with differing writing modes here. Our offset needs to be in the co ntaining block's coordinate space. If the containing block is flipped 2916 // FIXME(sky): Remove
2927 // along this axis, then we need to flip the coordinate. This can only happ en if the containing block is both a flipped mode and perpendicular to us. 2917 logicalTopPos += containerBlock->borderTop();
2928 if ((child->style()->isFlippedBlocksWritingMode() && child->isHorizontalWrit ingMode() != containerBlock->isHorizontalWritingMode())
2929 || (child->style()->isFlippedBlocksWritingMode() != containerBlock->styl e()->isFlippedBlocksWritingMode() && child->isHorizontalWritingMode() == contain erBlock->isHorizontalWritingMode()))
2930 logicalTopPos = containerLogicalHeight - logicalHeightValue - logicalTop Pos;
2931
2932 // Our offset is from the logical bottom edge in a flipped environment, e.g. , right for vertical-rl and bottom for horizontal-bt.
2933 if (containerBlock->style()->isFlippedBlocksWritingMode() && child->isHorizo ntalWritingMode() == containerBlock->isHorizontalWritingMode()) {
2934 if (child->isHorizontalWritingMode())
2935 logicalTopPos += containerBlock->borderBottom();
2936 else
2937 logicalTopPos += containerBlock->borderRight();
2938 } else {
2939 if (child->isHorizontalWritingMode())
2940 logicalTopPos += containerBlock->borderTop();
2941 else
2942 logicalTopPos += containerBlock->borderLeft();
2943 }
2944 } 2918 }
2945 2919
2946 void RenderBox::computePositionedLogicalHeightUsing(Length logicalHeightLength, const RenderBoxModelObject* containerBlock, 2920 void RenderBox::computePositionedLogicalHeightUsing(Length logicalHeightLength, const RenderBoxModelObject* containerBlock,
2947 LayoutUnit containerLogicalH eight, LayoutUnit bordersPlusPadding, LayoutUnit logicalHeight, 2921 LayoutUnit containerLogicalH eight, LayoutUnit bordersPlusPadding, LayoutUnit logicalHeight,
2948 const Length& logicalTop, co nst Length& logicalBottom, const Length& marginBefore, 2922 const Length& logicalTop, co nst Length& logicalBottom, const Length& marginBefore,
2949 const Length& marginAfter, L ogicalExtentComputedValues& computedValues) const 2923 const Length& marginAfter, L ogicalExtentComputedValues& computedValues) const
2950 { 2924 {
2951 // 'top' and 'bottom' cannot both be 'auto' because 'top would of been 2925 // 'top' and 'bottom' cannot both be 'auto' because 'top would of been
2952 // converted to the static position in computePositionedLogicalHeight() 2926 // converted to the static position in computePositionedLogicalHeight()
2953 ASSERT(!(logicalTop.isAuto() && logicalBottom.isAuto())); 2927 ASSERT(!(logicalTop.isAuto() && logicalBottom.isAuto()));
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
3080 const RenderBoxModelObject* containerBlock = toRenderBoxModelObject(containe r()); 3054 const RenderBoxModelObject* containerBlock = toRenderBoxModelObject(containe r());
3081 3055
3082 const LayoutUnit containerLogicalWidth = containingBlockLogicalWidthForPosit ioned(containerBlock); 3056 const LayoutUnit containerLogicalWidth = containingBlockLogicalWidthForPosit ioned(containerBlock);
3083 const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidth ForPositioned(containerBlock); 3057 const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidth ForPositioned(containerBlock);
3084 3058
3085 // To match WinIE, in quirks mode use the parent's 'direction' property 3059 // To match WinIE, in quirks mode use the parent's 'direction' property
3086 // instead of the the container block's. 3060 // instead of the the container block's.
3087 TextDirection containerDirection = containerBlock->style()->direction(); 3061 TextDirection containerDirection = containerBlock->style()->direction();
3088 3062
3089 // Variables to solve. 3063 // Variables to solve.
3090 bool isHorizontal = isHorizontalWritingMode();
3091 Length logicalLeft = style()->logicalLeft(); 3064 Length logicalLeft = style()->logicalLeft();
3092 Length logicalRight = style()->logicalRight(); 3065 Length logicalRight = style()->logicalRight();
3093 Length marginLogicalLeft = isHorizontal ? style()->marginLeft() : style()->m arginTop(); 3066 Length marginLogicalLeft = style()->marginLeft();
3094 Length marginLogicalRight = isHorizontal ? style()->marginRight() : style()- >marginBottom(); 3067 Length marginLogicalRight = style()->marginRight();
3095 LayoutUnit& marginLogicalLeftAlias = style()->isLeftToRightDirection() ? com putedValues.m_margins.m_start : computedValues.m_margins.m_end; 3068 LayoutUnit& marginLogicalLeftAlias = style()->isLeftToRightDirection() ? com putedValues.m_margins.m_start : computedValues.m_margins.m_end;
3096 LayoutUnit& marginLogicalRightAlias = style()->isLeftToRightDirection() ? co mputedValues.m_margins.m_end : computedValues.m_margins.m_start; 3069 LayoutUnit& marginLogicalRightAlias = style()->isLeftToRightDirection() ? co mputedValues.m_margins.m_end : computedValues.m_margins.m_start;
3097 3070
3098 /*-----------------------------------------------------------------------*\ 3071 /*-----------------------------------------------------------------------*\
3099 * 1. The used value of 'width' is determined as for inline replaced 3072 * 1. The used value of 'width' is determined as for inline replaced
3100 * elements. 3073 * elements.
3101 \*-----------------------------------------------------------------------*/ 3074 \*-----------------------------------------------------------------------*/
3102 // NOTE: This value of width is final in that the min/max width calculations 3075 // NOTE: This value of width is final in that the min/max width calculations
3103 // are dealt with in computeReplacedWidth(). This means that the steps to p roduce 3076 // are dealt with in computeReplacedWidth(). This means that the steps to p roduce
3104 // correct max/min in the non-replaced version, are not necessary. 3077 // correct max/min in the non-replaced version, are not necessary.
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
3404 rect.moveBy(-location()); 3377 rect.moveBy(-location());
3405 3378
3406 // FIXME: Border/padding should be added for all elements but this workaroun d 3379 // FIXME: Border/padding should be added for all elements but this workaroun d
3407 // is needed because we use offsets inside an "atomic" element to represent 3380 // is needed because we use offsets inside an "atomic" element to represent
3408 // positions before and after the element in deprecated editing offsets. 3381 // positions before and after the element in deprecated editing offsets.
3409 if (node() && !(editingIgnoresContent(node()) || isRenderedTableElement(node ()))) { 3382 if (node() && !(editingIgnoresContent(node()) || isRenderedTableElement(node ()))) {
3410 rect.setX(rect.x() + borderLeft() + paddingLeft()); 3383 rect.setX(rect.x() + borderLeft() + paddingLeft());
3411 rect.setY(rect.y() + paddingTop() + borderTop()); 3384 rect.setY(rect.y() + paddingTop() + borderTop());
3412 } 3385 }
3413 3386
3414 if (!isHorizontalWritingMode())
3415 return rect.transposedRect();
3416
3417 return rect; 3387 return rect;
3418 } 3388 }
3419 3389
3420 PositionWithAffinity RenderBox::positionForPoint(const LayoutPoint& point) 3390 PositionWithAffinity RenderBox::positionForPoint(const LayoutPoint& point)
3421 { 3391 {
3422 // no children...return this render object's element, if there is one, and o ffset 0 3392 // no children...return this render object's element, if there is one, and o ffset 0
3423 RenderObject* firstChild = slowFirstChild(); 3393 RenderObject* firstChild = slowFirstChild();
3424 if (!firstChild) 3394 if (!firstChild)
3425 return createPositionWithAffinity(nonPseudoNode() ? firstPositionInOrBef oreNode(nonPseudoNode()) : Position()); 3395 return createPositionWithAffinity(nonPseudoNode() ? firstPositionInOrBef oreNode(nonPseudoNode()) : Position());
3426 3396
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
3680 LayoutRect clientBox = noOverflowRect(); 3650 LayoutRect clientBox = noOverflowRect();
3681 if (clientBox.contains(rect) || rect.isEmpty()) 3651 if (clientBox.contains(rect) || rect.isEmpty())
3682 return; 3652 return;
3683 3653
3684 // For overflow clip objects, we don't want to propagate overflow into unrea chable areas. 3654 // For overflow clip objects, we don't want to propagate overflow into unrea chable areas.
3685 LayoutRect overflowRect(rect); 3655 LayoutRect overflowRect(rect);
3686 if (hasOverflowClip() || isRenderView()) { 3656 if (hasOverflowClip() || isRenderView()) {
3687 // Overflow is in the block's coordinate space and thus is flipped for h orizontal-bt and vertical-rl 3657 // Overflow is in the block's coordinate space and thus is flipped for h orizontal-bt and vertical-rl
3688 // writing modes. At this stage that is actually a simplification, sinc e we can treat horizontal-tb/bt as the same 3658 // writing modes. At this stage that is actually a simplification, sinc e we can treat horizontal-tb/bt as the same
3689 // and vertical-lr/rl as the same. 3659 // and vertical-lr/rl as the same.
3690 bool hasTopOverflow = !style()->isLeftToRightDirection() && !isHorizonta lWritingMode(); 3660 bool hasTopOverflow = false;
3691 bool hasLeftOverflow = !style()->isLeftToRightDirection() && isHorizonta lWritingMode(); 3661 bool hasLeftOverflow = !style()->isLeftToRightDirection();
3692 if (isFlexibleBox() && style()->isReverseFlexDirection()) { 3662 if (isFlexibleBox() && style()->isReverseFlexDirection()) {
3693 RenderFlexibleBox* flexibleBox = toRenderFlexibleBox(this); 3663 RenderFlexibleBox* flexibleBox = toRenderFlexibleBox(this);
3694 if (flexibleBox->isHorizontalFlow()) 3664 if (flexibleBox->isHorizontalFlow())
3695 hasLeftOverflow = true; 3665 hasLeftOverflow = true;
3696 else 3666 else
3697 hasTopOverflow = true; 3667 hasTopOverflow = true;
3698 } 3668 }
3699 3669
3700 if (!hasTopOverflow) 3670 if (!hasTopOverflow)
3701 overflowRect.shiftYEdgeTo(std::max(overflowRect.y(), clientBox.y())) ; 3671 overflowRect.shiftYEdgeTo(std::max(overflowRect.y(), clientBox.y())) ;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
3819 RenderLayer* layer = curr->hasLayer() && curr->isBox() ? toRenderBox(cur r)->layer() : 0; 3789 RenderLayer* layer = curr->hasLayer() && curr->isBox() ? toRenderBox(cur r)->layer() : 0;
3820 if (layer && layer->isSelfPaintingLayer()) 3790 if (layer && layer->isSelfPaintingLayer())
3821 return layer; 3791 return layer;
3822 curr = curr->parent(); 3792 curr = curr->parent();
3823 } 3793 }
3824 return 0; 3794 return 0;
3825 } 3795 }
3826 3796
3827 LayoutRect RenderBox::logicalVisualOverflowRectForPropagation(RenderStyle* paren tStyle) const 3797 LayoutRect RenderBox::logicalVisualOverflowRectForPropagation(RenderStyle* paren tStyle) const
3828 { 3798 {
3829 LayoutRect rect = visualOverflowRectForPropagation(parentStyle); 3799 // FIXME(sky): Remove
3830 if (!parentStyle->isHorizontalWritingMode()) 3800 return visualOverflowRectForPropagation(parentStyle);
3831 return rect.transposedRect();
3832 return rect;
3833 } 3801 }
3834 3802
3835 LayoutRect RenderBox::visualOverflowRectForPropagation(RenderStyle* parentStyle) const 3803 LayoutRect RenderBox::visualOverflowRectForPropagation(RenderStyle* parentStyle) const
3836 { 3804 {
3837 // FIXME(sky): Remove 3805 // FIXME(sky): Remove
3838 return visualOverflowRect(); 3806 return visualOverflowRect();
3839 } 3807 }
3840 3808
3841 LayoutRect RenderBox::logicalLayoutOverflowRectForPropagation(RenderStyle* paren tStyle) const 3809 LayoutRect RenderBox::logicalLayoutOverflowRectForPropagation(RenderStyle* paren tStyle) const
3842 { 3810 {
3843 LayoutRect rect = layoutOverflowRectForPropagation(parentStyle); 3811 // FIXME(sky): Remove
3844 if (!parentStyle->isHorizontalWritingMode()) 3812 return layoutOverflowRectForPropagation(parentStyle);
3845 return rect.transposedRect();
3846 return rect;
3847 } 3813 }
3848 3814
3849 LayoutRect RenderBox::layoutOverflowRectForPropagation(RenderStyle* parentStyle) const 3815 LayoutRect RenderBox::layoutOverflowRectForPropagation(RenderStyle* parentStyle) const
3850 { 3816 {
3851 // Only propagate interior layout overflow if we don't clip it. 3817 // Only propagate interior layout overflow if we don't clip it.
3852 LayoutRect rect = borderBoxRect(); 3818 LayoutRect rect = borderBoxRect();
3853 // We want to include the margin, but only when it adds height. Quirky margi ns don't contribute height 3819 // We want to include the margin, but only when it adds height. Quirky margi ns don't contribute height
3854 // nor do the margins of self-collapsing blocks. 3820 // nor do the margins of self-collapsing blocks.
3855 if (!style()->hasMarginAfterQuirk() && !isSelfCollapsingBlock()) 3821 if (!style()->hasMarginAfterQuirk() && !isSelfCollapsingBlock())
3856 rect.expand(LayoutSize(LayoutUnit(), marginAfter())); 3822 rect.expand(LayoutSize(LayoutUnit(), marginAfter()));
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
4083 4049
4084 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) 4050 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style)
4085 { 4051 {
4086 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); 4052 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor);
4087 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); 4053 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage();
4088 ASSERT(hasBackground == style.hasBackground()); 4054 ASSERT(hasBackground == style.hasBackground());
4089 hasBorder = style.hasBorder(); 4055 hasBorder = style.hasBorder();
4090 } 4056 }
4091 4057
4092 } // namespace blink 4058 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBox.h ('k') | sky/engine/core/rendering/RenderBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698