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

Side by Side Diff: sky/engine/core/rendering/RenderObject.cpp

Issue 893093002: Delete remaining masks dead code. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/core/rendering/style/FillLayer.h » ('j') | 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 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 diff = m_style->visualInvalidationDiff(*style); 1194 diff = m_style->visualInvalidationDiff(*style);
1195 1195
1196 diff = adjustStyleDifference(diff); 1196 diff = adjustStyleDifference(diff);
1197 1197
1198 styleWillChange(diff, *style); 1198 styleWillChange(diff, *style);
1199 1199
1200 RefPtr<RenderStyle> oldStyle = m_style.release(); 1200 RefPtr<RenderStyle> oldStyle = m_style.release();
1201 setStyleInternal(style); 1201 setStyleInternal(style);
1202 1202
1203 updateFillImages(oldStyle ? &oldStyle->backgroundLayers() : 0, m_style->back groundLayers()); 1203 updateFillImages(oldStyle ? &oldStyle->backgroundLayers() : 0, m_style->back groundLayers());
1204 updateFillImages(oldStyle ? &oldStyle->maskLayers() : 0, m_style->maskLayers ());
1205
1206 updateImage(oldStyle ? oldStyle->borderImage().image() : 0, m_style->borderI mage().image()); 1204 updateImage(oldStyle ? oldStyle->borderImage().image() : 0, m_style->borderI mage().image());
1207 updateImage(oldStyle ? oldStyle->maskBoxImage().image() : 0, m_style->maskBo xImage().image());
1208 1205
1209 bool doesNotNeedLayout = !m_parent || isText(); 1206 bool doesNotNeedLayout = !m_parent || isText();
1210 1207
1211 styleDidChange(diff, oldStyle.get()); 1208 styleDidChange(diff, oldStyle.get());
1212 1209
1213 // FIXME: |this| might be destroyed here. This can currently happen for a Re nderTextFragment when 1210 // FIXME: |this| might be destroyed here. This can currently happen for a Re nderTextFragment when
1214 // its first-letter block gets an update in RenderTextFragment::styleDidChan ge. For RenderTextFragment(s), 1211 // its first-letter block gets an update in RenderTextFragment::styleDidChan ge. For RenderTextFragment(s),
1215 // we will safely bail out with the doesNotNeedLayout flag. We might want to broaden this condition 1212 // we will safely bail out with the doesNotNeedLayout flag. We might want to broaden this condition
1216 // in the future as we move renderer changes out of layout and into style ch anges. 1213 // in the future as we move renderer changes out of layout and into style ch anges.
1217 // FIXME(sky): Remove this. 1214 // FIXME(sky): Remove this.
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 1656
1660 void RenderObject::postDestroy() 1657 void RenderObject::postDestroy()
1661 { 1658 {
1662 // It seems ugly that this is not in willBeDestroyed(). 1659 // It seems ugly that this is not in willBeDestroyed().
1663 if (m_style) { 1660 if (m_style) {
1664 for (const FillLayer* bgLayer = &m_style->backgroundLayers(); bgLayer; b gLayer = bgLayer->next()) { 1661 for (const FillLayer* bgLayer = &m_style->backgroundLayers(); bgLayer; b gLayer = bgLayer->next()) {
1665 if (StyleImage* backgroundImage = bgLayer->image()) 1662 if (StyleImage* backgroundImage = bgLayer->image())
1666 backgroundImage->removeClient(this); 1663 backgroundImage->removeClient(this);
1667 } 1664 }
1668 1665
1669 for (const FillLayer* maskLayer = &m_style->maskLayers(); maskLayer; mas kLayer = maskLayer->next()) {
1670 if (StyleImage* maskImage = maskLayer->image())
1671 maskImage->removeClient(this);
1672 }
1673
1674 if (StyleImage* borderImage = m_style->borderImage().image()) 1666 if (StyleImage* borderImage = m_style->borderImage().image())
1675 borderImage->removeClient(this); 1667 borderImage->removeClient(this);
1676
1677 if (StyleImage* maskBoxImage = m_style->maskBoxImage().image())
1678 maskBoxImage->removeClient(this);
1679 } 1668 }
1680 delete this; 1669 delete this;
1681 } 1670 }
1682 1671
1683 PositionWithAffinity RenderObject::positionForPoint(const LayoutPoint&) 1672 PositionWithAffinity RenderObject::positionForPoint(const LayoutPoint&)
1684 { 1673 {
1685 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM); 1674 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM);
1686 } 1675 }
1687 1676
1688 bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffse t, HitTestFilter hitTestFilter) 1677 bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffse t, HitTestFilter hitTestFilter)
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1998 { 1987 {
1999 if (object1) { 1988 if (object1) {
2000 const blink::RenderObject* root = object1; 1989 const blink::RenderObject* root = object1;
2001 while (root->parent()) 1990 while (root->parent())
2002 root = root->parent(); 1991 root = root->parent();
2003 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 1992 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
2004 } 1993 }
2005 } 1994 }
2006 1995
2007 #endif 1996 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/core/rendering/style/FillLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698