blob: ad18782017c8eb3032db6cba495908718a665256 [file] [log] [blame]
carol.szabo@nokia.comeaaf1992011-03-02 19:34:00 +00001/*
2 * Copyright (C) 2011 Nokia Inc. All rights reserved.
commit-queue@webkit.org3202ab12012-08-14 00:38:19 +00003 * Copyright (C) 2012 Google Inc. All rights reserved.
darin@apple.comf60da4e2013-05-09 19:24:05 +00004 * Copyright (C) 2013 Apple Inc. All rights reserved.
carol.szabo@nokia.comeaaf1992011-03-02 19:34:00 +00005 *
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.org46c0f522016-11-13 10:05:43 +000023#pragma once
carol.szabo@nokia.comeaaf1992011-03-02 19:34:00 +000024
mmaxfield@apple.com4ed117e2014-01-28 23:36:04 +000025#include "RenderInline.h"
carol.szabo@nokia.comeaaf1992011-03-02 19:34:00 +000026
27namespace WebCore {
28
mmaxfield@apple.com4ed117e2014-01-28 23:36:04 +000029class RenderQuote final : public RenderInline {
fpizlo@apple.comd03c5942017-11-07 19:21:52 +000030 WTF_MAKE_ISO_ALLOCATED(RenderQuote);
carol.szabo@nokia.comeaaf1992011-03-02 19:34:00 +000031public:
antti@apple.com454418f2016-04-25 19:49:23 +000032 RenderQuote(Document&, RenderStyle&&, QuoteType);
carol.szabo@nokia.comeaaf1992011-03-02 19:34:00 +000033 virtual ~RenderQuote();
darin@apple.comf60da4e2013-05-09 19:24:05 +000034
antti@apple.com89b8fff2017-12-16 19:07:55 +000035 void updateRenderer(RenderTreeBuilder&, RenderQuote* previousQuote);
esprehn@chromium.org52f5b9a2013-02-15 23:11:47 +000036
carol.szabo@nokia.comeaaf1992011-03-02 19:34:00 +000037private:
darin@apple.com11ff47c2016-03-04 16:47:55 +000038 const char* renderName() const override { return "RenderQuote"; }
39 bool isQuote() const override { return true; }
antti@apple.com68ce0eb2017-08-11 16:22:44 +000040 bool isOpen() const;
darin@apple.com11ff47c2016-03-04 16:47:55 +000041 void styleDidChange(StyleDifference, const RenderStyle*) override;
zalan@apple.comfacf99c2016-10-05 18:50:20 +000042 void insertedIntoTree() override;
darin@apple.com11ff47c2016-03-04 16:47:55 +000043 void willBeRemovedFromTree() override;
jchaffraix@webkit.org77285a42012-08-20 18:52:25 +000044
mmaxfield@apple.com4ed117e2014-01-28 23:36:04 +000045 String computeText() const;
antti@apple.com89b8fff2017-12-16 19:07:55 +000046 void updateTextRenderer(RenderTreeBuilder&);
commit-queue@webkit.orgbbef81f2012-08-02 22:50:52 +000047
zalan@apple.comae99ecb2015-02-05 16:50:44 +000048 const QuoteType m_type;
49 int m_depth { -1 };
mmaxfield@apple.com4ed117e2014-01-28 23:36:04 +000050 String m_text;
antti@apple.comc5034122017-08-09 07:36:45 +000051
52 bool m_needsTextUpdate { false };
carol.szabo@nokia.comeaaf1992011-03-02 19:34:00 +000053};
54
carol.szabo@nokia.comeaaf1992011-03-02 19:34:00 +000055} // namespace WebCore
56
cdumez@apple.comf85e2f62014-10-07 00:26:25 +000057SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderQuote, isQuote())