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

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

Issue 423093002: Oilpan: Prepare to move RenderObject and RenderObjectChildList to Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add more trace Created 6 years, 4 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) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 21 matching lines...) Expand all
32 #include "core/rendering/RenderView.h" 32 #include "core/rendering/RenderView.h"
33 #include "wtf/StdLibExtras.h" 33 #include "wtf/StdLibExtras.h"
34 #include "wtf/text/StringBuilder.h" 34 #include "wtf/text/StringBuilder.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 using namespace HTMLNames; 38 using namespace HTMLNames;
39 39
40 RenderListItem::RenderListItem(Element* element) 40 RenderListItem::RenderListItem(Element* element)
41 : RenderBlockFlow(element) 41 : RenderBlockFlow(element)
42 , m_marker(0) 42 , m_marker(nullptr)
43 , m_hasExplicitValue(false) 43 , m_hasExplicitValue(false)
44 , m_isValueUpToDate(false) 44 , m_isValueUpToDate(false)
45 , m_notInList(false) 45 , m_notInList(false)
46 { 46 {
47 setInline(false); 47 setInline(false);
48 } 48 }
49 49
50 void RenderListItem::trace(Visitor* visitor)
51 {
52 visitor->trace(m_marker);
53 RenderBlockFlow::trace(visitor);
54 }
55
50 void RenderListItem::styleDidChange(StyleDifference diff, const RenderStyle* old Style) 56 void RenderListItem::styleDidChange(StyleDifference diff, const RenderStyle* old Style)
51 { 57 {
52 RenderBlockFlow::styleDidChange(diff, oldStyle); 58 RenderBlockFlow::styleDidChange(diff, oldStyle);
53 59
54 if (style()->listStyleType() != NoneListStyle 60 if (style()->listStyleType() != NoneListStyle
55 || (style()->listStyleImage() && !style()->listStyleImage()->errorOccurr ed())) { 61 || (style()->listStyleImage() && !style()->listStyleImage()->errorOccurr ed())) {
56 RefPtr<RenderStyle> newStyle = RenderStyle::create(); 62 RefPtr<RenderStyle> newStyle = RenderStyle::create();
57 // The marker always inherits from the list item, regardless of where it might end 63 // The marker always inherits from the list item, regardless of where it might end
58 // up (e.g., in some deeply nested line box). See CSS3 spec. 64 // up (e.g., in some deeply nested line box). See CSS3 spec.
59 newStyle->inheritFrom(style()); 65 newStyle->inheritFrom(style());
60 if (!m_marker) 66 if (!m_marker)
61 m_marker = RenderListMarker::createAnonymous(this); 67 m_marker = RenderListMarker::createAnonymous(this);
62 m_marker->setStyle(newStyle.release()); 68 m_marker->setStyle(newStyle.release());
63 } else if (m_marker) { 69 } else if (m_marker) {
64 m_marker->destroy(); 70 m_marker->destroy();
65 m_marker = 0; 71 m_marker = nullptr;
66 } 72 }
67 } 73 }
68 74
69 void RenderListItem::willBeDestroyed() 75 void RenderListItem::willBeDestroyed()
70 { 76 {
71 if (m_marker) { 77 if (m_marker) {
72 m_marker->destroy(); 78 m_marker->destroy();
73 m_marker = 0; 79 m_marker = nullptr;
74 } 80 }
75 RenderBlockFlow::willBeDestroyed(); 81 RenderBlockFlow::willBeDestroyed();
76 } 82 }
77 83
78 void RenderListItem::insertedIntoTree() 84 void RenderListItem::insertedIntoTree()
79 { 85 {
80 RenderBlockFlow::insertedIntoTree(); 86 RenderBlockFlow::insertedIntoTree();
81 87
82 updateListMarkerNumbers(); 88 updateListMarkerNumbers();
83 } 89 }
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 // assume that all the following ones have too. 522 // assume that all the following ones have too.
517 // This gives us the opportunity to stop here and avoid 523 // This gives us the opportunity to stop here and avoid
518 // marking the same nodes again. 524 // marking the same nodes again.
519 break; 525 break;
520 } 526 }
521 item->updateValue(); 527 item->updateValue();
522 } 528 }
523 } 529 }
524 530
525 } // namespace blink 531 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698