Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.h

Issue 2262973002: Switch override containing block sizes to use LayoutRareData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 ApplyNonScrollOverflowClip 54 ApplyNonScrollOverflowClip
55 }; 55 };
56 56
57 using SnapAreaSet = HashSet<const LayoutBox*>; 57 using SnapAreaSet = HashSet<const LayoutBox*>;
58 58
59 struct LayoutBoxRareData { 59 struct LayoutBoxRareData {
60 WTF_MAKE_NONCOPYABLE(LayoutBoxRareData); USING_FAST_MALLOC(LayoutBoxRareData ); 60 WTF_MAKE_NONCOPYABLE(LayoutBoxRareData); USING_FAST_MALLOC(LayoutBoxRareData );
61 public: 61 public:
62 LayoutBoxRareData() 62 LayoutBoxRareData()
63 : m_spannerPlaceholder(nullptr) 63 : m_spannerPlaceholder(nullptr)
64 , m_overrideLogicalContentWidth(-1)
64 , m_overrideLogicalContentHeight(-1) 65 , m_overrideLogicalContentHeight(-1)
65 , m_overrideLogicalContentWidth(-1) 66 , m_overrideContainingBlockContentLogicalWidth(-2)
67 , m_overrideContainingBlockContentLogicalHeight(-2)
66 , m_percentHeightContainer(nullptr) 68 , m_percentHeightContainer(nullptr)
67 , m_snapContainer(nullptr) 69 , m_snapContainer(nullptr)
68 , m_snapAreas(nullptr) 70 , m_snapAreas(nullptr)
69 { 71 {
70 } 72 }
71 73
72 // For spanners, the spanner placeholder that lays us out within the multico l container. 74 // For spanners, the spanner placeholder that lays us out within the multico l container.
73 LayoutMultiColumnSpannerPlaceholder* m_spannerPlaceholder; 75 LayoutMultiColumnSpannerPlaceholder* m_spannerPlaceholder;
74 76
77 LayoutUnit m_overrideLogicalContentWidth;
75 LayoutUnit m_overrideLogicalContentHeight; 78 LayoutUnit m_overrideLogicalContentHeight;
76 LayoutUnit m_overrideLogicalContentWidth; 79
80 // These two can be set to -1 to override the containing block size to be
81 // undefined, so we use -2 to indicate that no override has been set.
jfernandez 2016/08/22 14:56:03 I'm not sure whether we need such a difference bet
82 LayoutUnit m_overrideContainingBlockContentLogicalWidth;
83 LayoutUnit m_overrideContainingBlockContentLogicalHeight;
77 84
78 LayoutUnit m_pageLogicalOffset; 85 LayoutUnit m_pageLogicalOffset;
79 LayoutUnit m_paginationStrut; 86 LayoutUnit m_paginationStrut;
80 87
81 LayoutBlock* m_percentHeightContainer; 88 LayoutBlock* m_percentHeightContainer;
82 // For snap area, the owning snap container. 89 // For snap area, the owning snap container.
83 LayoutBox* m_snapContainer; 90 LayoutBox* m_snapContainer;
84 // For snap container, the descendant snap areas that contribute snap 91 // For snap container, the descendant snap areas that contribute snap
85 // points. 92 // points.
86 std::unique_ptr<SnapAreaSet> m_snapAreas; 93 std::unique_ptr<SnapAreaSet> m_snapAreas;
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 || breakValue == BreakLeft 1225 || breakValue == BreakLeft
1219 || breakValue == BreakPage 1226 || breakValue == BreakPage
1220 || breakValue == BreakRecto 1227 || breakValue == BreakRecto
1221 || breakValue == BreakRight 1228 || breakValue == BreakRight
1222 || breakValue == BreakVerso; 1229 || breakValue == BreakVerso;
1223 } 1230 }
1224 1231
1225 } // namespace blink 1232 } // namespace blink
1226 1233
1227 #endif // LayoutBox_h 1234 #endif // LayoutBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698