/src/mozilla-central/layout/generic/ColumnSetWrapperFrame.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #include "ColumnSetWrapperFrame.h" |
8 | | |
9 | | using namespace mozilla; |
10 | | |
11 | | nsBlockFrame* |
12 | | NS_NewColumnSetWrapperFrame(nsIPresShell* aPresShell, |
13 | | ComputedStyle* aStyle, |
14 | | nsFrameState aStateFlags) |
15 | 0 | { |
16 | 0 | ColumnSetWrapperFrame* frame = new (aPresShell) ColumnSetWrapperFrame(aStyle); |
17 | 0 |
|
18 | 0 | // CSS Multi-column level 1 section 2: A multi-column container |
19 | 0 | // establishes a new block formatting context, as per CSS 2.1 section |
20 | 0 | // 9.4.1. |
21 | 0 | frame->AddStateBits(aStateFlags | NS_BLOCK_FORMATTING_CONTEXT_STATE_BITS); |
22 | 0 | return frame; |
23 | 0 | } |
24 | | |
25 | | NS_IMPL_FRAMEARENA_HELPERS(ColumnSetWrapperFrame) |
26 | | |
27 | 0 | NS_QUERYFRAME_HEAD(ColumnSetWrapperFrame) |
28 | 0 | NS_QUERYFRAME_ENTRY(ColumnSetWrapperFrame) |
29 | 0 | NS_QUERYFRAME_TAIL_INHERITING(nsBlockFrame) |
30 | | |
31 | | ColumnSetWrapperFrame::ColumnSetWrapperFrame(ComputedStyle* aStyle) |
32 | | : nsBlockFrame(aStyle, kClassID) |
33 | 0 | { |
34 | 0 | } |
35 | | |
36 | | #ifdef DEBUG_FRAME_DUMP |
37 | | nsresult |
38 | | ColumnSetWrapperFrame::GetFrameName(nsAString& aResult) const |
39 | | { |
40 | | return MakeFrameName(NS_LITERAL_STRING("ColumnSetWrapper"), aResult); |
41 | | } |
42 | | #endif |
43 | | |
44 | | // Disallow any append, insert, or remove operations after building the |
45 | | // column hierarchy since any change to the column hierarchy in the column |
46 | | // sub-tree need to be re-created. |
47 | | void |
48 | | ColumnSetWrapperFrame::AppendFrames(ChildListID aListID, |
49 | | nsFrameList& aFrameList) |
50 | 0 | { |
51 | 0 | MOZ_ASSERT_UNREACHABLE("Unsupported operation!"); |
52 | 0 | nsBlockFrame::AppendFrames(aListID, aFrameList); |
53 | 0 | } |
54 | | |
55 | | void |
56 | | ColumnSetWrapperFrame::InsertFrames(ChildListID aListID, |
57 | | nsIFrame* aPrevFrame, |
58 | | nsFrameList& aFrameList) |
59 | 0 | { |
60 | 0 | MOZ_ASSERT_UNREACHABLE("Unsupported operation!"); |
61 | 0 | nsBlockFrame::InsertFrames(aListID, aPrevFrame, aFrameList); |
62 | 0 | } |
63 | | |
64 | | void |
65 | | ColumnSetWrapperFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) |
66 | 0 | { |
67 | 0 | MOZ_ASSERT_UNREACHABLE("Unsupported operation!"); |
68 | 0 | nsBlockFrame::RemoveFrame(aListID, aOldFrame); |
69 | 0 | } |