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

Side by Side Diff: Source/core/layout/LayoutPart.cpp

Issue 1174373003: Deregister image client in LayoutObject::willBeDestroyed() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Simon Hausmann <hausmann@kde.org> 3 * (C) 2000 Simon Hausmann <hausmann@kde.org>
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2011. 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 , m_refCount(1) 47 , m_refCount(1)
48 { 48 {
49 ASSERT(element); 49 ASSERT(element);
50 frameView()->addPart(this); 50 frameView()->addPart(this);
51 setInline(false); 51 setInline(false);
52 } 52 }
53 53
54 void LayoutPart::deref() 54 void LayoutPart::deref()
55 { 55 {
56 if (--m_refCount <= 0) 56 if (--m_refCount <= 0)
57 postDestroy(); 57 delete this;
58 } 58 }
59 59
60 void LayoutPart::willBeDestroyed() 60 void LayoutPart::willBeDestroyed()
61 { 61 {
62 frameView()->removePart(this); 62 frameView()->removePart(this);
63 63
64 if (AXObjectCache* cache = document().existingAXObjectCache()) { 64 if (AXObjectCache* cache = document().existingAXObjectCache()) {
65 cache->childrenChanged(this->parent()); 65 cache->childrenChanged(this->parent());
66 cache->remove(this); 66 cache->remove(this);
67 } 67 }
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 if (widget->frameRect() == newFrame) 319 if (widget->frameRect() == newFrame)
320 return false; 320 return false;
321 321
322 RefPtr<LayoutPart> protector(this); 322 RefPtr<LayoutPart> protector(this);
323 RefPtrWillBeRawPtr<Node> protectedNode(node()); 323 RefPtrWillBeRawPtr<Node> protectedNode(node());
324 widget->setFrameRect(newFrame); 324 widget->setFrameRect(newFrame);
325 return widget->frameRect().size() != newFrame.size(); 325 return widget->frameRect().size() != newFrame.size();
326 } 326 }
327 327
328 } 328 }
OLDNEW
« Source/core/layout/LayoutObject.cpp ('K') | « Source/core/layout/LayoutObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698