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 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 image->setImageResource(LayoutImageResourceStyleImage::create(const_
cast<StyleImage*>(styleImage))); | 173 image->setImageResource(LayoutImageResourceStyleImage::create(const_
cast<StyleImage*>(styleImage))); |
174 image->setIsGeneratedContent(); | 174 image->setIsGeneratedContent(); |
175 } else { | 175 } else { |
176 image->setImageResource(LayoutImageResource::create()); | 176 image->setImageResource(LayoutImageResource::create()); |
177 } | 177 } |
178 image->setStyleInternal(nullptr); | 178 image->setStyleInternal(nullptr); |
179 return image; | 179 return image; |
180 } | 180 } |
181 | 181 |
182 switch (style.display()) { | 182 switch (style.display()) { |
183 case NONE: | 183 case EDisplay::None: |
184 return nullptr; | 184 return nullptr; |
185 case INLINE: | 185 case EDisplay::Inline: |
186 return new LayoutInline(element); | 186 return new LayoutInline(element); |
187 case BLOCK: | 187 case EDisplay::Block: |
188 case INLINE_BLOCK: | 188 case EDisplay::InlineBlock: |
189 if (RuntimeEnabledFeatures::layoutNGEnabled()) | 189 if (RuntimeEnabledFeatures::layoutNGEnabled()) |
190 return new LayoutNGBlockFlow(element); | 190 return new LayoutNGBlockFlow(element); |
191 return new LayoutBlockFlow(element); | 191 return new LayoutBlockFlow(element); |
192 case LIST_ITEM: | 192 case EDisplay::ListItem: |
193 return new LayoutListItem(element); | 193 return new LayoutListItem(element); |
194 case TABLE: | 194 case EDisplay::Table: |
195 case INLINE_TABLE: | 195 case EDisplay::InlineTable: |
196 return new LayoutTable(element); | 196 return new LayoutTable(element); |
197 case TABLE_ROW_GROUP: | 197 case EDisplay::TableRowGroup: |
198 case TABLE_HEADER_GROUP: | 198 case EDisplay::TableHeaderGroup: |
199 case TABLE_FOOTER_GROUP: | 199 case EDisplay::TableFooterGroup: |
200 return new LayoutTableSection(element); | 200 return new LayoutTableSection(element); |
201 case TABLE_ROW: | 201 case EDisplay::TableRow: |
202 return new LayoutTableRow(element); | 202 return new LayoutTableRow(element); |
203 case TABLE_COLUMN_GROUP: | 203 case EDisplay::TableColumnGroup: |
204 case TABLE_COLUMN: | 204 case EDisplay::TableColumn: |
205 return new LayoutTableCol(element); | 205 return new LayoutTableCol(element); |
206 case TABLE_CELL: | 206 case EDisplay::TableCell: |
207 return new LayoutTableCell(element); | 207 return new LayoutTableCell(element); |
208 case TABLE_CAPTION: | 208 case EDisplay::TableCaption: |
209 return new LayoutTableCaption(element); | 209 return new LayoutTableCaption(element); |
210 case BOX: | 210 case EDisplay::Box: |
211 case INLINE_BOX: | 211 case EDisplay::InlineBox: |
212 return new LayoutDeprecatedFlexibleBox(*element); | 212 return new LayoutDeprecatedFlexibleBox(*element); |
213 case FLEX: | 213 case EDisplay::Flex: |
214 case INLINE_FLEX: | 214 case EDisplay::InlineFlex: |
215 return new LayoutFlexibleBox(element); | 215 return new LayoutFlexibleBox(element); |
216 case GRID: | 216 case EDisplay::Grid: |
217 case INLINE_GRID: | 217 case EDisplay::InlineGrid: |
218 return new LayoutGrid(element); | 218 return new LayoutGrid(element); |
219 } | 219 } |
220 | 220 |
221 ASSERT_NOT_REACHED(); | 221 ASSERT_NOT_REACHED(); |
222 return nullptr; | 222 return nullptr; |
223 } | 223 } |
224 | 224 |
225 LayoutObject::LayoutObject(Node* node) | 225 LayoutObject::LayoutObject(Node* node) |
226 : m_style(nullptr) | 226 : m_style(nullptr) |
227 , m_node(node) | 227 , m_node(node) |
(...skipping 3059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3287 const blink::LayoutObject* root = object1; | 3287 const blink::LayoutObject* root = object1; |
3288 while (root->parent()) | 3288 while (root->parent()) |
3289 root = root->parent(); | 3289 root = root->parent(); |
3290 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3290 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3291 } else { | 3291 } else { |
3292 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3292 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
3293 } | 3293 } |
3294 } | 3294 } |
3295 | 3295 |
3296 #endif | 3296 #endif |
OLD | NEW |