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