/* * Copyright (C) 2012 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_LAYOUT_MULTI_COLUMN_SET_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_LAYOUT_MULTI_COLUMN_SET_H_ #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/layout/layout_multi_column_flow_thread.h" #include "third_party/blink/renderer/core/layout/multi_column_fragmentainer_group.h" #include "third_party/blink/renderer/platform/wtf/vector.h" namespace blink { // A set of columns in a multicol container. A column set is inserted as an // anonymous child of the actual multicol container (i.e. the layoutObject whose // style computes to non-auto column-count and/or column-width), next to the // flow thread. There'll be one column set for each contiguous run of column // content. The only thing that can interrupt a contiguous run of column content // is a column spanner, which means that if there are no spanners, there'll // only be one column set. // // Since a spanner interrupts an otherwise contiguous run of column content, // inserting one may result in the creation of additional new column sets. A // placeholder for the spanning layoutObject has to be placed in between the // column sets that come before and after the spanner, if there's actually // column content both before and after the spanner. // // A column set has no children on its own, but is merely used to slice a // portion of the tall "single-column" flow thread into actual columns visually, // to convert from flow thread coordinates to visual ones. It is in charge of // both positioning columns correctly relatively to the parent multicol // container, and to calculate the correct translation for each column's // contents, and to paint any rules between them. LayoutMultiColumnSet objects // are used for painting, hit testing, and any other type of operation that // requires mapping from flow thread coordinates to visual coordinates. // // Columns are normally laid out in the inline progression direction, but if the // multicol container is inside another fragmentation context (e.g. paged media, // or an another multicol container), we may need to group the columns, so // that we get one MultiColumnFragmentainerGroup for each outer fragmentainer // (page / column) that the inner multicol container lives in. Each // fragmentainer group has its own column height, but the column height is // uniform within a group. class CORE_EXPORT LayoutMultiColumnSet final : public LayoutBlockFlow { … }; template <> struct DowncastTraits<LayoutMultiColumnSet> { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_LAYOUT_MULTI_COLUMN_SET_H_