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

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

Issue 10916347: Merge 127381 (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) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 2 * Copyright (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2007, 2008, 2009 Apple 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 30 matching lines...) Expand all
41 static void rendererStyleChanged(RenderObject*, const RenderStyle* oldStyle, const RenderStyle* newStyle); 41 static void rendererStyleChanged(RenderObject*, const RenderStyle* oldStyle, const RenderStyle* newStyle);
42 42
43 protected: 43 protected:
44 virtual void willBeDestroyed(); 44 virtual void willBeDestroyed();
45 45
46 private: 46 private:
47 virtual const char* renderName() const; 47 virtual const char* renderName() const;
48 virtual bool isCounter() const; 48 virtual bool isCounter() const;
49 virtual PassRefPtr<StringImpl> originalText() const; 49 virtual PassRefPtr<StringImpl> originalText() const;
50 50
51 virtual void updateText() OVERRIDE;
51 virtual void computePreferredLogicalWidths(float leadWidth); 52 virtual void computePreferredLogicalWidths(float leadWidth);
52 53
53 // Removes the reference to the CounterNode associated with this renderer. 54 // Removes the reference to the CounterNode associated with this renderer.
54 // This is used to cause a counter display update when the CounterNode tree changes. 55 // This is used to cause a counter display update when the CounterNode tree changes.
55 void invalidate(); 56 void invalidate();
56 57
57 CounterContent m_counter; 58 CounterContent m_counter;
58 CounterNode* m_counterNode; 59 CounterNode* m_counterNode;
59 RenderCounter* m_nextForSameCounter; 60 RenderCounter* m_nextForSameCounter;
60 friend class CounterNode; 61 friend class CounterNode;
61 }; 62 };
62 63
63 inline RenderCounter* toRenderCounter(RenderObject* object) 64 inline RenderCounter* toRenderCounter(RenderObject* object)
64 { 65 {
65 ASSERT(!object || object->isCounter()); 66 ASSERT(!object || object->isCounter());
66 return static_cast<RenderCounter*>(object); 67 return static_cast<RenderCounter*>(object);
67 } 68 }
68 69
69 // This will catch anyone doing an unnecessary cast. 70 // This will catch anyone doing an unnecessary cast.
70 void toRenderCounter(const RenderCounter*); 71 void toRenderCounter(const RenderCounter*);
71 72
72 } // namespace WebCore 73 } // namespace WebCore
73 74
74 #ifndef NDEBUG 75 #ifndef NDEBUG
75 // Outside the WebCore namespace for ease of invocation from gdb. 76 // Outside the WebCore namespace for ease of invocation from gdb.
76 void showCounterRendererTree(const WebCore::RenderObject*, const char* counterNa me = 0); 77 void showCounterRendererTree(const WebCore::RenderObject*, const char* counterNa me = 0);
77 #endif 78 #endif
78 79
79 #endif // RenderCounter_h 80 #endif // RenderCounter_h
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderBlockLineLayout.cpp ('k') | Source/WebCore/rendering/RenderCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698