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

Side by Side Diff: Source/WebCore/rendering/RenderQuote.h

Issue 10911116: Merge 126048 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 3 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) 2011 Nokia Inc. All rights reserved. 2 * Copyright (C) 2011 Nokia Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 virtual const char* renderName() const OVERRIDE { return "RenderQuote"; }; 42 virtual const char* renderName() const OVERRIDE { return "RenderQuote"; };
43 virtual bool isQuote() const OVERRIDE { return true; }; 43 virtual bool isQuote() const OVERRIDE { return true; };
44 virtual PassRefPtr<StringImpl> originalText() const OVERRIDE; 44 virtual PassRefPtr<StringImpl> originalText() const OVERRIDE;
45 virtual void computePreferredLogicalWidths(float leadWidth) OVERRIDE; 45 virtual void computePreferredLogicalWidths(float leadWidth) OVERRIDE;
46 46
47 // We don't override insertedIntoTree to call attachQuote() as it would be a ttached 47 // We don't override insertedIntoTree to call attachQuote() as it would be a ttached
48 // too early and get the wrong depth since generated content is inserted int o anonymous 48 // too early and get the wrong depth since generated content is inserted int o anonymous
49 // renderers before going into the main render tree. Once we can ensure that insertIntoTree, 49 // renderers before going into the main render tree. Once we can ensure that insertIntoTree,
50 // is called on an attached tree, we should override it here. 50 // is called on an attached tree, we should override it here.
51 51
52 virtual void willBeRemovedFromTree() OVERRIDE;
53
52 const QuotesData* quotesData() const; 54 const QuotesData* quotesData() const;
53 void updateDepth(); 55 void updateDepth();
54 bool isAttached() { return m_attached; } 56 bool isAttached() { return m_attached; }
55 57
56 QuoteType m_type; 58 QuoteType m_type;
57 int m_depth; 59 int m_depth;
58 RenderQuote* m_next; 60 RenderQuote* m_next;
59 RenderQuote* m_previous; 61 RenderQuote* m_previous;
60 bool m_attached; 62 bool m_attached;
61 }; 63 };
62 64
63 inline RenderQuote* toRenderQuote(RenderObject* object) 65 inline RenderQuote* toRenderQuote(RenderObject* object)
64 { 66 {
65 ASSERT(!object || object->isQuote()); 67 ASSERT(!object || object->isQuote());
66 return static_cast<RenderQuote*>(object); 68 return static_cast<RenderQuote*>(object);
67 } 69 }
68 70
69 // This will catch anyone doing an unnecessary cast. 71 // This will catch anyone doing an unnecessary cast.
70 void toRenderQuote(const RenderQuote*); 72 void toRenderQuote(const RenderQuote*);
71 73
72 } // namespace WebCore 74 } // namespace WebCore
73 75
74 #endif // RenderQuote_h 76 #endif // RenderQuote_h
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderObjectChildList.cpp ('k') | Source/WebCore/rendering/RenderQuote.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698