| 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 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1396 if (style()->backgroundLayers().next()) | 1396 if (style()->backgroundLayers().next()) |
| 1397 return false; | 1397 return false; |
| 1398 return backgroundClipRect().contains(localRect); | 1398 return backgroundClipRect().contains(localRect); |
| 1399 } | 1399 } |
| 1400 | 1400 |
| 1401 static bool isCandidateForOpaquenessTest(const LayoutBox& childBox) | 1401 static bool isCandidateForOpaquenessTest(const LayoutBox& childBox) |
| 1402 { | 1402 { |
| 1403 const ComputedStyle& childStyle = childBox.styleRef(); | 1403 const ComputedStyle& childStyle = childBox.styleRef(); |
| 1404 if (childStyle.position() != StaticPosition && childBox.containingBlock() !=
childBox.parent()) | 1404 if (childStyle.position() != StaticPosition && childBox.containingBlock() !=
childBox.parent()) |
| 1405 return false; | 1405 return false; |
| 1406 if (childStyle.visibility() != VISIBLE || childStyle.shapeOutside()) | 1406 if (childStyle.visibility() != EVisibility::Visible || childStyle.shapeOutsi
de()) |
| 1407 return false; | 1407 return false; |
| 1408 if (childBox.size().isZero()) | 1408 if (childBox.size().isZero()) |
| 1409 return false; | 1409 return false; |
| 1410 if (PaintLayer* childLayer = childBox.layer()) { | 1410 if (PaintLayer* childLayer = childBox.layer()) { |
| 1411 // FIXME: perhaps this could be less conservative? | 1411 // FIXME: perhaps this could be less conservative? |
| 1412 if (childLayer->compositingState() != NotComposited) | 1412 if (childLayer->compositingState() != NotComposited) |
| 1413 return false; | 1413 return false; |
| 1414 // FIXME: Deal with z-index. | 1414 // FIXME: Deal with z-index. |
| 1415 if (childStyle.isStackingContext()) | 1415 if (childStyle.isStackingContext()) |
| 1416 return false; | 1416 return false; |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2029 return joinFragmentainerBreakValues(previousBreakAfterValue, breakBefore()); | 2029 return joinFragmentainerBreakValues(previousBreakAfterValue, breakBefore()); |
| 2030 } | 2030 } |
| 2031 | 2031 |
| 2032 bool LayoutBox::needsForcedBreakBefore(EBreak previousBreakAfterValue) const | 2032 bool LayoutBox::needsForcedBreakBefore(EBreak previousBreakAfterValue) const |
| 2033 { | 2033 { |
| 2034 return isForcedFragmentainerBreakValue(classABreakPointValue(previousBreakAf
terValue)); | 2034 return isForcedFragmentainerBreakValue(classABreakPointValue(previousBreakAf
terValue)); |
| 2035 } | 2035 } |
| 2036 | 2036 |
| 2037 LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const | 2037 LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const |
| 2038 { | 2038 { |
| 2039 if (style()->visibility() != VISIBLE) | 2039 if (style()->visibility() != EVisibility::Visible) |
| 2040 return LayoutRect(); | 2040 return LayoutRect(); |
| 2041 | 2041 |
| 2042 return selfVisualOverflowRect(); | 2042 return selfVisualOverflowRect(); |
| 2043 } | 2043 } |
| 2044 | 2044 |
| 2045 void LayoutBox::inflateVisualRectForReflectionAndFilterUnderContainer(LayoutRect
& rect, const LayoutObject& container, const LayoutBoxModelObject* ancestorToSto
pAt) const | 2045 void LayoutBox::inflateVisualRectForReflectionAndFilterUnderContainer(LayoutRect
& rect, const LayoutObject& container, const LayoutBoxModelObject* ancestorToSto
pAt) const |
| 2046 { | 2046 { |
| 2047 // Apply visual overflow caused by reflections and filters defined on object
s between this object | 2047 // Apply visual overflow caused by reflections and filters defined on object
s between this object |
| 2048 // and container (not included) or ancestorToStopAt (included). | 2048 // and container (not included) or ancestorToStopAt (included). |
| 2049 LayoutSize offsetFromContainer = this->offsetFromContainer(&container); | 2049 LayoutSize offsetFromContainer = this->offsetFromContainer(&container); |
| (...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3856 | 3856 |
| 3857 // Pass off to the closest child. | 3857 // Pass off to the closest child. |
| 3858 LayoutUnit minDist = LayoutUnit::max(); | 3858 LayoutUnit minDist = LayoutUnit::max(); |
| 3859 LayoutBox* closestLayoutObject = nullptr; | 3859 LayoutBox* closestLayoutObject = nullptr; |
| 3860 LayoutPoint adjustedPoint = point; | 3860 LayoutPoint adjustedPoint = point; |
| 3861 if (isTableRow()) | 3861 if (isTableRow()) |
| 3862 adjustedPoint.moveBy(location()); | 3862 adjustedPoint.moveBy(location()); |
| 3863 | 3863 |
| 3864 for (LayoutObject* layoutObject = firstChild; layoutObject; layoutObject = l
ayoutObject->nextSibling()) { | 3864 for (LayoutObject* layoutObject = firstChild; layoutObject; layoutObject = l
ayoutObject->nextSibling()) { |
| 3865 if ((!layoutObject->slowFirstChild() && !layoutObject->isInline() && !la
youtObject->isLayoutBlockFlow() ) | 3865 if ((!layoutObject->slowFirstChild() && !layoutObject->isInline() && !la
youtObject->isLayoutBlockFlow() ) |
| 3866 || layoutObject->style()->visibility() != VISIBLE) | 3866 || layoutObject->style()->visibility() != EVisibility::Visible) |
| 3867 continue; | 3867 continue; |
| 3868 | 3868 |
| 3869 if (!layoutObject->isBox()) | 3869 if (!layoutObject->isBox()) |
| 3870 continue; | 3870 continue; |
| 3871 | 3871 |
| 3872 LayoutBox* layoutBox = toLayoutBox(layoutObject); | 3872 LayoutBox* layoutBox = toLayoutBox(layoutObject); |
| 3873 | 3873 |
| 3874 LayoutUnit top = layoutBox->borderTop() + layoutBox->paddingTop() + (isT
ableRow() ? LayoutUnit() : layoutBox->location().y()); | 3874 LayoutUnit top = layoutBox->borderTop() + layoutBox->paddingTop() + (isT
ableRow() ? LayoutUnit() : layoutBox->location().y()); |
| 3875 LayoutUnit bottom = top + layoutBox->contentHeight(); | 3875 LayoutUnit bottom = top + layoutBox->contentHeight(); |
| 3876 LayoutUnit left = layoutBox->borderLeft() + layoutBox->paddingLeft() + (
isTableRow() ? LayoutUnit() : layoutBox->location().x()); | 3876 LayoutUnit left = layoutBox->borderLeft() + layoutBox->paddingLeft() + (
isTableRow() ? LayoutUnit() : layoutBox->location().x()); |
| (...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4965 m_rareData->m_snapAreas->remove(&snapArea); | 4965 m_rareData->m_snapAreas->remove(&snapArea); |
| 4966 } | 4966 } |
| 4967 } | 4967 } |
| 4968 | 4968 |
| 4969 SnapAreaSet* LayoutBox::snapAreas() const | 4969 SnapAreaSet* LayoutBox::snapAreas() const |
| 4970 { | 4970 { |
| 4971 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4971 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
| 4972 } | 4972 } |
| 4973 | 4973 |
| 4974 } // namespace blink | 4974 } // namespace blink |
| OLD | NEW |