| 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, 2011 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 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 2721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2732 | 2732 |
| 2733 if (destroyRootParent->firstChild() != this || destroyRootParent->lastCh
ild() != this) | 2733 if (destroyRootParent->firstChild() != this || destroyRootParent->lastCh
ild() != this) |
| 2734 break; | 2734 break; |
| 2735 } | 2735 } |
| 2736 | 2736 |
| 2737 destroyRoot->destroy(); | 2737 destroyRoot->destroy(); |
| 2738 | 2738 |
| 2739 // WARNING: |this| is deleted here. | 2739 // WARNING: |this| is deleted here. |
| 2740 } | 2740 } |
| 2741 | 2741 |
| 2742 void RenderObject::removeShapeImageClient(ShapeValue* shapeValue) | |
| 2743 { | |
| 2744 if (!shapeValue) | |
| 2745 return; | |
| 2746 if (StyleImage* shapeImage = shapeValue->image()) | |
| 2747 shapeImage->removeClient(this); | |
| 2748 } | |
| 2749 | |
| 2750 void RenderObject::destroy() | 2742 void RenderObject::destroy() |
| 2751 { | 2743 { |
| 2752 willBeDestroyed(); | 2744 willBeDestroyed(); |
| 2753 postDestroy(); | 2745 postDestroy(); |
| 2754 } | 2746 } |
| 2755 | 2747 |
| 2756 void RenderObject::postDestroy() | 2748 void RenderObject::postDestroy() |
| 2757 { | 2749 { |
| 2758 // It seems ugly that this is not in willBeDestroyed(). | 2750 // It seems ugly that this is not in willBeDestroyed(). |
| 2759 if (m_style) { | 2751 if (m_style) { |
| 2760 for (const FillLayer* bgLayer = m_style->backgroundLayers(); bgLayer; bg
Layer = bgLayer->next()) { | 2752 for (const FillLayer* bgLayer = m_style->backgroundLayers(); bgLayer; bg
Layer = bgLayer->next()) { |
| 2761 if (StyleImage* backgroundImage = bgLayer->image()) | 2753 if (StyleImage* backgroundImage = bgLayer->image()) |
| 2762 backgroundImage->removeClient(this); | 2754 backgroundImage->removeClient(this); |
| 2763 } | 2755 } |
| 2764 | 2756 |
| 2765 for (const FillLayer* maskLayer = m_style->maskLayers(); maskLayer; mask
Layer = maskLayer->next()) { | 2757 for (const FillLayer* maskLayer = m_style->maskLayers(); maskLayer; mask
Layer = maskLayer->next()) { |
| 2766 if (StyleImage* maskImage = maskLayer->image()) | 2758 if (StyleImage* maskImage = maskLayer->image()) |
| 2767 maskImage->removeClient(this); | 2759 maskImage->removeClient(this); |
| 2768 } | 2760 } |
| 2769 | 2761 |
| 2770 if (StyleImage* borderImage = m_style->borderImage().image()) | 2762 if (StyleImage* borderImage = m_style->borderImage().image()) |
| 2771 borderImage->removeClient(this); | 2763 borderImage->removeClient(this); |
| 2772 | 2764 |
| 2773 if (StyleImage* maskBoxImage = m_style->maskBoxImage().image()) | 2765 if (StyleImage* maskBoxImage = m_style->maskBoxImage().image()) |
| 2774 maskBoxImage->removeClient(this); | 2766 maskBoxImage->removeClient(this); |
| 2775 | |
| 2776 removeShapeImageClient(m_style->shapeOutside()); | |
| 2777 } | 2767 } |
| 2778 | 2768 |
| 2779 delete this; | 2769 delete this; |
| 2780 } | 2770 } |
| 2781 | 2771 |
| 2782 PositionWithAffinity RenderObject::positionForPoint(const LayoutPoint&) | 2772 PositionWithAffinity RenderObject::positionForPoint(const LayoutPoint&) |
| 2783 { | 2773 { |
| 2784 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM); | 2774 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM); |
| 2785 } | 2775 } |
| 2786 | 2776 |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3370 { | 3360 { |
| 3371 if (object1) { | 3361 if (object1) { |
| 3372 const WebCore::RenderObject* root = object1; | 3362 const WebCore::RenderObject* root = object1; |
| 3373 while (root->parent()) | 3363 while (root->parent()) |
| 3374 root = root->parent(); | 3364 root = root->parent(); |
| 3375 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3365 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3376 } | 3366 } |
| 3377 } | 3367 } |
| 3378 | 3368 |
| 3379 #endif | 3369 #endif |
| OLD | NEW |