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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 | 602 |
603 // See if we have the thread cached because we're in the middle of layout. | 603 // See if we have the thread cached because we're in the middle of layout. |
604 if (LayoutState* layoutState = view()->layoutState()) { | 604 if (LayoutState* layoutState = view()->layoutState()) { |
605 if (LayoutFlowThread* flowThread = layoutState->flowThread()) | 605 if (LayoutFlowThread* flowThread = layoutState->flowThread()) |
606 return flowThread; | 606 return flowThread; |
607 } | 607 } |
608 | 608 |
609 // Not in the middle of layout so have to find the thread the slow way. | 609 // Not in the middle of layout so have to find the thread the slow way. |
610 LayoutObject* curr = const_cast<LayoutObject*>(this); | 610 LayoutObject* curr = const_cast<LayoutObject*>(this); |
611 while (curr) { | 611 while (curr) { |
| 612 if (curr->isSVG() && !curr->isSVGRoot()) |
| 613 return nullptr; |
612 if (curr->isLayoutFlowThread()) | 614 if (curr->isLayoutFlowThread()) |
613 return toLayoutFlowThread(curr); | 615 return toLayoutFlowThread(curr); |
614 LayoutObject* containingBlock = curr->containingBlock(); | 616 LayoutObject* containingBlock = curr->containingBlock(); |
615 curr = curr->parent(); | 617 curr = curr->parent(); |
616 while (curr != containingBlock) { | 618 while (curr != containingBlock) { |
617 if (curr->isLayoutFlowThread()) { | 619 if (curr->isLayoutFlowThread()) { |
618 // The nearest ancestor flow thread isn't in our containing bloc
k chain. Then we | 620 // The nearest ancestor flow thread isn't in our containing bloc
k chain. Then we |
619 // aren't really part of any flow thread, and we should stop loo
king. This happens | 621 // aren't really part of any flow thread, and we should stop loo
king. This happens |
620 // when there are out-of-flow objects or column spanners. | 622 // when there are out-of-flow objects or column spanners. |
621 return nullptr; | 623 return nullptr; |
(...skipping 2698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3320 { | 3322 { |
3321 if (object1) { | 3323 if (object1) { |
3322 const blink::LayoutObject* root = object1; | 3324 const blink::LayoutObject* root = object1; |
3323 while (root->parent()) | 3325 while (root->parent()) |
3324 root = root->parent(); | 3326 root = root->parent(); |
3325 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3327 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3326 } | 3328 } |
3327 } | 3329 } |
3328 | 3330 |
3329 #endif | 3331 #endif |
OLD | NEW |