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 4092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4103 | 4103 |
4104 if (style()->hasBorderImageOutsets()) { | 4104 if (style()->hasBorderImageOutsets()) { |
4105 LayoutRectOutsets borderOutsets = style()->borderImageOutsets(); | 4105 LayoutRectOutsets borderOutsets = style()->borderImageOutsets(); |
4106 top = std::max(top, borderOutsets.top()); | 4106 top = std::max(top, borderOutsets.top()); |
4107 right = std::max(right, borderOutsets.right()); | 4107 right = std::max(right, borderOutsets.right()); |
4108 bottom = std::max(bottom, borderOutsets.bottom()); | 4108 bottom = std::max(bottom, borderOutsets.bottom()); |
4109 left = std::max(left, borderOutsets.left()); | 4109 left = std::max(left, borderOutsets.left()); |
4110 } | 4110 } |
4111 | 4111 |
4112 if (style()->hasOutline()) { | 4112 if (style()->hasOutline()) { |
| 4113 Vector<LayoutRect> outlineRects; |
| 4114 // The result rects are in coordinates of this object's border box. |
| 4115 addOutlineRects(outlineRects, LayoutPoint()); |
| 4116 LayoutRect rect = unionRect(outlineRects); |
4113 int outlineOutset = style()->outlineOutsetExtent(); | 4117 int outlineOutset = style()->outlineOutsetExtent(); |
4114 if (style()->outlineStyleIsAuto()) { | 4118 top = std::max(top, -rect.y() + outlineOutset); |
4115 // The result focus ring rects are in coordinates of this object's b
order box. | 4119 right = std::max(right, rect.maxX() - size().width() + outlineOutset); |
4116 Vector<LayoutRect> focusRingRects; | 4120 bottom = std::max(bottom, rect.maxY() - size().height() + outlineOutset)
; |
4117 addOutlineRects(focusRingRects, LayoutPoint()); | 4121 left = std::max(left, -rect.x() + outlineOutset); |
4118 LayoutRect rect = unionRect(focusRingRects); | |
4119 | |
4120 top = std::max(top, -rect.y() + outlineOutset); | |
4121 right = std::max(right, rect.maxX() - size().width() + outlineOutset
); | |
4122 bottom = std::max(bottom, rect.maxY() - size().height() + outlineOut
set); | |
4123 left = std::max(left, -rect.x() + outlineOutset); | |
4124 } else { | |
4125 top = std::max<LayoutUnit>(top, outlineOutset); | |
4126 right = std::max<LayoutUnit>(right, outlineOutset); | |
4127 bottom = std::max<LayoutUnit>(bottom, outlineOutset); | |
4128 left = std::max<LayoutUnit>(left, outlineOutset); | |
4129 } | |
4130 } | 4122 } |
4131 | 4123 |
4132 return LayoutRectOutsets(top, right, bottom, left); | 4124 return LayoutRectOutsets(top, right, bottom, left); |
4133 } | 4125 } |
4134 | 4126 |
4135 void LayoutBox::addOverflowFromChild(LayoutBox* child, const LayoutSize& delta) | 4127 void LayoutBox::addOverflowFromChild(LayoutBox* child, const LayoutSize& delta) |
4136 { | 4128 { |
4137 // Never allow flow threads to propagate overflow up to a parent. | 4129 // Never allow flow threads to propagate overflow up to a parent. |
4138 if (child->isLayoutFlowThread()) | 4130 if (child->isLayoutFlowThread()) |
4139 return; | 4131 return; |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4738 StyleImage* borderImage = style()->borderImage().image(); | 4730 StyleImage* borderImage = style()->borderImage().image(); |
4739 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); | 4731 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); |
4740 } | 4732 } |
4741 | 4733 |
4742 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const | 4734 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const |
4743 { | 4735 { |
4744 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this)
: nullptr; | 4736 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this)
: nullptr; |
4745 } | 4737 } |
4746 | 4738 |
4747 } // namespace blink | 4739 } // namespace blink |
OLD | NEW |