carol.szabo@nokia.com | eaaf199 | 2011-03-02 19:34:00 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 Nokia Inc. All rights reserved. |
commit-queue@webkit.org | 3202ab1 | 2012-08-14 00:38:19 +0000 | [diff] [blame] | 3 | * Copyright (C) 2012 Google Inc. All rights reserved. |
darin@apple.com | f60da4e | 2013-05-09 19:24:05 +0000 | [diff] [blame] | 4 | * Copyright (C) 2013 Apple Inc. All rights reserved. |
carol.szabo@nokia.com | eaaf199 | 2011-03-02 19:34:00 +0000 | [diff] [blame] | 5 | * |
| 6 | * This library is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU Library General Public |
| 8 | * License as published by the Free Software Foundation; either |
| 9 | * version 2 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This library is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * Library General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU Library General Public License |
| 17 | * along with this library; see the file COPYING.LIB. If not, write to |
| 18 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 | * Boston, MA 02110-1301, USA. |
| 20 | * |
| 21 | */ |
| 22 | |
commit-queue@webkit.org | 46c0f52 | 2016-11-13 10:05:43 +0000 | [diff] [blame] | 23 | #pragma once |
carol.szabo@nokia.com | eaaf199 | 2011-03-02 19:34:00 +0000 | [diff] [blame] | 24 | |
mmaxfield@apple.com | 4ed117e | 2014-01-28 23:36:04 +0000 | [diff] [blame] | 25 | #include "RenderInline.h" |
carol.szabo@nokia.com | eaaf199 | 2011-03-02 19:34:00 +0000 | [diff] [blame] | 26 | |
| 27 | namespace WebCore { |
| 28 | |
mmaxfield@apple.com | 4ed117e | 2014-01-28 23:36:04 +0000 | [diff] [blame] | 29 | class RenderQuote final : public RenderInline { |
fpizlo@apple.com | d03c594 | 2017-11-07 19:21:52 +0000 | [diff] [blame] | 30 | WTF_MAKE_ISO_ALLOCATED(RenderQuote); |
carol.szabo@nokia.com | eaaf199 | 2011-03-02 19:34:00 +0000 | [diff] [blame] | 31 | public: |
antti@apple.com | 454418f | 2016-04-25 19:49:23 +0000 | [diff] [blame] | 32 | RenderQuote(Document&, RenderStyle&&, QuoteType); |
carol.szabo@nokia.com | eaaf199 | 2011-03-02 19:34:00 +0000 | [diff] [blame] | 33 | virtual ~RenderQuote(); |
darin@apple.com | f60da4e | 2013-05-09 19:24:05 +0000 | [diff] [blame] | 34 | |
antti@apple.com | 89b8fff | 2017-12-16 19:07:55 +0000 | [diff] [blame] | 35 | void updateRenderer(RenderTreeBuilder&, RenderQuote* previousQuote); |
esprehn@chromium.org | 52f5b9a | 2013-02-15 23:11:47 +0000 | [diff] [blame] | 36 | |
carol.szabo@nokia.com | eaaf199 | 2011-03-02 19:34:00 +0000 | [diff] [blame] | 37 | private: |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame] | 38 | const char* renderName() const override { return "RenderQuote"; } |
| 39 | bool isQuote() const override { return true; } |
antti@apple.com | 68ce0eb | 2017-08-11 16:22:44 +0000 | [diff] [blame] | 40 | bool isOpen() const; |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame] | 41 | void styleDidChange(StyleDifference, const RenderStyle*) override; |
zalan@apple.com | facf99c | 2016-10-05 18:50:20 +0000 | [diff] [blame] | 42 | void insertedIntoTree() override; |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame] | 43 | void willBeRemovedFromTree() override; |
jchaffraix@webkit.org | 77285a4 | 2012-08-20 18:52:25 +0000 | [diff] [blame] | 44 | |
mmaxfield@apple.com | 4ed117e | 2014-01-28 23:36:04 +0000 | [diff] [blame] | 45 | String computeText() const; |
antti@apple.com | 89b8fff | 2017-12-16 19:07:55 +0000 | [diff] [blame] | 46 | void updateTextRenderer(RenderTreeBuilder&); |
commit-queue@webkit.org | bbef81f | 2012-08-02 22:50:52 +0000 | [diff] [blame] | 47 | |
zalan@apple.com | ae99ecb | 2015-02-05 16:50:44 +0000 | [diff] [blame] | 48 | const QuoteType m_type; |
| 49 | int m_depth { -1 }; |
mmaxfield@apple.com | 4ed117e | 2014-01-28 23:36:04 +0000 | [diff] [blame] | 50 | String m_text; |
antti@apple.com | c503412 | 2017-08-09 07:36:45 +0000 | [diff] [blame] | 51 | |
| 52 | bool m_needsTextUpdate { false }; |
carol.szabo@nokia.com | eaaf199 | 2011-03-02 19:34:00 +0000 | [diff] [blame] | 53 | }; |
| 54 | |
carol.szabo@nokia.com | eaaf199 | 2011-03-02 19:34:00 +0000 | [diff] [blame] | 55 | } // namespace WebCore |
| 56 | |
cdumez@apple.com | f85e2f6 | 2014-10-07 00:26:25 +0000 | [diff] [blame] | 57 | SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderQuote, isQuote()) |