| 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. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1975 } | 1975 } |
| 1976 | 1976 |
| 1977 void LayoutBox::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, | 1977 void LayoutBox::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, |
| 1978 TransformState& transformState, | 1978 TransformState& transformState, |
| 1979 MapCoordinatesFlags mode) const { | 1979 MapCoordinatesFlags mode) const { |
| 1980 bool isFixedPos = style()->position() == EPosition::kFixed; | 1980 bool isFixedPos = style()->position() == EPosition::kFixed; |
| 1981 | 1981 |
| 1982 // If this box has a transform or contains paint, it acts as a fixed position | 1982 // If this box has a transform or contains paint, it acts as a fixed position |
| 1983 // container for fixed descendants, and may itself also be fixed position. So | 1983 // container for fixed descendants, and may itself also be fixed position. So |
| 1984 // propagate 'fixed' up only if this box is fixed position. | 1984 // propagate 'fixed' up only if this box is fixed position. |
| 1985 if (style()->canContainFixedPositionObjects() && !isFixedPos) | 1985 if (canContainFixedPositionObjects() && !isFixedPos) |
| 1986 mode &= ~IsFixed; | 1986 mode &= ~IsFixed; |
| 1987 else if (isFixedPos) | 1987 else if (isFixedPos) |
| 1988 mode |= IsFixed; | 1988 mode |= IsFixed; |
| 1989 | 1989 |
| 1990 LayoutBoxModelObject::mapLocalToAncestor(ancestor, transformState, mode); | 1990 LayoutBoxModelObject::mapLocalToAncestor(ancestor, transformState, mode); |
| 1991 } | 1991 } |
| 1992 | 1992 |
| 1993 void LayoutBox::mapAncestorToLocal(const LayoutBoxModelObject* ancestor, | 1993 void LayoutBox::mapAncestorToLocal(const LayoutBoxModelObject* ancestor, |
| 1994 TransformState& transformState, | 1994 TransformState& transformState, |
| 1995 MapCoordinatesFlags mode) const { | 1995 MapCoordinatesFlags mode) const { |
| 1996 if (this == ancestor) | 1996 if (this == ancestor) |
| 1997 return; | 1997 return; |
| 1998 | 1998 |
| 1999 bool isFixedPos = style()->position() == EPosition::kFixed; | 1999 bool isFixedPos = style()->position() == EPosition::kFixed; |
| 2000 | 2000 |
| 2001 // If this box has a transform or contains paint, it acts as a fixed position | 2001 // If this box has a transform or contains paint, it acts as a fixed position |
| 2002 // container for fixed descendants, and may itself also be fixed position. So | 2002 // container for fixed descendants, and may itself also be fixed position. So |
| 2003 // propagate 'fixed' up only if this box is fixed position. | 2003 // propagate 'fixed' up only if this box is fixed position. |
| 2004 if (style()->canContainFixedPositionObjects() && !isFixedPos) | 2004 if (canContainFixedPositionObjects() && !isFixedPos) |
| 2005 mode &= ~IsFixed; | 2005 mode &= ~IsFixed; |
| 2006 else if (isFixedPos) | 2006 else if (isFixedPos) |
| 2007 mode |= IsFixed; | 2007 mode |= IsFixed; |
| 2008 | 2008 |
| 2009 LayoutBoxModelObject::mapAncestorToLocal(ancestor, transformState, mode); | 2009 LayoutBoxModelObject::mapAncestorToLocal(ancestor, transformState, mode); |
| 2010 } | 2010 } |
| 2011 | 2011 |
| 2012 LayoutSize LayoutBox::offsetFromContainer(const LayoutObject* o) const { | 2012 LayoutSize LayoutBox::offsetFromContainer(const LayoutObject* o) const { |
| 2013 ASSERT(o == container()); | 2013 ASSERT(o == container()); |
| 2014 | 2014 |
| (...skipping 3730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5745 | 5745 |
| 5746 void LayoutBox::MutableForPainting:: | 5746 void LayoutBox::MutableForPainting:: |
| 5747 savePreviousContentBoxSizeAndLayoutOverflowRect() { | 5747 savePreviousContentBoxSizeAndLayoutOverflowRect() { |
| 5748 auto& rareData = layoutBox().ensureRareData(); | 5748 auto& rareData = layoutBox().ensureRareData(); |
| 5749 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true; | 5749 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true; |
| 5750 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size(); | 5750 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size(); |
| 5751 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect(); | 5751 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect(); |
| 5752 } | 5752 } |
| 5753 | 5753 |
| 5754 } // namespace blink | 5754 } // namespace blink |
| OLD | NEW |