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

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

Issue 10914111: Merge 125737 (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 26 matching lines...) Expand all
37 void attachQuote(); 37 void attachQuote();
38 void detachQuote(); 38 void detachQuote();
39 39
40 private: 40 private:
41 virtual void willBeDestroyed() OVERRIDE; 41 virtual void willBeDestroyed() OVERRIDE;
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
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,
50 // is called on an attached tree, we should override it here.
51
47 const QuotesData* quotesData() const; 52 const QuotesData* quotesData() const;
48 void updateDepth(); 53 void updateDepth();
49 bool isAttached() { return m_attached; } 54 bool isAttached() { return m_attached; }
50 55
51 QuoteType m_type; 56 QuoteType m_type;
52 int m_depth; 57 int m_depth;
53 RenderQuote* m_next; 58 RenderQuote* m_next;
54 RenderQuote* m_previous; 59 RenderQuote* m_previous;
55 bool m_attached; 60 bool m_attached;
56 }; 61 };
57 62
58 inline RenderQuote* toRenderQuote(RenderObject* object) 63 inline RenderQuote* toRenderQuote(RenderObject* object)
59 { 64 {
60 ASSERT(!object || object->isQuote()); 65 ASSERT(!object || object->isQuote());
61 return static_cast<RenderQuote*>(object); 66 return static_cast<RenderQuote*>(object);
62 } 67 }
63 68
64 // This will catch anyone doing an unnecessary cast. 69 // This will catch anyone doing an unnecessary cast.
65 void toRenderQuote(const RenderQuote*); 70 void toRenderQuote(const RenderQuote*);
66 71
67 } // namespace WebCore 72 } // namespace WebCore
68 73
69 #endif // RenderQuote_h 74 #endif // RenderQuote_h
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderObjectChildList.cpp ('k') | Source/WebCore/rendering/RenderRegion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698