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 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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, | 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. | 1987 // its controlClipRect will be wrong. For overflow clip we use the values ca ched by the layer. |
1988 rect.setLocation(topLeft); | 1988 rect.setLocation(topLeft); |
1989 if (container->hasOverflowClip()) { | 1989 if (container->hasOverflowClip()) { |
1990 LayoutBox* containerBox = toLayoutBox(container); | 1990 LayoutBox* containerBox = toLayoutBox(container); |
1991 containerBox->mapScrollingContentsRectToBoxSpace(rect); | 1991 containerBox->mapScrollingContentsRectToBoxSpace(rect); |
1992 if (container != ancestor && !containerBox->applyOverflowClip(rect, visu alRectFlags)) | 1992 if (container != ancestor || !containerBox->scrollsOverflow()) { |
pdr.
2016/04/07 18:23:45
This block (check hasOverflowClip , mapScrollingCo
Xianzhu
2016/04/07 19:04:50
Done.
| |
1993 return false; | 1993 if (!containerBox->applyOverflowClip(rect, visualRectFlags)) |
1994 return false; | |
1995 } | |
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 ancesto r's coordinates. | 1999 // If the ancestor is below o, then we need to map the rect into ancesto r's coordinates. |
1998 LayoutSize containerOffset = ancestor->offsetFromAncestorContainer(conta iner); | 2000 LayoutSize containerOffset = ancestor->offsetFromAncestorContainer(conta iner); |
1999 rect.move(-containerOffset); | 2001 rect.move(-containerOffset); |
2000 // If the ancestor is fixed, then the rect is already in its coordinates so doesn't need viewport-adjusting. | 2002 // 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) | 2003 if (ancestor->style()->position() != FixedPosition && container->isLayou tView() && position == FixedPosition) |
2002 toLayoutView(container)->adjustOffsetForFixedPosition(rect); | 2004 toLayoutView(container)->adjustOffsetForFixedPosition(rect); |
2003 return true; | 2005 return true; |
(...skipping 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4703 | 4705 |
4704 void LayoutBox::clearPercentHeightDescendants() | 4706 void LayoutBox::clearPercentHeightDescendants() |
4705 { | 4707 { |
4706 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde r(this)) { | 4708 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde r(this)) { |
4707 if (curr->isBox()) | 4709 if (curr->isBox()) |
4708 toLayoutBox(curr)->removeFromPercentHeightContainer(); | 4710 toLayoutBox(curr)->removeFromPercentHeightContainer(); |
4709 } | 4711 } |
4710 } | 4712 } |
4711 | 4713 |
4712 } // namespace blink | 4714 } // namespace blink |
OLD | NEW |