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

Side by Side Diff: Source/core/rendering/RenderObject.cpp

Issue 53373003: Remove display:run-in as per https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/_tHSX… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix test Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/RenderObjectChildList.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * (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
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() == RUN_IN) 175 if (style->display() == COMPACT)
176 UseCounter::count(doc, UseCounter::CSSDisplayRunIn);
177 else if (style->display() == COMPACT)
178 UseCounter::count(doc, UseCounter::CSSDisplayCompact); 176 UseCounter::count(doc, UseCounter::CSSDisplayCompact);
179 177
180 switch (style->display()) { 178 switch (style->display()) {
181 case NONE: 179 case NONE:
182 return 0; 180 return 0;
183 case INLINE: 181 case INLINE:
184 return new RenderInline(element); 182 return new RenderInline(element);
185 case BLOCK: 183 case BLOCK:
186 case INLINE_BLOCK: 184 case INLINE_BLOCK:
187 case RUN_IN:
188 case COMPACT: 185 case COMPACT:
189 if ((!style->hasAutoColumnCount() || !style->hasAutoColumnWidth()) && do c.regionBasedColumnsEnabled()) 186 if ((!style->hasAutoColumnCount() || !style->hasAutoColumnWidth()) && do c.regionBasedColumnsEnabled())
190 return new RenderMultiColumnBlock(element); 187 return new RenderMultiColumnBlock(element);
191 return new RenderBlockFlow(element); 188 return new RenderBlockFlow(element);
192 case LIST_ITEM: 189 case LIST_ITEM:
193 return new RenderListItem(element); 190 return new RenderListItem(element);
194 case TABLE: 191 case TABLE:
195 case INLINE_TABLE: 192 case INLINE_TABLE:
196 return new RenderTable(element); 193 return new RenderTable(element);
197 case TABLE_ROW_GROUP: 194 case TABLE_ROW_GROUP:
(...skipping 3098 matching lines...) Expand 10 before | Expand all | Expand 10 after
3296 3293
3297 // We only create "generated" child renderers like one for first-letter if: 3294 // We only create "generated" child renderers like one for first-letter if:
3298 // - the firstLetterBlock can have children in the DOM and 3295 // - the firstLetterBlock can have children in the DOM and
3299 // - the block doesn't have any special assumption on its text children. 3296 // - the block doesn't have any special assumption on its text children.
3300 // This correctly prevents form controls from having such renderers. 3297 // This correctly prevents form controls from having such renderers.
3301 bool RenderObject::canHaveGeneratedChildren() const 3298 bool RenderObject::canHaveGeneratedChildren() const
3302 { 3299 {
3303 return canHaveChildren(); 3300 return canHaveChildren();
3304 } 3301 }
3305 3302
3306 bool RenderObject::canBeReplacedWithInlineRunIn() const
3307 {
3308 return true;
3309 }
3310
3311 void RenderObject::setNeedsBoundariesUpdate() 3303 void RenderObject::setNeedsBoundariesUpdate()
3312 { 3304 {
3313 if (RenderObject* renderer = parent()) 3305 if (RenderObject* renderer = parent())
3314 renderer->setNeedsBoundariesUpdate(); 3306 renderer->setNeedsBoundariesUpdate();
3315 } 3307 }
3316 3308
3317 FloatRect RenderObject::objectBoundingBox() const 3309 FloatRect RenderObject::objectBoundingBox() const
3318 { 3310 {
3319 ASSERT_NOT_REACHED(); 3311 ASSERT_NOT_REACHED();
3320 return FloatRect(); 3312 return FloatRect();
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
3393 { 3385 {
3394 if (object1) { 3386 if (object1) {
3395 const WebCore::RenderObject* root = object1; 3387 const WebCore::RenderObject* root = object1;
3396 while (root->parent()) 3388 while (root->parent())
3397 root = root->parent(); 3389 root = root->parent();
3398 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3390 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3399 } 3391 }
3400 } 3392 }
3401 3393
3402 #endif 3394 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/RenderObjectChildList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698