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

Side by Side Diff: Source/core/layout/LayoutObject.cpp

Issue 1109513002: [New Multicolumn] Don't enter child multicol contexts when processing object insertions / removals. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: code review: renderer -> layoutObject Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutMultiColumnFlowThread.cpp ('k') | no next file » | 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 return isHTMLHRElement(node()); 260 return isHTMLHRElement(node());
261 } 261 }
262 262
263 bool LayoutObject::isLegend() const 263 bool LayoutObject::isLegend() const
264 { 264 {
265 return isHTMLLegendElement(node()); 265 return isHTMLLegendElement(node());
266 } 266 }
267 267
268 void LayoutObject::setFlowThreadStateIncludingDescendants(FlowThreadState state) 268 void LayoutObject::setFlowThreadStateIncludingDescendants(FlowThreadState state)
269 { 269 {
270 for (LayoutObject *object = this; object; object = object->nextInPreOrder(th is)) { 270 LayoutObject* next;
271 for (LayoutObject *object = this; object; object = next) {
271 // If object is a fragmentation context it already updated the descendan ts flag accordingly. 272 // If object is a fragmentation context it already updated the descendan ts flag accordingly.
272 if (object->isLayoutFlowThread()) 273 if (object->isLayoutFlowThread()) {
274 next = object->nextInPreOrderAfterChildren(this);
273 continue; 275 continue;
276 }
277 next = object->nextInPreOrder(this);
274 ASSERT(state != object->flowThreadState()); 278 ASSERT(state != object->flowThreadState());
275 object->setFlowThreadState(state); 279 object->setFlowThreadState(state);
276 } 280 }
277 } 281 }
278 282
279 bool LayoutObject::requiresAnonymousTableWrappers(const LayoutObject* newChild) const 283 bool LayoutObject::requiresAnonymousTableWrappers(const LayoutObject* newChild) const
280 { 284 {
281 // Check should agree with: 285 // Check should agree with:
282 // CSS 2.1 Tables: 17.2.1 Anonymous table objects 286 // CSS 2.1 Tables: 17.2.1 Anonymous table objects
283 // http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes 287 // http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes
(...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after
2488 // doesn't have the flow thread in its containing block chain. We still need to notify the flow 2492 // doesn't have the flow thread in its containing block chain. We still need to notify the flow
2489 // thread when the renderer removed happens to be a spanner, so that we get rid of the spanner 2493 // thread when the renderer removed happens to be a spanner, so that we get rid of the spanner
2490 // placeholder, and column sets around the placeholder get merged. 2494 // placeholder, and column sets around the placeholder get merged.
2491 LayoutFlowThread* flowThread = isColumnSpanAll() ? parent()->flowThreadConta iningBlock() : flowThreadContainingBlock(); 2495 LayoutFlowThread* flowThread = isColumnSpanAll() ? parent()->flowThreadConta iningBlock() : flowThreadContainingBlock();
2492 removeFromLayoutFlowThreadRecursive(flowThread); 2496 removeFromLayoutFlowThreadRecursive(flowThread);
2493 } 2497 }
2494 2498
2495 void LayoutObject::removeFromLayoutFlowThreadRecursive(LayoutFlowThread* renderF lowThread) 2499 void LayoutObject::removeFromLayoutFlowThreadRecursive(LayoutFlowThread* renderF lowThread)
2496 { 2500 {
2497 if (const LayoutObjectChildList* children = virtualChildren()) { 2501 if (const LayoutObjectChildList* children = virtualChildren()) {
2498 for (LayoutObject* child = children->firstChild(); child; child = child- >nextSibling()) 2502 for (LayoutObject* child = children->firstChild(); child; child = child- >nextSibling()) {
2499 child->removeFromLayoutFlowThreadRecursive(renderFlowThread); 2503 if (child->isLayoutFlowThread())
2504 continue; // Don't descend into inner fragmentation contexts.
2505 child->removeFromLayoutFlowThreadRecursive(child->isLayoutFlowThread () ? toLayoutFlowThread(child) : renderFlowThread);
2506 }
2500 } 2507 }
2501 2508
2502 if (renderFlowThread && renderFlowThread != this) 2509 if (renderFlowThread && renderFlowThread != this)
2503 renderFlowThread->flowThreadDescendantWillBeRemoved(this); 2510 renderFlowThread->flowThreadDescendantWillBeRemoved(this);
2504 setFlowThreadState(NotInsideFlowThread); 2511 setFlowThreadState(NotInsideFlowThread);
2505 RELEASE_ASSERT(!spannerPlaceholder()); 2512 RELEASE_ASSERT(!spannerPlaceholder());
2506 } 2513 }
2507 2514
2508 void LayoutObject::destroyAndCleanupAnonymousWrappers() 2515 void LayoutObject::destroyAndCleanupAnonymousWrappers()
2509 { 2516 {
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
3256 { 3263 {
3257 if (object1) { 3264 if (object1) {
3258 const blink::LayoutObject* root = object1; 3265 const blink::LayoutObject* root = object1;
3259 while (root->parent()) 3266 while (root->parent())
3260 root = root->parent(); 3267 root = root->parent();
3261 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3268 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3262 } 3269 }
3263 } 3270 }
3264 3271
3265 #endif 3272 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutMultiColumnFlowThread.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698