| 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 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1953 // else we would forget to inflate it for the current layoutObject. FIXME: I
f these were | 1953 // else we would forget to inflate it for the current layoutObject. FIXME: I
f these were |
| 1954 // included into the visual overflow for paint invalidation, we wouldn't hav
e this issue. | 1954 // included into the visual overflow for paint invalidation, we wouldn't hav
e this issue. |
| 1955 inflatePaintInvalidationRectForReflectionAndFilter(rect); | 1955 inflatePaintInvalidationRectForReflectionAndFilter(rect); |
| 1956 | 1956 |
| 1957 if (ancestor == this) { | 1957 if (ancestor == this) { |
| 1958 if (ancestor->style()->isFlippedBlocksWritingMode()) | 1958 if (ancestor->style()->isFlippedBlocksWritingMode()) |
| 1959 flipForWritingMode(rect); | 1959 flipForWritingMode(rect); |
| 1960 return true; | 1960 return true; |
| 1961 } | 1961 } |
| 1962 | 1962 |
| 1963 bool containerSkipped; | 1963 bool ancestorSkipped; |
| 1964 LayoutObject* container = this->container(ancestor, &containerSkipped); | 1964 LayoutObject* container = this->container(ancestor, &ancestorSkipped); |
| 1965 if (!container) | 1965 if (!container) |
| 1966 return true; | 1966 return true; |
| 1967 | 1967 |
| 1968 if (isWritingModeRoot()) | 1968 if (isWritingModeRoot()) |
| 1969 flipForWritingMode(rect); | 1969 flipForWritingMode(rect); |
| 1970 | 1970 |
| 1971 LayoutPoint topLeft = rect.location(); | 1971 LayoutPoint topLeft = rect.location(); |
| 1972 topLeft.move(locationOffset()); | 1972 topLeft.move(locationOffset()); |
| 1973 | 1973 |
| 1974 // We are now in our parent container's coordinate space. Apply our transfo
rm to obtain a bounding box | 1974 // We are now in our parent container's coordinate space. Apply our transfo
rm to obtain a bounding box |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1992 // FIXME: We ignore the lightweight clipping rect that controls use, since i
f |o| is in mid-layout, | 1992 // FIXME: We ignore the lightweight clipping rect that controls use, since i
f |o| is in mid-layout, |
| 1993 // its controlClipRect will be wrong. For overflow clip we use the values ca
ched by the layer. | 1993 // its controlClipRect will be wrong. For overflow clip we use the values ca
ched by the layer. |
| 1994 rect.setLocation(topLeft); | 1994 rect.setLocation(topLeft); |
| 1995 if (container->hasOverflowClip()) { | 1995 if (container->hasOverflowClip()) { |
| 1996 LayoutBox* containerBox = toLayoutBox(container); | 1996 LayoutBox* containerBox = toLayoutBox(container); |
| 1997 containerBox->mapScrollingContentsRectToBoxSpace(rect); | 1997 containerBox->mapScrollingContentsRectToBoxSpace(rect); |
| 1998 if (container != ancestor && !containerBox->applyOverflowClip(rect, visi
bleRectFlags)) | 1998 if (container != ancestor && !containerBox->applyOverflowClip(rect, visi
bleRectFlags)) |
| 1999 return false; | 1999 return false; |
| 2000 } | 2000 } |
| 2001 | 2001 |
| 2002 if (containerSkipped) { | 2002 if (ancestorSkipped) { |
| 2003 // If the paintInvalidationContainer is below o, then we need to map the
rect into paintInvalidationContainer's coordinates. | 2003 // If the ancestor is below o, then we need to map the rect into paintIn
validationContainer's coordinates. |
| 2004 LayoutSize containerOffset = ancestor->offsetFromAncestorContainer(conta
iner); | 2004 LayoutSize containerOffset = ancestor->offsetFromAncestorContainer(conta
iner); |
| 2005 rect.move(-containerOffset); | 2005 rect.move(-containerOffset); |
| 2006 // If the paintInvalidationContainer is fixed, then the rect is already
in its coordinates so doesn't need viewport-adjusting. | 2006 // If the ancestor is fixed, then the rect is already in its coordinates
so doesn't need viewport-adjusting. |
| 2007 if (ancestor->style()->position() != FixedPosition && container->isLayou
tView() && position == FixedPosition) | 2007 if (ancestor->style()->position() != FixedPosition && container->isLayou
tView() && position == FixedPosition) |
| 2008 toLayoutView(container)->adjustOffsetForFixedPosition(rect); | 2008 toLayoutView(container)->adjustOffsetForFixedPosition(rect); |
| 2009 return true; | 2009 return true; |
| 2010 } | 2010 } |
| 2011 | 2011 |
| 2012 if (container->isLayoutView()) | 2012 if (container->isLayoutView()) |
| 2013 return toLayoutView(container)->mapToVisibleRectInAncestorSpace(ancestor
, rect, position == FixedPosition ? IsFixed : 0, visibleRectFlags); | 2013 return toLayoutView(container)->mapToVisibleRectInAncestorSpace(ancestor
, rect, position == FixedPosition ? IsFixed : 0, visibleRectFlags); |
| 2014 else | 2014 else |
| 2015 return container->mapToVisibleRectInAncestorSpace(ancestor, rect, visibl
eRectFlags); | 2015 return container->mapToVisibleRectInAncestorSpace(ancestor, rect, visibl
eRectFlags); |
| 2016 } | 2016 } |
| (...skipping 2686 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 |