| 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 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1397 if (style()->backgroundLayers().next()) | 1397 if (style()->backgroundLayers().next()) |
| 1398 return false; | 1398 return false; |
| 1399 return backgroundClipRect().contains(localRect); | 1399 return backgroundClipRect().contains(localRect); |
| 1400 } | 1400 } |
| 1401 | 1401 |
| 1402 static bool isCandidateForOpaquenessTest(const LayoutBox& childBox) | 1402 static bool isCandidateForOpaquenessTest(const LayoutBox& childBox) |
| 1403 { | 1403 { |
| 1404 const ComputedStyle& childStyle = childBox.styleRef(); | 1404 const ComputedStyle& childStyle = childBox.styleRef(); |
| 1405 if (childStyle.position() != StaticPosition && childBox.containingBlock() !=
childBox.parent()) | 1405 if (childStyle.position() != StaticPosition && childBox.containingBlock() !=
childBox.parent()) |
| 1406 return false; | 1406 return false; |
| 1407 if (childStyle.visibility() != VISIBLE || childStyle.shapeOutside()) | 1407 if (childStyle.visibility() != EVisibility::Visible || childStyle.shapeOutsi
de()) |
| 1408 return false; | 1408 return false; |
| 1409 if (childBox.size().isZero()) | 1409 if (childBox.size().isZero()) |
| 1410 return false; | 1410 return false; |
| 1411 if (PaintLayer* childLayer = childBox.layer()) { | 1411 if (PaintLayer* childLayer = childBox.layer()) { |
| 1412 // FIXME: perhaps this could be less conservative? | 1412 // FIXME: perhaps this could be less conservative? |
| 1413 if (childLayer->compositingState() != NotComposited) | 1413 if (childLayer->compositingState() != NotComposited) |
| 1414 return false; | 1414 return false; |
| 1415 // FIXME: Deal with z-index. | 1415 // FIXME: Deal with z-index. |
| 1416 if (childStyle.isStackingContext()) | 1416 if (childStyle.isStackingContext()) |
| 1417 return false; | 1417 return false; |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2052 // and ensuring it may hurt performance. | 2052 // and ensuring it may hurt performance. |
| 2053 // TODO(wangxianzhu): Paint invalidation for clip change will be different i
n spv2. | 2053 // TODO(wangxianzhu): Paint invalidation for clip change will be different i
n spv2. |
| 2054 if (hasClipRelatedProperty() || hasControlClip()) | 2054 if (hasClipRelatedProperty() || hasControlClip()) |
| 2055 return false; | 2055 return false; |
| 2056 | 2056 |
| 2057 return true; | 2057 return true; |
| 2058 } | 2058 } |
| 2059 | 2059 |
| 2060 LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const | 2060 LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const |
| 2061 { | 2061 { |
| 2062 if (style()->visibility() != VISIBLE) | 2062 if (style()->visibility() != EVisibility::Visible) |
| 2063 return LayoutRect(); | 2063 return LayoutRect(); |
| 2064 | 2064 |
| 2065 return selfVisualOverflowRect(); | 2065 return selfVisualOverflowRect(); |
| 2066 } | 2066 } |
| 2067 | 2067 |
| 2068 void LayoutBox::inflateVisualRectForReflectionAndFilterUnderContainer(LayoutRect
& rect, const LayoutObject& container, const LayoutBoxModelObject* ancestorToSto
pAt) const | 2068 void LayoutBox::inflateVisualRectForReflectionAndFilterUnderContainer(LayoutRect
& rect, const LayoutObject& container, const LayoutBoxModelObject* ancestorToSto
pAt) const |
| 2069 { | 2069 { |
| 2070 // Apply visual overflow caused by reflections and filters defined on object
s between this object | 2070 // Apply visual overflow caused by reflections and filters defined on object
s between this object |
| 2071 // and container (not included) or ancestorToStopAt (included). | 2071 // and container (not included) or ancestorToStopAt (included). |
| 2072 LayoutSize offsetFromContainer = this->offsetFromContainer(&container); | 2072 LayoutSize offsetFromContainer = this->offsetFromContainer(&container); |
| (...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3879 | 3879 |
| 3880 // Pass off to the closest child. | 3880 // Pass off to the closest child. |
| 3881 LayoutUnit minDist = LayoutUnit::max(); | 3881 LayoutUnit minDist = LayoutUnit::max(); |
| 3882 LayoutBox* closestLayoutObject = nullptr; | 3882 LayoutBox* closestLayoutObject = nullptr; |
| 3883 LayoutPoint adjustedPoint = point; | 3883 LayoutPoint adjustedPoint = point; |
| 3884 if (isTableRow()) | 3884 if (isTableRow()) |
| 3885 adjustedPoint.moveBy(location()); | 3885 adjustedPoint.moveBy(location()); |
| 3886 | 3886 |
| 3887 for (LayoutObject* layoutObject = firstChild; layoutObject; layoutObject = l
ayoutObject->nextSibling()) { | 3887 for (LayoutObject* layoutObject = firstChild; layoutObject; layoutObject = l
ayoutObject->nextSibling()) { |
| 3888 if ((!layoutObject->slowFirstChild() && !layoutObject->isInline() && !la
youtObject->isLayoutBlockFlow() ) | 3888 if ((!layoutObject->slowFirstChild() && !layoutObject->isInline() && !la
youtObject->isLayoutBlockFlow() ) |
| 3889 || layoutObject->style()->visibility() != VISIBLE) | 3889 || layoutObject->style()->visibility() != EVisibility::Visible) |
| 3890 continue; | 3890 continue; |
| 3891 | 3891 |
| 3892 if (!layoutObject->isBox()) | 3892 if (!layoutObject->isBox()) |
| 3893 continue; | 3893 continue; |
| 3894 | 3894 |
| 3895 LayoutBox* layoutBox = toLayoutBox(layoutObject); | 3895 LayoutBox* layoutBox = toLayoutBox(layoutObject); |
| 3896 | 3896 |
| 3897 LayoutUnit top = layoutBox->borderTop() + layoutBox->paddingTop() + (isT
ableRow() ? LayoutUnit() : layoutBox->location().y()); | 3897 LayoutUnit top = layoutBox->borderTop() + layoutBox->paddingTop() + (isT
ableRow() ? LayoutUnit() : layoutBox->location().y()); |
| 3898 LayoutUnit bottom = top + layoutBox->contentHeight(); | 3898 LayoutUnit bottom = top + layoutBox->contentHeight(); |
| 3899 LayoutUnit left = layoutBox->borderLeft() + layoutBox->paddingLeft() + (
isTableRow() ? LayoutUnit() : layoutBox->location().x()); | 3899 LayoutUnit left = layoutBox->borderLeft() + layoutBox->paddingLeft() + (
isTableRow() ? LayoutUnit() : layoutBox->location().x()); |
| (...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4988 m_rareData->m_snapAreas->remove(&snapArea); | 4988 m_rareData->m_snapAreas->remove(&snapArea); |
| 4989 } | 4989 } |
| 4990 } | 4990 } |
| 4991 | 4991 |
| 4992 SnapAreaSet* LayoutBox::snapAreas() const | 4992 SnapAreaSet* LayoutBox::snapAreas() const |
| 4993 { | 4993 { |
| 4994 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4994 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
| 4995 } | 4995 } |
| 4996 | 4996 |
| 4997 } // namespace blink | 4997 } // namespace blink |
| OLD | NEW |