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