| 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 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 return false; | 1340 return false; |
| 1341 if (childBox.size().isZero()) | 1341 if (childBox.size().isZero()) |
| 1342 return false; | 1342 return false; |
| 1343 if (PaintLayer* childLayer = childBox.layer()) { | 1343 if (PaintLayer* childLayer = childBox.layer()) { |
| 1344 // FIXME: perhaps this could be less conservative? | 1344 // FIXME: perhaps this could be less conservative? |
| 1345 if (childLayer->compositingState() != NotComposited) | 1345 if (childLayer->compositingState() != NotComposited) |
| 1346 return false; | 1346 return false; |
| 1347 // FIXME: Deal with z-index. | 1347 // FIXME: Deal with z-index. |
| 1348 if (!childStyle.hasAutoZIndex()) | 1348 if (!childStyle.hasAutoZIndex()) |
| 1349 return false; | 1349 return false; |
| 1350 if (childLayer->hasTransformRelatedProperty() || childLayer->isTranspare
nt() || childLayer->hasFilter()) | 1350 if (childLayer->hasTransformRelatedProperty() || childLayer->isTranspare
nt() || childLayer->hasFilterInducingProperty()) |
| 1351 return false; | 1351 return false; |
| 1352 if (childBox.hasOverflowClip() && childStyle.hasBorderRadius()) | 1352 if (childBox.hasOverflowClip() && childStyle.hasBorderRadius()) |
| 1353 return false; | 1353 return false; |
| 1354 } | 1354 } |
| 1355 return true; | 1355 return true; |
| 1356 } | 1356 } |
| 1357 | 1357 |
| 1358 bool LayoutBox::foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, u
nsigned maxDepthToTest) const | 1358 bool LayoutBox::foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, u
nsigned maxDepthToTest) const |
| 1359 { | 1359 { |
| 1360 if (!maxDepthToTest) | 1360 if (!maxDepthToTest) |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2010 } | 2010 } |
| 2011 | 2011 |
| 2012 if (container->isLayoutView()) | 2012 if (container->isLayoutView()) |
| 2013 return toLayoutView(container)->mapToVisualRectInAncestorSpace(ancestor,
rect, position == FixedPosition ? IsFixed : 0, visualRectFlags); | 2013 return toLayoutView(container)->mapToVisualRectInAncestorSpace(ancestor,
rect, position == FixedPosition ? IsFixed : 0, visualRectFlags); |
| 2014 else | 2014 else |
| 2015 return container->mapToVisualRectInAncestorSpace(ancestor, rect, visualR
ectFlags); | 2015 return container->mapToVisualRectInAncestorSpace(ancestor, rect, visualR
ectFlags); |
| 2016 } | 2016 } |
| 2017 | 2017 |
| 2018 void LayoutBox::inflatePaintInvalidationRectForReflectionAndFilter(LayoutRect& p
aintInvalidationRect) const | 2018 void LayoutBox::inflatePaintInvalidationRectForReflectionAndFilter(LayoutRect& p
aintInvalidationRect) const |
| 2019 { | 2019 { |
| 2020 if (hasReflection()) | 2020 if (!RuntimeEnabledFeatures::cssBoxReflectFilterEnabled() && hasReflection()
) |
| 2021 paintInvalidationRect.unite(reflectedRect(paintInvalidationRect)); | 2021 paintInvalidationRect.unite(reflectedRect(paintInvalidationRect)); |
| 2022 | 2022 |
| 2023 if (layer() && layer()->hasFilter()) | 2023 if (layer() && layer()->hasFilterInducingProperty()) |
| 2024 paintInvalidationRect.expand(layer()->filterOutsets()); | 2024 paintInvalidationRect.expand(layer()->filterOutsets()); |
| 2025 } | 2025 } |
| 2026 | 2026 |
| 2027 void LayoutBox::invalidatePaintForOverhangingFloats(bool) | 2027 void LayoutBox::invalidatePaintForOverhangingFloats(bool) |
| 2028 { | 2028 { |
| 2029 } | 2029 } |
| 2030 | 2030 |
| 2031 void LayoutBox::updateLogicalWidth() | 2031 void LayoutBox::updateLogicalWidth() |
| 2032 { | 2032 { |
| 2033 LogicalExtentComputedValues computedValues; | 2033 LogicalExtentComputedValues computedValues; |
| (...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3861 // LayoutBox::incrementallyInvalidatePaint() depends on positionFromPaintInv
alidationBacking | 3861 // LayoutBox::incrementallyInvalidatePaint() depends on positionFromPaintInv
alidationBacking |
| 3862 // which is not available when slimmingPaintOffsetCachingEnabled. | 3862 // which is not available when slimmingPaintOffsetCachingEnabled. |
| 3863 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && (style()->
hasBoxDecorations() || style()->hasBackground())) | 3863 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && (style()->
hasBoxDecorations() || style()->hasBackground())) |
| 3864 return PaintInvalidationBorderBoxChange; | 3864 return PaintInvalidationBorderBoxChange; |
| 3865 | 3865 |
| 3866 // TODO(wangxianzhu): Remove incremental invalidation when we remove rect-ba
sed paint invalidation. | 3866 // TODO(wangxianzhu): Remove incremental invalidation when we remove rect-ba
sed paint invalidation. |
| 3867 // See another hasNonCompositedScrollbars() callsite above. | 3867 // See another hasNonCompositedScrollbars() callsite above. |
| 3868 if (hasNonCompositedScrollbars()) | 3868 if (hasNonCompositedScrollbars()) |
| 3869 return PaintInvalidationBorderBoxChange; | 3869 return PaintInvalidationBorderBoxChange; |
| 3870 | 3870 |
| 3871 if (style()->hasVisualOverflowingEffect() || style()->hasAppearance() || sty
le()->hasFilter() || style()->resize() != RESIZE_NONE) | 3871 if (style()->hasVisualOverflowingEffect() || style()->hasAppearance() || sty
le()->hasFilterInducingProperty() || style()->resize() != RESIZE_NONE) |
| 3872 return PaintInvalidationBorderBoxChange; | 3872 return PaintInvalidationBorderBoxChange; |
| 3873 | 3873 |
| 3874 if (style()->hasBorderRadius()) { | 3874 if (style()->hasBorderRadius()) { |
| 3875 // If a border-radius exists and width/height is smaller than radius wid
th/height, | 3875 // If a border-radius exists and width/height is smaller than radius wid
th/height, |
| 3876 // we need to fully invalidate to cover the changed radius. | 3876 // we need to fully invalidate to cover the changed radius. |
| 3877 FloatRoundedRect oldRoundedRect = style()->getRoundedBorderFor(LayoutRec
t(LayoutPoint(0, 0), oldBorderBoxSize)); | 3877 FloatRoundedRect oldRoundedRect = style()->getRoundedBorderFor(LayoutRec
t(LayoutPoint(0, 0), oldBorderBoxSize)); |
| 3878 FloatRoundedRect newRoundedRect = style()->getRoundedBorderFor(LayoutRec
t(LayoutPoint(0, 0), newBorderBoxSize)); | 3878 FloatRoundedRect newRoundedRect = style()->getRoundedBorderFor(LayoutRec
t(LayoutPoint(0, 0), newBorderBoxSize)); |
| 3879 if (oldRoundedRect.getRadii() != newRoundedRect.getRadii()) | 3879 if (oldRoundedRect.getRadii() != newRoundedRect.getRadii()) |
| 3880 return PaintInvalidationBorderBoxChange; | 3880 return PaintInvalidationBorderBoxChange; |
| 3881 } | 3881 } |
| (...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4703 | 4703 |
| 4704 void LayoutBox::clearPercentHeightDescendants() | 4704 void LayoutBox::clearPercentHeightDescendants() |
| 4705 { | 4705 { |
| 4706 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
r(this)) { | 4706 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
r(this)) { |
| 4707 if (curr->isBox()) | 4707 if (curr->isBox()) |
| 4708 toLayoutBox(curr)->removeFromPercentHeightContainer(); | 4708 toLayoutBox(curr)->removeFromPercentHeightContainer(); |
| 4709 } | 4709 } |
| 4710 } | 4710 } |
| 4711 | 4711 |
| 4712 } // namespace blink | 4712 } // namespace blink |
| OLD | NEW |