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 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1782 LayoutBoxModelObject::mapLocalToAncestor(ancestor, transformState, mode); | 1782 LayoutBoxModelObject::mapLocalToAncestor(ancestor, transformState, mode); |
1783 } | 1783 } |
1784 | 1784 |
1785 void LayoutBox::mapAncestorToLocal(const LayoutBoxModelObject* ancestor, Transfo rmState& transformState, MapCoordinatesFlags mode) const | 1785 void LayoutBox::mapAncestorToLocal(const LayoutBoxModelObject* ancestor, Transfo rmState& transformState, MapCoordinatesFlags mode) const |
1786 { | 1786 { |
1787 if (this == ancestor) | 1787 if (this == ancestor) |
1788 return; | 1788 return; |
1789 | 1789 |
1790 bool isFixedPos = style()->position() == FixedPosition; | 1790 bool isFixedPos = style()->position() == FixedPosition; |
1791 | 1791 |
1792 if (style()->canContainFixedPositionObjects() && !isFixedPos) { | 1792 // If this box has a transform or contains paint, it acts as a fixed positio n container for fixed descendants, |
1793 // If this box has a transform or contains paint, it acts as a fixed pos ition container for fixed descendants, | 1793 // and may itself also be fixed position. So propagate 'fixed' up only if th is box is fixed position. |
1794 // and may itself also be fixed position. So propagate 'fixed' up only i f this box is fixed position. | 1794 if (style()->canContainFixedPositionObjects() && !isFixedPos) |
chrishtr
2016/07/29 21:04:34
Spurious changes here?
flackr
2016/08/02 16:58:14
schenney suggested I move the comment in ... while
| |
1795 mode &= ~IsFixed; | 1795 mode &= ~IsFixed; |
1796 } else if (isFixedPos) { | 1796 else if (isFixedPos) |
1797 mode |= IsFixed; | 1797 mode |= IsFixed; |
1798 } | |
1799 | 1798 |
1800 LayoutBoxModelObject::mapAncestorToLocal(ancestor, transformState, mode); | 1799 LayoutBoxModelObject::mapAncestorToLocal(ancestor, transformState, mode); |
1801 } | 1800 } |
1802 | 1801 |
1803 LayoutSize LayoutBox::offsetFromContainer(const LayoutObject* o) const | 1802 LayoutSize LayoutBox::offsetFromContainer(const LayoutObject* o) const |
1804 { | 1803 { |
1805 ASSERT(o == container()); | 1804 ASSERT(o == container()); |
1806 | 1805 |
1807 LayoutSize offset; | 1806 LayoutSize offset; |
1808 if (isInFlowPositioned()) | 1807 if (isInFlowPositioned()) |
(...skipping 3176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4985 m_rareData->m_snapAreas->remove(&snapArea); | 4984 m_rareData->m_snapAreas->remove(&snapArea); |
4986 } | 4985 } |
4987 } | 4986 } |
4988 | 4987 |
4989 SnapAreaSet* LayoutBox::snapAreas() const | 4988 SnapAreaSet* LayoutBox::snapAreas() const |
4990 { | 4989 { |
4991 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4990 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
4992 } | 4991 } |
4993 | 4992 |
4994 } // namespace blink | 4993 } // namespace blink |
OLD | NEW |