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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 transformState.move(toRenderBox(o)->layer()->scrolledContentOffset()
); | 1681 transformState.move(toRenderBox(o)->layer()->scrolledContentOffset()
); |
1682 } | 1682 } |
1683 } | 1683 } |
1684 | 1684 |
1685 TransformationMatrix RenderObject::transformFromContainer(const RenderObject* co
ntainerObject, const IntSize& offsetInContainer) const | 1685 TransformationMatrix RenderObject::transformFromContainer(const RenderObject* co
ntainerObject, const IntSize& offsetInContainer) const |
1686 { | 1686 { |
1687 TransformationMatrix containerTransform; | 1687 TransformationMatrix containerTransform; |
1688 containerTransform.translate(offsetInContainer.width(), offsetInContainer.he
ight()); | 1688 containerTransform.translate(offsetInContainer.width(), offsetInContainer.he
ight()); |
1689 RenderLayer* layer; | 1689 RenderLayer* layer; |
1690 if (hasLayer() && (layer = toRenderBox(this)->layer()) && layer->transform()
) | 1690 if (hasLayer() && (layer = toRenderBox(this)->layer()) && layer->transform()
) |
1691 containerTransform.multLeft(*layer->transform()); | 1691 containerTransform.multLeft(layer->currentTransform()); |
1692 | 1692 |
1693 if (containerObject && containerObject->style()->hasPerspective()) { | 1693 if (containerObject && containerObject->style()->hasPerspective()) { |
1694 // Perpsective on the container affects us, so we have to factor it in h
ere. | 1694 // Perpsective on the container affects us, so we have to factor it in h
ere. |
1695 ASSERT(containerObject->hasLayer()); | 1695 ASSERT(containerObject->hasLayer()); |
1696 FloatPoint perspectiveOrigin = toRenderBox(containerObject)->layer()->pe
rspectiveOrigin(); | 1696 FloatPoint perspectiveOrigin = toRenderBox(containerObject)->layer()->pe
rspectiveOrigin(); |
1697 | 1697 |
1698 TransformationMatrix perspectiveMatrix; | 1698 TransformationMatrix perspectiveMatrix; |
1699 perspectiveMatrix.applyPerspective(containerObject->style()->perspective
()); | 1699 perspectiveMatrix.applyPerspective(containerObject->style()->perspective
()); |
1700 | 1700 |
1701 containerTransform.translateRight3d(-perspectiveOrigin.x(), -perspective
Origin.y(), 0); | 1701 containerTransform.translateRight3d(-perspectiveOrigin.x(), -perspective
Origin.y(), 0); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1832 animation()->cancelAnimations(this); | 1832 animation()->cancelAnimations(this); |
1833 | 1833 |
1834 // By default no ref-counting. RenderWidget::destroy() doesn't call | 1834 // By default no ref-counting. RenderWidget::destroy() doesn't call |
1835 // this function because it needs to do ref-counting. If anything | 1835 // this function because it needs to do ref-counting. If anything |
1836 // in this function changes, be sure to fix RenderWidget::destroy() as well. | 1836 // in this function changes, be sure to fix RenderWidget::destroy() as well. |
1837 | 1837 |
1838 remove(); | 1838 remove(); |
1839 | 1839 |
1840 // FIXME: Would like to do this in RenderBoxModelObject, but the timing is s
o complicated that this can't easily | 1840 // FIXME: Would like to do this in RenderBoxModelObject, but the timing is s
o complicated that this can't easily |
1841 // be moved into RenderBoxModelObject::destroy. | 1841 // be moved into RenderBoxModelObject::destroy. |
1842 RenderArena* arena = renderArena(); | |
1843 if (hasLayer()) | 1842 if (hasLayer()) |
1844 toRenderBoxModelObject(this)->layer()->destroy(arena); | 1843 toRenderBoxModelObject(this)->destroyLayer(); |
1845 arenaDelete(arena, this); | 1844 arenaDelete(renderArena(), this); |
1846 } | 1845 } |
1847 | 1846 |
1848 void RenderObject::arenaDelete(RenderArena* arena, void* base) | 1847 void RenderObject::arenaDelete(RenderArena* arena, void* base) |
1849 { | 1848 { |
1850 if (m_style) { | 1849 if (m_style) { |
1851 for (const FillLayer* bgLayer = m_style->backgroundLayers(); bgLayer; bg
Layer = bgLayer->next()) { | 1850 for (const FillLayer* bgLayer = m_style->backgroundLayers(); bgLayer; bg
Layer = bgLayer->next()) { |
1852 if (StyleImage* backgroundImage = bgLayer->image()) | 1851 if (StyleImage* backgroundImage = bgLayer->image()) |
1853 backgroundImage->removeClient(this); | 1852 backgroundImage->removeClient(this); |
1854 } | 1853 } |
1855 | 1854 |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2314 #ifndef NDEBUG | 2313 #ifndef NDEBUG |
2315 | 2314 |
2316 void showTree(const WebCore::RenderObject* ro) | 2315 void showTree(const WebCore::RenderObject* ro) |
2317 { | 2316 { |
2318 if (ro) | 2317 if (ro) |
2319 ro->showTreeForThis(); | 2318 ro->showTreeForThis(); |
2320 } | 2319 } |
2321 | 2320 |
2322 #endif | 2321 #endif |
2323 | 2322 |
OLD | NEW |