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 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1416 if (style()->backgroundLayers().next()) | 1416 if (style()->backgroundLayers().next()) |
1417 return false; | 1417 return false; |
1418 return backgroundClipRect().contains(localRect); | 1418 return backgroundClipRect().contains(localRect); |
1419 } | 1419 } |
1420 | 1420 |
1421 static bool isCandidateForOpaquenessTest(const LayoutBox& childBox) | 1421 static bool isCandidateForOpaquenessTest(const LayoutBox& childBox) |
1422 { | 1422 { |
1423 const ComputedStyle& childStyle = childBox.styleRef(); | 1423 const ComputedStyle& childStyle = childBox.styleRef(); |
1424 if (childStyle.position() != StaticPosition && childBox.containingBlock() !=
childBox.parent()) | 1424 if (childStyle.position() != StaticPosition && childBox.containingBlock() !=
childBox.parent()) |
1425 return false; | 1425 return false; |
1426 if (childStyle.visibility() != VISIBLE || childStyle.shapeOutside()) | 1426 if (childStyle.visibility() != EVisibility::Visible || childStyle.shapeOutsi
de()) |
1427 return false; | 1427 return false; |
1428 if (childBox.size().isZero()) | 1428 if (childBox.size().isZero()) |
1429 return false; | 1429 return false; |
1430 if (PaintLayer* childLayer = childBox.layer()) { | 1430 if (PaintLayer* childLayer = childBox.layer()) { |
1431 // FIXME: perhaps this could be less conservative? | 1431 // FIXME: perhaps this could be less conservative? |
1432 if (childLayer->compositingState() != NotComposited) | 1432 if (childLayer->compositingState() != NotComposited) |
1433 return false; | 1433 return false; |
1434 // FIXME: Deal with z-index. | 1434 // FIXME: Deal with z-index. |
1435 if (childStyle.isStackingContext()) | 1435 if (childStyle.isStackingContext()) |
1436 return false; | 1436 return false; |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2049 return joinFragmentainerBreakValues(previousBreakAfterValue, breakBefore()); | 2049 return joinFragmentainerBreakValues(previousBreakAfterValue, breakBefore()); |
2050 } | 2050 } |
2051 | 2051 |
2052 bool LayoutBox::needsForcedBreakBefore(EBreak previousBreakAfterValue) const | 2052 bool LayoutBox::needsForcedBreakBefore(EBreak previousBreakAfterValue) const |
2053 { | 2053 { |
2054 return isForcedFragmentainerBreakValue(classABreakPointValue(previousBreakAf
terValue)); | 2054 return isForcedFragmentainerBreakValue(classABreakPointValue(previousBreakAf
terValue)); |
2055 } | 2055 } |
2056 | 2056 |
2057 LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const | 2057 LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const |
2058 { | 2058 { |
2059 if (style()->visibility() != VISIBLE) | 2059 if (style()->visibility() != EVisibility::Visible) |
2060 return LayoutRect(); | 2060 return LayoutRect(); |
2061 | 2061 |
2062 return selfVisualOverflowRect(); | 2062 return selfVisualOverflowRect(); |
2063 } | 2063 } |
2064 | 2064 |
2065 void LayoutBox::inflateVisualRectForReflectionAndFilterUnderContainer(LayoutRect
& rect, const LayoutObject& container, const LayoutBoxModelObject* ancestorToSto
pAt) const | 2065 void LayoutBox::inflateVisualRectForReflectionAndFilterUnderContainer(LayoutRect
& rect, const LayoutObject& container, const LayoutBoxModelObject* ancestorToSto
pAt) const |
2066 { | 2066 { |
2067 // Apply visual overflow caused by reflections and filters defined on object
s between this object | 2067 // Apply visual overflow caused by reflections and filters defined on object
s between this object |
2068 // and container (not included) or ancestorToStopAt (included). | 2068 // and container (not included) or ancestorToStopAt (included). |
2069 LayoutSize offsetFromContainer = this->offsetFromContainer(&container); | 2069 LayoutSize offsetFromContainer = this->offsetFromContainer(&container); |
(...skipping 1802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3872 | 3872 |
3873 // Pass off to the closest child. | 3873 // Pass off to the closest child. |
3874 LayoutUnit minDist = LayoutUnit::max(); | 3874 LayoutUnit minDist = LayoutUnit::max(); |
3875 LayoutBox* closestLayoutObject = nullptr; | 3875 LayoutBox* closestLayoutObject = nullptr; |
3876 LayoutPoint adjustedPoint = point; | 3876 LayoutPoint adjustedPoint = point; |
3877 if (isTableRow()) | 3877 if (isTableRow()) |
3878 adjustedPoint.moveBy(location()); | 3878 adjustedPoint.moveBy(location()); |
3879 | 3879 |
3880 for (LayoutObject* layoutObject = firstChild; layoutObject; layoutObject = l
ayoutObject->nextSibling()) { | 3880 for (LayoutObject* layoutObject = firstChild; layoutObject; layoutObject = l
ayoutObject->nextSibling()) { |
3881 if ((!layoutObject->slowFirstChild() && !layoutObject->isInline() && !la
youtObject->isLayoutBlockFlow() ) | 3881 if ((!layoutObject->slowFirstChild() && !layoutObject->isInline() && !la
youtObject->isLayoutBlockFlow() ) |
3882 || layoutObject->style()->visibility() != VISIBLE) | 3882 || layoutObject->style()->visibility() != EVisibility::Visible) |
3883 continue; | 3883 continue; |
3884 | 3884 |
3885 if (!layoutObject->isBox()) | 3885 if (!layoutObject->isBox()) |
3886 continue; | 3886 continue; |
3887 | 3887 |
3888 LayoutBox* layoutBox = toLayoutBox(layoutObject); | 3888 LayoutBox* layoutBox = toLayoutBox(layoutObject); |
3889 | 3889 |
3890 LayoutUnit top = layoutBox->borderTop() + layoutBox->paddingTop() + (isT
ableRow() ? LayoutUnit() : layoutBox->location().y()); | 3890 LayoutUnit top = layoutBox->borderTop() + layoutBox->paddingTop() + (isT
ableRow() ? LayoutUnit() : layoutBox->location().y()); |
3891 LayoutUnit bottom = top + layoutBox->contentHeight(); | 3891 LayoutUnit bottom = top + layoutBox->contentHeight(); |
3892 LayoutUnit left = layoutBox->borderLeft() + layoutBox->paddingLeft() + (
isTableRow() ? LayoutUnit() : layoutBox->location().x()); | 3892 LayoutUnit left = layoutBox->borderLeft() + layoutBox->paddingLeft() + (
isTableRow() ? LayoutUnit() : layoutBox->location().x()); |
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4981 m_rareData->m_snapAreas->remove(&snapArea); | 4981 m_rareData->m_snapAreas->remove(&snapArea); |
4982 } | 4982 } |
4983 } | 4983 } |
4984 | 4984 |
4985 SnapAreaSet* LayoutBox::snapAreas() const | 4985 SnapAreaSet* LayoutBox::snapAreas() const |
4986 { | 4986 { |
4987 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4987 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
4988 } | 4988 } |
4989 | 4989 |
4990 } // namespace blink | 4990 } // namespace blink |
OLD | NEW |