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

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: corrected a flaw in clearShapeOutside that cropped up in webkit_unit_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
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2721 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698