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 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1798 children()->removeChildNode(this, blockRunIn); | 1798 children()->removeChildNode(this, blockRunIn); |
1799 | 1799 |
1800 // Create an inline. | 1800 // Create an inline. |
1801 Node* runInNode = blockRunIn->node(); | 1801 Node* runInNode = blockRunIn->node(); |
1802 RenderInline* inlineRunIn = new (renderArena()) RenderInline(runInNode ? run
InNode : document()); | 1802 RenderInline* inlineRunIn = new (renderArena()) RenderInline(runInNode ? run
InNode : document()); |
1803 inlineRunIn->setStyle(blockRunIn->style()); | 1803 inlineRunIn->setStyle(blockRunIn->style()); |
1804 | 1804 |
1805 // Move the nodes from the old child to the new child | 1805 // Move the nodes from the old child to the new child |
1806 for (RenderObject* runInChild = blockRunIn->firstChild(); runInChild;) { | 1806 for (RenderObject* runInChild = blockRunIn->firstChild(); runInChild;) { |
1807 RenderObject* nextSibling = runInChild->nextSibling(); | 1807 RenderObject* nextSibling = runInChild->nextSibling(); |
1808 blockRunIn->children()->removeChildNode(blockRunIn, runInChild, false); | 1808 blockRunIn->children()->removeChildNode(blockRunIn, runInChild); |
1809 inlineRunIn->addChild(runInChild); // Use addChild instead of appendChil
dNode since it handles correct placement of the children relative to :after-gene
rated content. | 1809 inlineRunIn->addChild(runInChild); // Use addChild instead of appendChil
dNode since it handles correct placement of the children relative to :after-gene
rated content. |
1810 runInChild = nextSibling; | 1810 runInChild = nextSibling; |
1811 } | 1811 } |
1812 | 1812 |
1813 // Now insert the new child under |currBlock|. Use addChild instead of inser
tChildNode since it handles correct placement of the children, esp where we cann
ot insert | 1813 // Now insert the new child under |currBlock|. Use addChild instead of inser
tChildNode since it handles correct placement of the children, esp where we cann
ot insert |
1814 // anything before the first child. e.g. details tag. See https://bugs.webki
t.org/show_bug.cgi?id=58228. | 1814 // anything before the first child. e.g. details tag. See https://bugs.webki
t.org/show_bug.cgi?id=58228. |
1815 currBlock->addChild(inlineRunIn, currBlock->firstChild()); | 1815 currBlock->addChild(inlineRunIn, currBlock->firstChild()); |
1816 | 1816 |
1817 // If the run-in had an element, we need to set the new renderer. | 1817 // If the run-in had an element, we need to set the new renderer. |
1818 if (runInNode) | 1818 if (runInNode) |
(...skipping 5417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7236 } | 7236 } |
7237 | 7237 |
7238 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) | 7238 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) |
7239 { | 7239 { |
7240 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x(
), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); | 7240 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x(
), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); |
7241 } | 7241 } |
7242 | 7242 |
7243 #endif | 7243 #endif |
7244 | 7244 |
7245 } // namespace WebCore | 7245 } // namespace WebCore |
OLD | NEW |