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) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 } | 673 } |
674 | 674 |
675 void LayoutBlock::collapseAnonymousBlockChild(LayoutBlock* parent, LayoutBlock*
child) | 675 void LayoutBlock::collapseAnonymousBlockChild(LayoutBlock* parent, LayoutBlock*
child) |
676 { | 676 { |
677 // It's possible that this block's destruction may have been triggered by th
e | 677 // It's possible that this block's destruction may have been triggered by th
e |
678 // child's removal. Just bail if the anonymous child block is already being | 678 // child's removal. Just bail if the anonymous child block is already being |
679 // destroyed. See crbug.com/282088 | 679 // destroyed. See crbug.com/282088 |
680 if (child->beingDestroyed()) | 680 if (child->beingDestroyed()) |
681 return; | 681 return; |
682 parent->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInva
lidationReason::ChildAnonymousBlockChanged); | 682 parent->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInva
lidationReason::ChildAnonymousBlockChanged); |
| 683 |
| 684 child->moveAllChildrenTo(parent, child->nextSibling(), child->hasLayer()); |
683 parent->setChildrenInline(child->childrenInline()); | 685 parent->setChildrenInline(child->childrenInline()); |
684 | 686 |
685 child->moveAllChildrenTo(parent, child->nextSibling(), child->hasLayer()); | |
686 parent->children()->removeChildNode(parent, child, child->hasLayer()); | 687 parent->children()->removeChildNode(parent, child, child->hasLayer()); |
687 child->destroy(); | 688 child->destroy(); |
688 } | 689 } |
689 | 690 |
690 static inline bool shouldMakeChildrenInline(const LayoutBlock* block) | 691 static inline bool shouldMakeChildrenInline(const LayoutBlock* block) |
691 { | 692 { |
692 if (!block->isLayoutBlockFlow()) | 693 if (!block->isLayoutBlockFlow()) |
693 return false; | 694 return false; |
694 LayoutObject* child = block->firstChild(); | 695 LayoutObject* child = block->firstChild(); |
695 while (child) { | 696 while (child) { |
(...skipping 2246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2942 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const | 2943 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const |
2943 { | 2944 { |
2944 showLayoutObject(); | 2945 showLayoutObject(); |
2945 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2946 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
2946 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2947 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
2947 } | 2948 } |
2948 | 2949 |
2949 #endif | 2950 #endif |
2950 | 2951 |
2951 } // namespace blink | 2952 } // namespace blink |
OLD | NEW |