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

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

Issue 10911104: Merge 124969 (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 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details. 12 * Library General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Library General Public License 14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to 15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA. 17 * Boston, MA 02110-1301, USA.
18 * 18 *
19 */ 19 */
20 20
21 #ifndef RenderQuote_h 21 #ifndef RenderQuote_h
22 #define RenderQuote_h 22 #define RenderQuote_h
23 23
24 #include "Document.h"
25 #include "QuotesData.h"
26 #include "RenderStyle.h"
24 #include "RenderStyleConstants.h" 27 #include "RenderStyleConstants.h"
25 #include "RenderText.h" 28 #include "RenderText.h"
26 29
27 namespace WebCore { 30 namespace WebCore {
28 31
29 class RenderQuote : public RenderText { 32 class RenderQuote : public RenderText {
30 public: 33 public:
31 RenderQuote(Document*, const QuoteType); 34 RenderQuote(Document*, const QuoteType);
32 virtual ~RenderQuote(); 35 virtual ~RenderQuote();
36 void attachQuote();
37 void detachQuote();
33 38
34 static void rendererSubtreeAttached(RenderObject*);
35 static void rendererRemovedFromTree(RenderObject*);
36 protected:
37 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
38 virtual void willBeDestroyed();
39 private: 39 private:
40 virtual const char* renderName() const; 40 virtual void willBeDestroyed() OVERRIDE;
41 virtual bool isQuote() const { return true; }; 41 virtual const char* renderName() const OVERRIDE { return "RenderQuote"; };
42 virtual PassRefPtr<StringImpl> originalText() const; 42 virtual bool isQuote() const OVERRIDE { return true; };
43 virtual void computePreferredLogicalWidths(float leadWidth); 43 virtual PassRefPtr<StringImpl> originalText() const OVERRIDE;
44 virtual void computePreferredLogicalWidths(float leadWidth) OVERRIDE;
45
44 const QuotesData* quotesData() const; 46 const QuotesData* quotesData() const;
47 void updateDepth();
45 48
46 QuoteType m_type; 49 QuoteType m_type;
47 int m_depth; 50 int m_depth;
48 RenderQuote* m_next; 51 RenderQuote* m_next;
49 RenderQuote* m_previous; 52 RenderQuote* m_previous;
50 void placeQuote(); 53 bool m_attached;
51 }; 54 };
52 55
53 inline RenderQuote* toRenderQuote(RenderObject* object) 56 inline RenderQuote* toRenderQuote(RenderObject* object)
54 { 57 {
55 ASSERT(!object || object->isQuote()); 58 ASSERT(!object || object->isQuote());
56 return static_cast<RenderQuote*>(object); 59 return static_cast<RenderQuote*>(object);
57 } 60 }
58 61
59 // This will catch anyone doing an unnecessary cast. 62 // This will catch anyone doing an unnecessary cast.
60 void toRenderQuote(const RenderQuote*); 63 void toRenderQuote(const RenderQuote*);
61 64
62 } // namespace WebCore 65 } // namespace WebCore
63 66
64 #endif // RenderQuote_h 67 #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