| 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 17 matching lines...) Expand all Loading... |
| 28 #include "core/style/QuotesData.h" | 28 #include "core/style/QuotesData.h" |
| 29 | 29 |
| 30 namespace blink { | 30 namespace blink { |
| 31 | 31 |
| 32 class Document; | 32 class Document; |
| 33 class LayoutTextFragment; | 33 class LayoutTextFragment; |
| 34 | 34 |
| 35 class LayoutQuote final : public LayoutInline { | 35 class LayoutQuote final : public LayoutInline { |
| 36 public: | 36 public: |
| 37 LayoutQuote(Document*, const QuoteType); | 37 LayoutQuote(Document*, const QuoteType); |
| 38 virtual ~LayoutQuote(); | 38 ~LayoutQuote() override; |
| 39 void attachQuote(); | 39 void attachQuote(); |
| 40 | 40 |
| 41 virtual const char* name() const override { return "LayoutQuote"; } | 41 const char* name() const override { return "LayoutQuote"; } |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 void detachQuote(); | 44 void detachQuote(); |
| 45 | 45 |
| 46 virtual void willBeDestroyed() override; | 46 void willBeDestroyed() override; |
| 47 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectQuote || LayoutInline::isOfType(type); } | 47 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectQuote || LayoutInline::isOfType(type); } |
| 48 virtual void styleDidChange(StyleDifference, const ComputedStyle*) override; | 48 void styleDidChange(StyleDifference, const ComputedStyle*) override; |
| 49 virtual void willBeRemovedFromTree() override; | 49 void willBeRemovedFromTree() override; |
| 50 | 50 |
| 51 String computeText() const; | 51 String computeText() const; |
| 52 void updateText(); | 52 void updateText(); |
| 53 const QuotesData* quotesData() const; | 53 const QuotesData* quotesData() const; |
| 54 void updateDepth(); | 54 void updateDepth(); |
| 55 bool isAttached() { return m_attached; } | 55 bool isAttached() { return m_attached; } |
| 56 | 56 |
| 57 LayoutTextFragment* findFragmentChild() const; | 57 LayoutTextFragment* findFragmentChild() const; |
| 58 | 58 |
| 59 QuoteType m_type; | 59 QuoteType m_type; |
| 60 int m_depth; | 60 int m_depth; |
| 61 LayoutQuote* m_next; | 61 LayoutQuote* m_next; |
| 62 LayoutQuote* m_previous; | 62 LayoutQuote* m_previous; |
| 63 bool m_attached; | 63 bool m_attached; |
| 64 String m_text; | 64 String m_text; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutQuote, isQuote()); | 67 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutQuote, isQuote()); |
| 68 | 68 |
| 69 } // namespace blink | 69 } // namespace blink |
| 70 | 70 |
| 71 #endif // LayoutQuote_h | 71 #endif // LayoutQuote_h |
| OLD | NEW |