| 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 2076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2087 // include a scale. | 2087 // include a scale. |
| 2088 rect = LayoutRect(layer()->transform()->mapRect(enclosingIntRect(rect)))
; | 2088 rect = LayoutRect(layer()->transform()->mapRect(enclosingIntRect(rect)))
; |
| 2089 } | 2089 } |
| 2090 LayoutPoint topLeft = rect.location(); | 2090 LayoutPoint topLeft = rect.location(); |
| 2091 if (container->isBox()) { | 2091 if (container->isBox()) { |
| 2092 topLeft.moveBy(topLeftLocation(toLayoutBox(container))); | 2092 topLeft.moveBy(topLeftLocation(toLayoutBox(container))); |
| 2093 // If the row is the ancestor, however, add its offset back in. In effec
t, this passes from the joint <td> / <tr> | 2093 // If the row is the ancestor, however, add its offset back in. In effec
t, this passes from the joint <td> / <tr> |
| 2094 // coordinate space to the parent space, then back to <tr> / <td>. | 2094 // coordinate space to the parent space, then back to <tr> / <td>. |
| 2095 if (tableRowContainer) | 2095 if (tableRowContainer) |
| 2096 topLeft.moveBy(-tableRowContainer->topLeftLocation(toLayoutBox(conta
iner))); | 2096 topLeft.moveBy(-tableRowContainer->topLeftLocation(toLayoutBox(conta
iner))); |
| 2097 } else if (container->isRuby()) { |
| 2098 // TODO(wkorman): Generalize Ruby specialization and/or document more cl
early. |
| 2099 // See the accompanying specialization in LayoutInline::mapToVisualRectI
nAncestorSpace. |
| 2100 topLeft.moveBy(topLeftLocation()); |
| 2097 } else { | 2101 } else { |
| 2098 topLeft.moveBy(location()); | 2102 topLeft.moveBy(location()); |
| 2099 } | 2103 } |
| 2100 | 2104 |
| 2101 const ComputedStyle& styleToUse = styleRef(); | 2105 const ComputedStyle& styleToUse = styleRef(); |
| 2102 EPosition position = styleToUse.position(); | 2106 EPosition position = styleToUse.position(); |
| 2103 if (position == AbsolutePosition && container->isInFlowPositioned() && conta
iner->isLayoutInline()) { | 2107 if (position == AbsolutePosition && container->isInFlowPositioned() && conta
iner->isLayoutInline()) { |
| 2104 topLeft += toLayoutInline(container)->offsetForInFlowPositionedInline(*t
his); | 2108 topLeft += toLayoutInline(container)->offsetForInFlowPositionedInline(*t
his); |
| 2105 } else if (styleToUse.hasInFlowPosition() && layer()) { | 2109 } else if (styleToUse.hasInFlowPosition() && layer()) { |
| 2106 // Apply the relative position offset when invalidating a rectangle. Th
e layer | 2110 // Apply the relative position offset when invalidating a rectangle. Th
e layer |
| (...skipping 2845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4952 m_rareData->m_snapAreas->remove(&snapArea); | 4956 m_rareData->m_snapAreas->remove(&snapArea); |
| 4953 } | 4957 } |
| 4954 } | 4958 } |
| 4955 | 4959 |
| 4956 SnapAreaSet* LayoutBox::snapAreas() const | 4960 SnapAreaSet* LayoutBox::snapAreas() const |
| 4957 { | 4961 { |
| 4958 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4962 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
| 4959 } | 4963 } |
| 4960 | 4964 |
| 4961 } // namespace blink | 4965 } // namespace blink |
| OLD | NEW |