| 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 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1976 if (position == AbsolutePosition && container->isInFlowPositioned() && conta
iner->isLayoutInline()) { | 1976 if (position == AbsolutePosition && container->isInFlowPositioned() && conta
iner->isLayoutInline()) { |
| 1977 topLeft += toLayoutInline(container)->offsetForInFlowPositionedInline(*t
his); | 1977 topLeft += toLayoutInline(container)->offsetForInFlowPositionedInline(*t
his); |
| 1978 } else if (styleToUse.hasInFlowPosition() && layer()) { | 1978 } else if (styleToUse.hasInFlowPosition() && layer()) { |
| 1979 // Apply the relative position offset when invalidating a rectangle. Th
e layer | 1979 // Apply the relative position offset when invalidating a rectangle. Th
e layer |
| 1980 // is translated, but the layout box isn't, so we need to do this to get
the | 1980 // is translated, but the layout box isn't, so we need to do this to get
the |
| 1981 // right dirty rect. Since this is called from LayoutObject::setStyle,
the relative position | 1981 // right dirty rect. Since this is called from LayoutObject::setStyle,
the relative position |
| 1982 // flag on the LayoutObject has been cleared, so use the one on the styl
e(). | 1982 // flag on the LayoutObject has been cleared, so use the one on the styl
e(). |
| 1983 topLeft += layer()->offsetForInFlowPosition(); | 1983 topLeft += layer()->offsetForInFlowPosition(); |
| 1984 } | 1984 } |
| 1985 | 1985 |
| 1986 // FIXME: We ignore the lightweight clipping rect that controls use, since i
f |o| is in mid-layout, | |
| 1987 // its controlClipRect will be wrong. For overflow clip we use the values ca
ched by the layer. | |
| 1988 rect.setLocation(topLeft); | 1986 rect.setLocation(topLeft); |
| 1989 if (container->hasOverflowClip()) { | 1987 if (container->hasOverflowClip()) { |
| 1990 LayoutBox* containerBox = toLayoutBox(container); | 1988 LayoutBox* containerBox = toLayoutBox(container); |
| 1991 containerBox->mapScrollingContentsRectToBoxSpace(rect); | 1989 if (!container->isLayoutView() || position != FixedPosition) |
| 1990 containerBox->mapScrollingContentsRectToBoxSpace(rect); |
| 1992 if (container != ancestor && !containerBox->applyOverflowClip(rect, visu
alRectFlags)) | 1991 if (container != ancestor && !containerBox->applyOverflowClip(rect, visu
alRectFlags)) |
| 1993 return false; | 1992 return false; |
| 1993 } else if (container->isLayoutView()) { |
| 1994 if (!toLayoutView(container)->mapContentRectToFrameSpace(this, rect, vis
ualRectFlags)) |
| 1995 return false; |
| 1994 } | 1996 } |
| 1995 | 1997 |
| 1996 if (ancestorSkipped) { | 1998 if (ancestorSkipped) { |
| 1997 // If the ancestor is below o, then we need to map the rect into paintIn
validationContainer's coordinates. | 1999 // If the ancestor is below container, then we need to map the rect into
ancestor's coordinates. |
| 1998 LayoutSize containerOffset = ancestor->offsetFromAncestorContainer(conta
iner); | 2000 rect.move(-ancestor->offsetFromAncestorContainer(container)); |
| 1999 rect.move(-containerOffset); | |
| 2000 // If the ancestor is fixed, then the rect is already in its coordinates
so doesn't need viewport-adjusting. | |
| 2001 if (ancestor->style()->position() != FixedPosition && container->isLayou
tView() && position == FixedPosition) | |
| 2002 toLayoutView(container)->adjustOffsetForFixedPosition(rect); | |
| 2003 return true; | 2001 return true; |
| 2004 } | 2002 } |
| 2005 | 2003 |
| 2006 if (container->isLayoutView()) | 2004 return container->mapToVisualRectInAncestorSpace(ancestor, rect, visualRectF
lags); |
| 2007 return toLayoutView(container)->mapToVisualRectInAncestorSpace(ancestor,
rect, position == FixedPosition ? IsFixed : 0, visualRectFlags); | |
| 2008 else | |
| 2009 return container->mapToVisualRectInAncestorSpace(ancestor, rect, visualR
ectFlags); | |
| 2010 } | 2005 } |
| 2011 | 2006 |
| 2012 void LayoutBox::inflatePaintInvalidationRectForReflectionAndFilter(LayoutRect& p
aintInvalidationRect) const | 2007 void LayoutBox::inflatePaintInvalidationRectForReflectionAndFilter(LayoutRect& p
aintInvalidationRect) const |
| 2013 { | 2008 { |
| 2014 if (!RuntimeEnabledFeatures::cssBoxReflectFilterEnabled() && hasReflection()
) | 2009 if (!RuntimeEnabledFeatures::cssBoxReflectFilterEnabled() && hasReflection()
) |
| 2015 paintInvalidationRect.unite(reflectedRect(paintInvalidationRect)); | 2010 paintInvalidationRect.unite(reflectedRect(paintInvalidationRect)); |
| 2016 | 2011 |
| 2017 if (layer() && layer()->hasFilterInducingProperty()) | 2012 if (layer() && layer()->hasFilterInducingProperty()) |
| 2018 paintInvalidationRect.expand(layer()->filterOutsets()); | 2013 paintInvalidationRect.expand(layer()->filterOutsets()); |
| 2019 } | 2014 } |
| (...skipping 2683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4703 | 4698 |
| 4704 void LayoutBox::clearPercentHeightDescendants() | 4699 void LayoutBox::clearPercentHeightDescendants() |
| 4705 { | 4700 { |
| 4706 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
r(this)) { | 4701 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
r(this)) { |
| 4707 if (curr->isBox()) | 4702 if (curr->isBox()) |
| 4708 toLayoutBox(curr)->removeFromPercentHeightContainer(); | 4703 toLayoutBox(curr)->removeFromPercentHeightContainer(); |
| 4709 } | 4704 } |
| 4710 } | 4705 } |
| 4711 | 4706 |
| 4712 } // namespace blink | 4707 } // namespace blink |
| OLD | NEW |