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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 return new RenderRubyAsInline(element); | 165 return new RenderRubyAsInline(element); |
166 else if (style->display() == BLOCK) | 166 else if (style->display() == BLOCK) |
167 return new RenderRubyAsBlock(element); | 167 return new RenderRubyAsBlock(element); |
168 } | 168 } |
169 // treat <rt> as ruby text ONLY if it still has its default treatment of blo
ck | 169 // treat <rt> as ruby text ONLY if it still has its default treatment of blo
ck |
170 if (element->hasTagName(rtTag) && style->display() == BLOCK) | 170 if (element->hasTagName(rtTag) && style->display() == BLOCK) |
171 return new RenderRubyText(element); | 171 return new RenderRubyText(element); |
172 if (RuntimeEnabledFeatures::cssRegionsEnabled() && style->isDisplayRegionTyp
e() && style->hasFlowFrom() && doc.renderView()) | 172 if (RuntimeEnabledFeatures::cssRegionsEnabled() && style->isDisplayRegionTyp
e() && style->hasFlowFrom() && doc.renderView()) |
173 return new RenderRegion(element, 0); | 173 return new RenderRegion(element, 0); |
174 | 174 |
175 if (style->display() == COMPACT) | |
176 UseCounter::count(doc, UseCounter::CSSDisplayCompact); | |
177 | |
178 switch (style->display()) { | 175 switch (style->display()) { |
179 case NONE: | 176 case NONE: |
180 return 0; | 177 return 0; |
181 case INLINE: | 178 case INLINE: |
182 return new RenderInline(element); | 179 return new RenderInline(element); |
183 case BLOCK: | 180 case BLOCK: |
184 case INLINE_BLOCK: | 181 case INLINE_BLOCK: |
185 case COMPACT: | |
186 if ((!style->hasAutoColumnCount() || !style->hasAutoColumnWidth()) && do
c.regionBasedColumnsEnabled()) | 182 if ((!style->hasAutoColumnCount() || !style->hasAutoColumnWidth()) && do
c.regionBasedColumnsEnabled()) |
187 return new RenderMultiColumnBlock(element); | 183 return new RenderMultiColumnBlock(element); |
188 return new RenderBlockFlow(element); | 184 return new RenderBlockFlow(element); |
189 case LIST_ITEM: | 185 case LIST_ITEM: |
190 return new RenderListItem(element); | 186 return new RenderListItem(element); |
191 case TABLE: | 187 case TABLE: |
192 case INLINE_TABLE: | 188 case INLINE_TABLE: |
193 return new RenderTable(element); | 189 return new RenderTable(element); |
194 case TABLE_ROW_GROUP: | 190 case TABLE_ROW_GROUP: |
195 case TABLE_HEADER_GROUP: | 191 case TABLE_HEADER_GROUP: |
(...skipping 3189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3385 { | 3381 { |
3386 if (object1) { | 3382 if (object1) { |
3387 const WebCore::RenderObject* root = object1; | 3383 const WebCore::RenderObject* root = object1; |
3388 while (root->parent()) | 3384 while (root->parent()) |
3389 root = root->parent(); | 3385 root = root->parent(); |
3390 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3386 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3391 } | 3387 } |
3392 } | 3388 } |
3393 | 3389 |
3394 #endif | 3390 #endif |
OLD | NEW |