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 * (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. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 171 image->setIsGeneratedContent(); | 171 image->setIsGeneratedContent(); |
| 172 } else { | 172 } else { |
| 173 image->setImageResource(LayoutImageResource::create()); | 173 image->setImageResource(LayoutImageResource::create()); |
| 174 } | 174 } |
| 175 image->setStyleInternal(nullptr); | 175 image->setStyleInternal(nullptr); |
| 176 return image; | 176 return image; |
| 177 } | 177 } |
| 178 | 178 |
| 179 switch (style.display()) { | 179 switch (style.display()) { |
| 180 case EDisplay::None: | 180 case EDisplay::None: |
| 181 case EDisplay::Contents: | |
| 182 return nullptr; | 181 return nullptr; |
| 183 case EDisplay::Inline: | 182 case EDisplay::Inline: |
| 184 return new LayoutInline(element); | 183 return new LayoutInline(element); |
| 184 case EDisplay::Contents: | |
| 185 if (LIKELY(!element->isSVGElement())) | |
|
rune
2017/02/08 22:28:18
Shouldn't this be testing isSVGSVGElement? Also, i
| |
| 186 return nullptr; | |
| 187 // else fallthrough | |
|
rune
2017/02/08 22:28:18
Just "// fallthrough".
| |
| 185 case EDisplay::Block: | 188 case EDisplay::Block: |
| 186 case EDisplay::FlowRoot: | 189 case EDisplay::FlowRoot: |
| 187 case EDisplay::InlineBlock: | 190 case EDisplay::InlineBlock: |
| 188 if (RuntimeEnabledFeatures::layoutNGEnabled()) | 191 if (RuntimeEnabledFeatures::layoutNGEnabled()) |
| 189 return new LayoutNGBlockFlow(element); | 192 return new LayoutNGBlockFlow(element); |
| 190 return new LayoutBlockFlow(element); | 193 return new LayoutBlockFlow(element); |
| 191 case EDisplay::ListItem: | 194 case EDisplay::ListItem: |
| 192 return new LayoutListItem(element); | 195 return new LayoutListItem(element); |
| 193 case EDisplay::Table: | 196 case EDisplay::Table: |
| 194 case EDisplay::InlineTable: | 197 case EDisplay::InlineTable: |
| (...skipping 3304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3499 const blink::LayoutObject* root = object1; | 3502 const blink::LayoutObject* root = object1; |
| 3500 while (root->parent()) | 3503 while (root->parent()) |
| 3501 root = root->parent(); | 3504 root = root->parent(); |
| 3502 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3505 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3503 } else { | 3506 } else { |
| 3504 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3507 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
| 3505 } | 3508 } |
| 3506 } | 3509 } |
| 3507 | 3510 |
| 3508 #endif | 3511 #endif |
| OLD | NEW |