blob: e44b2dfd66e9e7073047e96a8fb32b7c54dd10da [file] [log] [blame]
hyatt@apple.com56afe452012-03-19 20:59:10 +00001/*
2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
mjs@apple.com92047332014-03-15 04:08:27 +000016 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
hyatt@apple.com56afe452012-03-19 20:59:10 +000017 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
commit-queue@webkit.org46c0f522016-11-13 10:05:43 +000026#pragma once
hyatt@apple.com56afe452012-03-19 20:59:10 +000027
hyatt@apple.come0d2e0f2017-09-27 16:19:08 +000028#include "RenderFragmentContainer.h"
hyatt@apple.com56afe452012-03-19 20:59:10 +000029
30namespace WebCore {
31
hyatt@apple.com4e0bf862017-09-27 20:54:17 +000032class RenderFragmentedFlow;
hyatt@apple.com56afe452012-03-19 20:59:10 +000033
hyatt@apple.come0d2e0f2017-09-27 16:19:08 +000034// RenderFragmentContainerSet represents a set of regions that all have the same width and height. It is a "composite region box" that
hyatt@apple.com56afe452012-03-19 20:59:10 +000035// can be used to represent a single run of contiguous regions.
36//
37// By combining runs of same-size columns or pages into a single object, we significantly reduce the number of unique RenderObjects
38// required to represent those objects.
39//
40// This class is abstract and is only intended for use by renderers that generate anonymous runs of identical regions, i.e.,
41// columns and printing. RenderMultiColumnSet and RenderPageSet represent runs of columns and pages respectively.
42//
hyatt@apple.come0d2e0f2017-09-27 16:19:08 +000043// FIXME: For now we derive from RenderFragmentContainer, but this may change at some point.
hyatt@apple.com56afe452012-03-19 20:59:10 +000044
hyatt@apple.come0d2e0f2017-09-27 16:19:08 +000045class RenderFragmentContainerSet : public RenderFragmentContainer {
fpizlo@apple.comd03c5942017-11-07 19:21:52 +000046 WTF_MAKE_ISO_ALLOCATED(RenderFragmentContainerSet);
hyatt@apple.comc1c39032014-04-15 23:25:58 +000047public:
hyatt@apple.com4e0bf862017-09-27 20:54:17 +000048 void expandToEncompassFragmentedFlowContentsIfNeeded();
hyatt@apple.comc1c39032014-04-15 23:25:58 +000049
hyatt@apple.com98e65282013-02-21 02:02:24 +000050protected:
hyatt@apple.com4e0bf862017-09-27 20:54:17 +000051 RenderFragmentContainerSet(Document&, RenderStyle&&, RenderFragmentedFlow&);
hyatt@apple.com98e65282013-02-21 02:02:24 +000052
hyatt@apple.com56afe452012-03-19 20:59:10 +000053private:
hyatt@apple.com4e0bf862017-09-27 20:54:17 +000054 void installFragmentedFlow() final;
hyatt@apple.com6ccaec32012-08-21 18:15:39 +000055
darin@apple.com11ff47c2016-03-04 16:47:55 +000056 const char* renderName() const override = 0;
hyatt@apple.com07569c82012-08-31 15:47:04 +000057
hyatt@apple.come0d2e0f2017-09-27 16:19:08 +000058 bool isRenderFragmentContainerSet() const final { return true; }
hyatt@apple.com56afe452012-03-19 20:59:10 +000059};
60
61} // namespace WebCore