| 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. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 4892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4903 top = std::max(top, -rect.y() + outlineOutset); | 4903 top = std::max(top, -rect.y() + outlineOutset); |
| 4904 right = std::max(right, rect.maxX() - size().width() + outlineOutset); | 4904 right = std::max(right, rect.maxX() - size().width() + outlineOutset); |
| 4905 bottom = std::max(bottom, rect.maxY() - size().height() + outlineOutset); | 4905 bottom = std::max(bottom, rect.maxY() - size().height() + outlineOutset); |
| 4906 left = std::max(left, -rect.x() + outlineOutset); | 4906 left = std::max(left, -rect.x() + outlineOutset); |
| 4907 } | 4907 } |
| 4908 | 4908 |
| 4909 return LayoutRectOutsets(top, right, bottom, left); | 4909 return LayoutRectOutsets(top, right, bottom, left); |
| 4910 } | 4910 } |
| 4911 | 4911 |
| 4912 DISABLE_CFI_PERF | 4912 DISABLE_CFI_PERF |
| 4913 void LayoutBox::addOverflowFromChild(LayoutBox* child, | 4913 void LayoutBox::addOverflowFromChild(const LayoutBox& child, |
| 4914 const LayoutSize& delta) { | 4914 const LayoutSize& delta) { |
| 4915 // Never allow flow threads to propagate overflow up to a parent. | 4915 // Never allow flow threads to propagate overflow up to a parent. |
| 4916 if (child->isLayoutFlowThread()) | 4916 if (child.isLayoutFlowThread()) |
| 4917 return; | 4917 return; |
| 4918 | 4918 |
| 4919 // Only propagate layout overflow from the child if the child isn't clipping | 4919 // Only propagate layout overflow from the child if the child isn't clipping |
| 4920 // its overflow. If it is, then its overflow is internal to it, and we don't | 4920 // its overflow. If it is, then its overflow is internal to it, and we don't |
| 4921 // care about it. layoutOverflowRectForPropagation takes care of this and just | 4921 // care about it. layoutOverflowRectForPropagation takes care of this and just |
| 4922 // propagates the border box rect instead. | 4922 // propagates the border box rect instead. |
| 4923 LayoutRect childLayoutOverflowRect = | 4923 LayoutRect childLayoutOverflowRect = |
| 4924 child->layoutOverflowRectForPropagation(styleRef()); | 4924 child.layoutOverflowRectForPropagation(styleRef()); |
| 4925 childLayoutOverflowRect.move(delta); | 4925 childLayoutOverflowRect.move(delta); |
| 4926 addLayoutOverflow(childLayoutOverflowRect); | 4926 addLayoutOverflow(childLayoutOverflowRect); |
| 4927 | 4927 |
| 4928 // Add in visual overflow from the child. Even if the child clips its | 4928 // Add in visual overflow from the child. Even if the child clips its |
| 4929 // overflow, it may still have visual overflow of its own set from box shadows | 4929 // overflow, it may still have visual overflow of its own set from box shadows |
| 4930 // or reflections. It is unnecessary to propagate this overflow if we are | 4930 // or reflections. It is unnecessary to propagate this overflow if we are |
| 4931 // clipping our own overflow. | 4931 // clipping our own overflow. |
| 4932 if (child->hasSelfPaintingLayer()) | 4932 if (child.hasSelfPaintingLayer()) |
| 4933 return; | 4933 return; |
| 4934 LayoutRect childVisualOverflowRect = | 4934 LayoutRect childVisualOverflowRect = |
| 4935 child->visualOverflowRectForPropagation(styleRef()); | 4935 child.visualOverflowRectForPropagation(styleRef()); |
| 4936 childVisualOverflowRect.move(delta); | 4936 childVisualOverflowRect.move(delta); |
| 4937 addContentsVisualOverflow(childVisualOverflowRect); | 4937 addContentsVisualOverflow(childVisualOverflowRect); |
| 4938 } | 4938 } |
| 4939 | 4939 |
| 4940 bool LayoutBox::hasTopOverflow() const { | 4940 bool LayoutBox::hasTopOverflow() const { |
| 4941 return !style()->isLeftToRightDirection() && !isHorizontalWritingMode(); | 4941 return !style()->isLeftToRightDirection() && !isHorizontalWritingMode(); |
| 4942 } | 4942 } |
| 4943 | 4943 |
| 4944 bool LayoutBox::hasLeftOverflow() const { | 4944 bool LayoutBox::hasLeftOverflow() const { |
| 4945 return !style()->isLeftToRightDirection() && isHorizontalWritingMode(); | 4945 return !style()->isLeftToRightDirection() && isHorizontalWritingMode(); |
| (...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5753 | 5753 |
| 5754 void LayoutBox::MutableForPainting:: | 5754 void LayoutBox::MutableForPainting:: |
| 5755 savePreviousContentBoxSizeAndLayoutOverflowRect() { | 5755 savePreviousContentBoxSizeAndLayoutOverflowRect() { |
| 5756 auto& rareData = layoutBox().ensureRareData(); | 5756 auto& rareData = layoutBox().ensureRareData(); |
| 5757 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true; | 5757 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true; |
| 5758 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size(); | 5758 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size(); |
| 5759 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect(); | 5759 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect(); |
| 5760 } | 5760 } |
| 5761 | 5761 |
| 5762 } // namespace blink | 5762 } // namespace blink |
| OLD | NEW |