| OLD | NEW |
| 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 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 namespace WebCore { | 30 namespace WebCore { |
| 31 | 31 |
| 32 class Document; | 32 class Document; |
| 33 | 33 |
| 34 class RenderQuote : public RenderText { | 34 class RenderQuote : public RenderText { |
| 35 public: | 35 public: |
| 36 RenderQuote(Document*, const QuoteType); | 36 RenderQuote(Document*, const QuoteType); |
| 37 virtual ~RenderQuote(); | 37 virtual ~RenderQuote(); |
| 38 void attachQuote(); | 38 void attachQuote(); |
| 39 |
| 40 virtual void updateText() OVERRIDE; |
| 41 |
| 42 private: |
| 39 void detachQuote(); | 43 void detachQuote(); |
| 40 | 44 |
| 41 private: | |
| 42 virtual void willBeDestroyed() OVERRIDE; | 45 virtual void willBeDestroyed() OVERRIDE; |
| 43 virtual const char* renderName() const OVERRIDE { return "RenderQuote"; }; | 46 virtual const char* renderName() const OVERRIDE { return "RenderQuote"; }; |
| 44 virtual bool isQuote() const OVERRIDE { return true; }; | 47 virtual bool isQuote() const OVERRIDE { return true; }; |
| 45 virtual PassRefPtr<StringImpl> originalText() const OVERRIDE; | 48 virtual PassRefPtr<StringImpl> originalText() const OVERRIDE; |
| 46 | 49 virtual void styleDidChange(StyleDifference, const RenderStyle*) OVERRIDE; |
| 47 virtual void updateText() OVERRIDE; | |
| 48 virtual void computePreferredLogicalWidths(float leadWidth) OVERRIDE; | |
| 49 | 50 |
| 50 // We don't override insertedIntoTree to call attachQuote() as it would be a
ttached | 51 // We don't override insertedIntoTree to call attachQuote() as it would be a
ttached |
| 51 // too early and get the wrong depth since generated content is inserted int
o anonymous | 52 // too early and get the wrong depth since generated content is inserted int
o anonymous |
| 52 // renderers before going into the main render tree. Once we can ensure that
insertIntoTree, | 53 // renderers before going into the main render tree. Once we can ensure that
insertIntoTree, |
| 53 // is called on an attached tree, we should override it here. | 54 // is called on an attached tree, we should override it here. |
| 54 | 55 |
| 55 virtual void willBeRemovedFromTree() OVERRIDE; | 56 virtual void willBeRemovedFromTree() OVERRIDE; |
| 56 | 57 |
| 57 const QuotesData* quotesData() const; | 58 const QuotesData* quotesData() const; |
| 58 void updateDepth(); | 59 void updateDepth(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 70 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isQuote()); | 71 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isQuote()); |
| 71 return static_cast<RenderQuote*>(object); | 72 return static_cast<RenderQuote*>(object); |
| 72 } | 73 } |
| 73 | 74 |
| 74 // This will catch anyone doing an unnecessary cast. | 75 // This will catch anyone doing an unnecessary cast. |
| 75 void toRenderQuote(const RenderQuote*); | 76 void toRenderQuote(const RenderQuote*); |
| 76 | 77 |
| 77 } // namespace WebCore | 78 } // namespace WebCore |
| 78 | 79 |
| 79 #endif // RenderQuote_h | 80 #endif // RenderQuote_h |
| OLD | NEW |