Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 194 explicit LayoutBox(ContainerNode*); | 194 explicit LayoutBox(ContainerNode*); |
| 195 | 195 |
| 196 PaintLayerType layerTypeRequired() const override; | 196 PaintLayerType layerTypeRequired() const override; |
| 197 | 197 |
| 198 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const ov erride; | 198 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const ov erride; |
| 199 | 199 |
| 200 virtual bool backgroundShouldAlwaysBeClipped() const { return false; } | 200 virtual bool backgroundShouldAlwaysBeClipped() const { return false; } |
| 201 | 201 |
| 202 // Use this with caution! No type checking is done! | 202 // Use this with caution! No type checking is done! |
| 203 LayoutBox* firstChildBox() const; | 203 LayoutBox* firstChildBox() const; |
| 204 LayoutBox* firstInFlowChildBox() const; | |
| 205 LayoutBox* lastChildBox() const; | 204 LayoutBox* lastChildBox() const; |
| 206 | 205 |
| 207 int pixelSnappedWidth() const { return m_frameRect.pixelSnappedWidth(); } | 206 int pixelSnappedWidth() const { return m_frameRect.pixelSnappedWidth(); } |
| 208 int pixelSnappedHeight() const { return m_frameRect.pixelSnappedHeight(); } | 207 int pixelSnappedHeight() const { return m_frameRect.pixelSnappedHeight(); } |
| 209 | 208 |
| 210 void setX(LayoutUnit x) | 209 void setX(LayoutUnit x) |
| 211 { | 210 { |
| 212 if (x == m_frameRect.x()) | 211 if (x == m_frameRect.x()) |
| 213 return; | 212 return; |
| 214 m_frameRect.setX(x); | 213 m_frameRect.setX(x); |
| (...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1176 inline LayoutBox* LayoutBox::parentBox() const | 1175 inline LayoutBox* LayoutBox::parentBox() const |
| 1177 { | 1176 { |
| 1178 return toLayoutBox(parent()); | 1177 return toLayoutBox(parent()); |
| 1179 } | 1178 } |
| 1180 | 1179 |
| 1181 inline LayoutBox* LayoutBox::firstChildBox() const | 1180 inline LayoutBox* LayoutBox::firstChildBox() const |
| 1182 { | 1181 { |
| 1183 return toLayoutBox(slowFirstChild()); | 1182 return toLayoutBox(slowFirstChild()); |
| 1184 } | 1183 } |
| 1185 | 1184 |
| 1186 inline LayoutBox* LayoutBox::firstInFlowChildBox() const | |
|
jfernandez
2016/07/22 11:26:37
Why this removal ?
Manuel Rego
2016/07/22 13:05:37
Because it was introduced to be able to call
perce
| |
| 1187 { | |
| 1188 LayoutBox* child = firstChildBox(); | |
| 1189 while (child && child->isOutOfFlowPositioned()) | |
| 1190 child = child->nextSiblingBox(); | |
| 1191 return child; | |
| 1192 } | |
| 1193 | |
| 1194 inline LayoutBox* LayoutBox::lastChildBox() const | 1185 inline LayoutBox* LayoutBox::lastChildBox() const |
| 1195 { | 1186 { |
| 1196 return toLayoutBox(slowLastChild()); | 1187 return toLayoutBox(slowLastChild()); |
| 1197 } | 1188 } |
| 1198 | 1189 |
| 1199 inline LayoutBox* LayoutBox::previousSiblingMultiColumnBox() const | 1190 inline LayoutBox* LayoutBox::previousSiblingMultiColumnBox() const |
| 1200 { | 1191 { |
| 1201 ASSERT(isLayoutMultiColumnSpannerPlaceholder() || isLayoutMultiColumnSet()); | 1192 ASSERT(isLayoutMultiColumnSpannerPlaceholder() || isLayoutMultiColumnSet()); |
| 1202 LayoutBox* previousBox = previousSiblingBox(); | 1193 LayoutBox* previousBox = previousSiblingBox(); |
| 1203 if (previousBox->isLayoutFlowThread()) | 1194 if (previousBox->isLayoutFlowThread()) |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 1232 || breakValue == BreakLeft | 1223 || breakValue == BreakLeft |
| 1233 || breakValue == BreakPage | 1224 || breakValue == BreakPage |
| 1234 || breakValue == BreakRecto | 1225 || breakValue == BreakRecto |
| 1235 || breakValue == BreakRight | 1226 || breakValue == BreakRight |
| 1236 || breakValue == BreakVerso; | 1227 || breakValue == BreakVerso; |
| 1237 } | 1228 } |
| 1238 | 1229 |
| 1239 } // namespace blink | 1230 } // namespace blink |
| 1240 | 1231 |
| 1241 #endif // LayoutBox_h | 1232 #endif // LayoutBox_h |
| OLD | NEW |