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

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

Issue 1156303012: Use the container() chain when locating the containing flow thread. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « LayoutTests/fast/multicol/dynamic/block-with-abspos-video-becomes-multicol-crash-expected.txt ('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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 return flowThread; 669 return flowThread;
670 } 670 }
671 671
672 // Not in the middle of layout so have to find the thread the slow way. 672 // Not in the middle of layout so have to find the thread the slow way.
673 LayoutObject* curr = const_cast<LayoutObject*>(this); 673 LayoutObject* curr = const_cast<LayoutObject*>(this);
674 while (curr) { 674 while (curr) {
675 if (curr->isSVG() && !curr->isSVGRoot()) 675 if (curr->isSVG() && !curr->isSVGRoot())
676 return nullptr; 676 return nullptr;
677 if (curr->isLayoutFlowThread()) 677 if (curr->isLayoutFlowThread())
678 return toLayoutFlowThread(curr); 678 return toLayoutFlowThread(curr);
679 LayoutObject* containingBlock = curr->containingBlock(); 679 LayoutObject* container = curr->container();
680 curr = curr->parent(); 680 curr = curr->parent();
681 while (curr != containingBlock) { 681 while (curr != container) {
682 if (curr->isLayoutFlowThread()) { 682 if (curr->isLayoutFlowThread()) {
683 // The nearest ancestor flow thread isn't in our containing bloc k chain. Then we 683 // The nearest ancestor flow thread isn't in our containing bloc k chain. Then we
684 // aren't really part of any flow thread, and we should stop loo king. This happens 684 // aren't really part of any flow thread, and we should stop loo king. This happens
685 // when there are out-of-flow objects or column spanners. 685 // when there are out-of-flow objects or column spanners.
686 return nullptr; 686 return nullptr;
687 } 687 }
688 curr = curr->parent(); 688 curr = curr->parent();
689 } 689 }
690 } 690 }
691 return nullptr; 691 return nullptr;
(...skipping 2608 matching lines...) Expand 10 before | Expand all | Expand 10 after
3300 const blink::LayoutObject* root = object1; 3300 const blink::LayoutObject* root = object1;
3301 while (root->parent()) 3301 while (root->parent())
3302 root = root->parent(); 3302 root = root->parent();
3303 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3303 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3304 } else { 3304 } else {
3305 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3305 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3306 } 3306 }
3307 } 3307 }
3308 3308
3309 #endif 3309 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/multicol/dynamic/block-with-abspos-video-becomes-multicol-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698