hyatt@apple.com | 56afe45 | 2012-03-19 20:59:10 +0000 | [diff] [blame] | 1 | /* |
| 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.com | 9204733 | 2014-03-15 04:08:27 +0000 | [diff] [blame] | 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
hyatt@apple.com | 56afe45 | 2012-03-19 20:59:10 +0000 | [diff] [blame] | 17 | * 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.org | 46c0f52 | 2016-11-13 10:05:43 +0000 | [diff] [blame] | 26 | #pragma once |
hyatt@apple.com | 56afe45 | 2012-03-19 20:59:10 +0000 | [diff] [blame] | 27 | |
| 28 | #include "RenderRegion.h" |
| 29 | #include "RenderBoxRegionInfo.h" |
| 30 | |
| 31 | namespace WebCore { |
| 32 | |
| 33 | class RenderFlowThread; |
| 34 | |
| 35 | // RenderRegionSet represents a set of regions that all have the same width and height. It is a "composite region box" that |
| 36 | // can be used to represent a single run of contiguous regions. |
| 37 | // |
| 38 | // By combining runs of same-size columns or pages into a single object, we significantly reduce the number of unique RenderObjects |
| 39 | // required to represent those objects. |
| 40 | // |
| 41 | // This class is abstract and is only intended for use by renderers that generate anonymous runs of identical regions, i.e., |
| 42 | // columns and printing. RenderMultiColumnSet and RenderPageSet represent runs of columns and pages respectively. |
| 43 | // |
| 44 | // FIXME: For now we derive from RenderRegion, but this may change at some point. |
| 45 | |
| 46 | class RenderRegionSet : public RenderRegion { |
hyatt@apple.com | c1c3903 | 2014-04-15 23:25:58 +0000 | [diff] [blame] | 47 | public: |
| 48 | void expandToEncompassFlowThreadContentsIfNeeded(); |
| 49 | |
hyatt@apple.com | 98e6528 | 2013-02-21 02:02:24 +0000 | [diff] [blame] | 50 | protected: |
antti@apple.com | 454418f | 2016-04-25 19:49:23 +0000 | [diff] [blame] | 51 | RenderRegionSet(Document&, RenderStyle&&, RenderFlowThread&); |
hyatt@apple.com | 98e6528 | 2013-02-21 02:02:24 +0000 | [diff] [blame] | 52 | |
hyatt@apple.com | 56afe45 | 2012-03-19 20:59:10 +0000 | [diff] [blame] | 53 | private: |
darin@apple.com | 49cc03e | 2016-03-04 17:20:46 +0000 | [diff] [blame] | 54 | void installFlowThread() final; |
hyatt@apple.com | 6ccaec3 | 2012-08-21 18:15:39 +0000 | [diff] [blame] | 55 | |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame] | 56 | const char* renderName() const override = 0; |
hyatt@apple.com | 07569c8 | 2012-08-31 15:47:04 +0000 | [diff] [blame] | 57 | |
darin@apple.com | 49cc03e | 2016-03-04 17:20:46 +0000 | [diff] [blame] | 58 | bool isRenderRegionSet() const final { return true; } |
hyatt@apple.com | 56afe45 | 2012-03-19 20:59:10 +0000 | [diff] [blame] | 59 | }; |
| 60 | |
| 61 | } // namespace WebCore |