| 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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1192 // There can't be a transform between repaintContainer and o, because tr
ansforms create containers, so it should be safe | 1192 // There can't be a transform between repaintContainer and o, because tr
ansforms create containers, so it should be safe |
| 1193 // to just subtract the delta between the repaintContainer and o. | 1193 // to just subtract the delta between the repaintContainer and o. |
| 1194 LayoutSize containerOffset = repaintContainer->offsetFromAncestorContain
er(o); | 1194 LayoutSize containerOffset = repaintContainer->offsetFromAncestorContain
er(o); |
| 1195 transformState.move(-containerOffset.width(), -containerOffset.height(),
preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTrans
form); | 1195 transformState.move(-containerOffset.width(), -containerOffset.height(),
preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTrans
form); |
| 1196 return; | 1196 return; |
| 1197 } | 1197 } |
| 1198 | 1198 |
| 1199 o->mapLocalToContainer(repaintContainer, transformState, mode, wasFixed); | 1199 o->mapLocalToContainer(repaintContainer, transformState, mode, wasFixed); |
| 1200 } | 1200 } |
| 1201 | 1201 |
| 1202 const RenderObject* RenderInline::pushMappingToContainer(const RenderLayerModelO
bject* ancestorToStopAt, RenderGeometryMap& geometryMap) const | |
| 1203 { | |
| 1204 ASSERT(ancestorToStopAt != this); | |
| 1205 | |
| 1206 bool ancestorSkipped; | |
| 1207 RenderObject* container = this->container(ancestorToStopAt, &ancestorSkipped
); | |
| 1208 if (!container) | |
| 1209 return 0; | |
| 1210 | |
| 1211 LayoutSize adjustmentForSkippedAncestor; | |
| 1212 if (ancestorSkipped) { | |
| 1213 // There can't be a transform between repaintContainer and o, because tr
ansforms create containers, so it should be safe | |
| 1214 // to just subtract the delta between the ancestor and o. | |
| 1215 adjustmentForSkippedAncestor = -ancestorToStopAt->offsetFromAncestorCont
ainer(container); | |
| 1216 } | |
| 1217 | |
| 1218 bool offsetDependsOnPoint = false; | |
| 1219 LayoutSize containerOffset = offsetFromContainer(container, LayoutPoint(), &
offsetDependsOnPoint); | |
| 1220 | |
| 1221 bool preserve3D = container->style()->preserves3D() || style()->preserves3D(
); | |
| 1222 if (shouldUseTransformFromContainer(container)) { | |
| 1223 TransformationMatrix t; | |
| 1224 getTransformFromContainer(container, containerOffset, t); | |
| 1225 t.translateRight(adjustmentForSkippedAncestor.width(), adjustmentForSkip
pedAncestor.height()); // FIXME: right? | |
| 1226 geometryMap.push(this, t, preserve3D, offsetDependsOnPoint); | |
| 1227 } else { | |
| 1228 containerOffset += adjustmentForSkippedAncestor; | |
| 1229 geometryMap.push(this, containerOffset, preserve3D, offsetDependsOnPoint
); | |
| 1230 } | |
| 1231 | |
| 1232 return ancestorSkipped ? ancestorToStopAt : container; | |
| 1233 } | |
| 1234 | |
| 1235 void RenderInline::updateDragState(bool dragOn) | 1202 void RenderInline::updateDragState(bool dragOn) |
| 1236 { | 1203 { |
| 1237 RenderBoxModelObject::updateDragState(dragOn); | 1204 RenderBoxModelObject::updateDragState(dragOn); |
| 1238 if (continuation()) | 1205 if (continuation()) |
| 1239 continuation()->updateDragState(dragOn); | 1206 continuation()->updateDragState(dragOn); |
| 1240 } | 1207 } |
| 1241 | 1208 |
| 1242 void RenderInline::childBecameNonInline(RenderObject* child) | 1209 void RenderInline::childBecameNonInline(RenderObject* child) |
| 1243 { | 1210 { |
| 1244 // We have to split the parent flow. | 1211 // We have to split the parent flow. |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1597 | 1564 |
| 1598 void RenderInline::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const | 1565 void RenderInline::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const |
| 1599 { | 1566 { |
| 1600 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering)
; | 1567 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering)
; |
| 1601 RenderBoxModelObject::reportMemoryUsage(memoryObjectInfo); | 1568 RenderBoxModelObject::reportMemoryUsage(memoryObjectInfo); |
| 1602 info.addMember(m_children, "children"); | 1569 info.addMember(m_children, "children"); |
| 1603 info.addMember(m_lineBoxes, "lineBoxes"); | 1570 info.addMember(m_lineBoxes, "lineBoxes"); |
| 1604 } | 1571 } |
| 1605 | 1572 |
| 1606 } // namespace WebCore | 1573 } // namespace WebCore |
| OLD | NEW |