Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: Source/core/rendering/RenderObject.cpp

Issue 226203010: [CSS Shapes] shape-outside from image doesn't load properly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Revised the test Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2722 matching lines...) Expand 10 before | Expand all | Expand 10 after
2733 2733
2734 if (destroyRootParent->firstChild() != this || destroyRootParent->lastCh ild() != this) 2734 if (destroyRootParent->firstChild() != this || destroyRootParent->lastCh ild() != this)
2735 break; 2735 break;
2736 } 2736 }
2737 2737
2738 destroyRoot->destroy(); 2738 destroyRoot->destroy();
2739 2739
2740 // WARNING: |this| is deleted here. 2740 // WARNING: |this| is deleted here.
2741 } 2741 }
2742 2742
2743 void RenderObject::removeShapeImageClient(ShapeValue* shapeValue)
2744 {
2745 if (!shapeValue)
2746 return;
2747 if (StyleImage* shapeImage = shapeValue->image())
2748 shapeImage->removeClient(this);
2749 }
2750
2751 void RenderObject::destroy() 2743 void RenderObject::destroy()
2752 { 2744 {
2753 willBeDestroyed(); 2745 willBeDestroyed();
2754 postDestroy(); 2746 postDestroy();
2755 } 2747 }
2756 2748
2757 void RenderObject::postDestroy() 2749 void RenderObject::postDestroy()
2758 { 2750 {
2759 // It seems ugly that this is not in willBeDestroyed(). 2751 // It seems ugly that this is not in willBeDestroyed().
2760 if (m_style) { 2752 if (m_style) {
2761 for (const FillLayer* bgLayer = m_style->backgroundLayers(); bgLayer; bg Layer = bgLayer->next()) { 2753 for (const FillLayer* bgLayer = m_style->backgroundLayers(); bgLayer; bg Layer = bgLayer->next()) {
2762 if (StyleImage* backgroundImage = bgLayer->image()) 2754 if (StyleImage* backgroundImage = bgLayer->image())
2763 backgroundImage->removeClient(this); 2755 backgroundImage->removeClient(this);
2764 } 2756 }
2765 2757
2766 for (const FillLayer* maskLayer = m_style->maskLayers(); maskLayer; mask Layer = maskLayer->next()) { 2758 for (const FillLayer* maskLayer = m_style->maskLayers(); maskLayer; mask Layer = maskLayer->next()) {
2767 if (StyleImage* maskImage = maskLayer->image()) 2759 if (StyleImage* maskImage = maskLayer->image())
2768 maskImage->removeClient(this); 2760 maskImage->removeClient(this);
2769 } 2761 }
2770 2762
2771 if (StyleImage* borderImage = m_style->borderImage().image()) 2763 if (StyleImage* borderImage = m_style->borderImage().image())
2772 borderImage->removeClient(this); 2764 borderImage->removeClient(this);
2773 2765
2774 if (StyleImage* maskBoxImage = m_style->maskBoxImage().image()) 2766 if (StyleImage* maskBoxImage = m_style->maskBoxImage().image())
2775 maskBoxImage->removeClient(this); 2767 maskBoxImage->removeClient(this);
2776
2777 removeShapeImageClient(m_style->shapeOutside());
2778 } 2768 }
2779 2769
2780 delete this; 2770 delete this;
2781 } 2771 }
2782 2772
2783 PositionWithAffinity RenderObject::positionForPoint(const LayoutPoint&) 2773 PositionWithAffinity RenderObject::positionForPoint(const LayoutPoint&)
2784 { 2774 {
2785 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM); 2775 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM);
2786 } 2776 }
2787 2777
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
3357 { 3347 {
3358 if (object1) { 3348 if (object1) {
3359 const WebCore::RenderObject* root = object1; 3349 const WebCore::RenderObject* root = object1;
3360 while (root->parent()) 3350 while (root->parent())
3361 root = root->parent(); 3351 root = root->parent();
3362 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3352 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3363 } 3353 }
3364 } 3354 }
3365 3355
3366 #endif 3356 #endif
OLDNEW
« Source/core/rendering/RenderBox.cpp ('K') | « Source/core/rendering/RenderObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698