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

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

Issue 584033002: [New Multicolumn] Add support for column-span:all (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix ref in test. Tables don't do subpixel, and that made a difference on Windows and Mac. Created 6 years, 2 months 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
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/RenderPagedFlowThread.h » ('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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 return !isTable(); 315 return !isTable();
316 else if (newChild->isTableSection()) 316 else if (newChild->isTableSection())
317 return !isTable(); 317 return !isTable();
318 else if (newChild->isTableRow()) 318 else if (newChild->isTableRow())
319 return !isTableSection(); 319 return !isTableSection();
320 else if (newChild->isTableCell()) 320 else if (newChild->isTableCell())
321 return !isTableRow(); 321 return !isTableRow();
322 return false; 322 return false;
323 } 323 }
324 324
325 bool RenderObject::isValidColumnSpanAll() const
326 {
327 ASSERT(style()->columnSpan() == ColumnSpanAll);
328 RenderFlowThread* flowThread = flowThreadContainingBlock();
329 return flowThread && flowThread->isColumnSpanner(this);
330 }
331
325 void RenderObject::addChild(RenderObject* newChild, RenderObject* beforeChild) 332 void RenderObject::addChild(RenderObject* newChild, RenderObject* beforeChild)
326 { 333 {
327 ASSERT(isAllowedToModifyRenderTreeStructure(document())); 334 ASSERT(isAllowedToModifyRenderTreeStructure(document()));
328 335
329 RenderObjectChildList* children = virtualChildren(); 336 RenderObjectChildList* children = virtualChildren();
330 ASSERT(children); 337 ASSERT(children);
331 if (!children) 338 if (!children)
332 return; 339 return;
333 340
334 if (requiresAnonymousTableWrappers(newChild)) { 341 if (requiresAnonymousTableWrappers(newChild)) {
(...skipping 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 // that needs to be drawn and layer visibility optimization can't be used 2369 // that needs to be drawn and layer visibility optimization can't be used
2363 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V ISIBLE && !hasLayer()) { 2370 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V ISIBLE && !hasLayer()) {
2364 if (!layer) 2371 if (!layer)
2365 layer = parent()->enclosingLayer(); 2372 layer = parent()->enclosingLayer();
2366 if (layer) 2373 if (layer)
2367 layer->dirtyVisibleContentStatus(); 2374 layer->dirtyVisibleContentStatus();
2368 } 2375 }
2369 2376
2370 if (!isFloating() && parent()->childrenInline()) 2377 if (!isFloating() && parent()->childrenInline())
2371 parent()->dirtyLinesFromChangedChild(this); 2378 parent()->dirtyLinesFromChangedChild(this);
2379
2380 if (RenderFlowThread* flowThread = parent()->flowThreadContainingBlock())
2381 flowThread->flowThreadDescendantInserted(this);
2372 } 2382 }
2373 2383
2374 void RenderObject::willBeRemovedFromTree() 2384 void RenderObject::willBeRemovedFromTree()
2375 { 2385 {
2376 // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removal s which would need to be fixed first. 2386 // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removal s which would need to be fixed first.
2377 2387
2378 // If we remove a visible child from an invisible parent, we don't know the layer visibility any more. 2388 // If we remove a visible child from an invisible parent, we don't know the layer visibility any more.
2379 RenderLayer* layer = 0; 2389 RenderLayer* layer = 0;
2380 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V ISIBLE && !hasLayer()) { 2390 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V ISIBLE && !hasLayer()) {
2381 layer = parent()->enclosingLayer(); 2391 layer = parent()->enclosingLayer();
(...skipping 30 matching lines...) Expand all
2412 removeFromRenderFlowThreadRecursive(flowThreadContainingBlock()); 2422 removeFromRenderFlowThreadRecursive(flowThreadContainingBlock());
2413 } 2423 }
2414 2424
2415 void RenderObject::removeFromRenderFlowThreadRecursive(RenderFlowThread* renderF lowThread) 2425 void RenderObject::removeFromRenderFlowThreadRecursive(RenderFlowThread* renderF lowThread)
2416 { 2426 {
2417 if (const RenderObjectChildList* children = virtualChildren()) { 2427 if (const RenderObjectChildList* children = virtualChildren()) {
2418 for (RenderObject* child = children->firstChild(); child; child = child- >nextSibling()) 2428 for (RenderObject* child = children->firstChild(); child; child = child- >nextSibling())
2419 child->removeFromRenderFlowThreadRecursive(renderFlowThread); 2429 child->removeFromRenderFlowThreadRecursive(renderFlowThread);
2420 } 2430 }
2421 2431
2432 if (renderFlowThread && renderFlowThread != this)
2433 renderFlowThread->flowThreadDescendantWillBeRemoved(this);
2422 setFlowThreadState(NotInsideFlowThread); 2434 setFlowThreadState(NotInsideFlowThread);
2423 } 2435 }
2424 2436
2425 void RenderObject::destroyAndCleanupAnonymousWrappers() 2437 void RenderObject::destroyAndCleanupAnonymousWrappers()
2426 { 2438 {
2427 // If the tree is destroyed, there is no need for a clean-up phase. 2439 // If the tree is destroyed, there is no need for a clean-up phase.
2428 if (documentBeingDestroyed()) { 2440 if (documentBeingDestroyed()) {
2429 destroy(); 2441 destroy();
2430 return; 2442 return;
2431 } 2443 }
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
3141 { 3153 {
3142 if (object1) { 3154 if (object1) {
3143 const blink::RenderObject* root = object1; 3155 const blink::RenderObject* root = object1;
3144 while (root->parent()) 3156 while (root->parent())
3145 root = root->parent(); 3157 root = root->parent();
3146 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3158 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3147 } 3159 }
3148 } 3160 }
3149 3161
3150 #endif 3162 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/RenderPagedFlowThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698