| 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 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 if (prev->childrenInline() != next->childrenInline()) { | 1162 if (prev->childrenInline() != next->childrenInline()) { |
| 1163 RenderBlock* inlineChildrenBlock = prev->childrenInline() ? prevBloc
k : nextBlock; | 1163 RenderBlock* inlineChildrenBlock = prev->childrenInline() ? prevBloc
k : nextBlock; |
| 1164 RenderBlock* blockChildrenBlock = prev->childrenInline() ? nextBlock
: prevBlock; | 1164 RenderBlock* blockChildrenBlock = prev->childrenInline() ? nextBlock
: prevBlock; |
| 1165 | 1165 |
| 1166 // Place the inline children block inside of the block children bloc
k instead of deleting it. | 1166 // Place the inline children block inside of the block children bloc
k instead of deleting it. |
| 1167 // In order to reuse it, we have to reset it to just be a generic an
onymous block. Make sure | 1167 // In order to reuse it, we have to reset it to just be a generic an
onymous block. Make sure |
| 1168 // to clear out inherited column properties by just making a new sty
le, and to also clear the | 1168 // to clear out inherited column properties by just making a new sty
le, and to also clear the |
| 1169 // column span flag if it is set. | 1169 // column span flag if it is set. |
| 1170 ASSERT(!inlineChildrenBlock->continuation()); | 1170 ASSERT(!inlineChildrenBlock->continuation()); |
| 1171 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWith
Display(style(), BLOCK); | 1171 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWith
Display(style(), BLOCK); |
| 1172 inlineChildrenBlock->setStyle(newStyle); |
| 1172 children()->removeChildNode(this, inlineChildrenBlock, inlineChildre
nBlock->hasLayer()); | 1173 children()->removeChildNode(this, inlineChildrenBlock, inlineChildre
nBlock->hasLayer()); |
| 1173 inlineChildrenBlock->setStyle(newStyle); | |
| 1174 | 1174 |
| 1175 // Now just put the inlineChildrenBlock inside the blockChildrenBloc
k. | 1175 // Now just put the inlineChildrenBlock inside the blockChildrenBloc
k. |
| 1176 blockChildrenBlock->children()->insertChildNode(blockChildrenBlock,
inlineChildrenBlock, prev == inlineChildrenBlock ? blockChildrenBlock->firstChil
d() : 0, | 1176 blockChildrenBlock->children()->insertChildNode(blockChildrenBlock,
inlineChildrenBlock, prev == inlineChildrenBlock ? blockChildrenBlock->firstChil
d() : 0, |
| 1177 inlineChildrenBlock-
>hasLayer() || blockChildrenBlock->hasLayer()); | 1177 inlineChildrenBlock-
>hasLayer() || blockChildrenBlock->hasLayer()); |
| 1178 next->setNeedsLayoutAndPrefWidthsRecalc(); | 1178 next->setNeedsLayoutAndPrefWidthsRecalc(); |
| 1179 | 1179 |
| 1180 // inlineChildrenBlock got reparented to blockChildrenBlock, so it i
s no longer a child | 1180 // inlineChildrenBlock got reparented to blockChildrenBlock, so it i
s no longer a child |
| 1181 // of "this". we null out prev or next so that is not used later in
the function. | 1181 // of "this". we null out prev or next so that is not used later in
the function. |
| 1182 if (inlineChildrenBlock == prevBlock) | 1182 if (inlineChildrenBlock == prevBlock) |
| 1183 prev = 0; | 1183 prev = 0; |
| (...skipping 6076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7260 } | 7260 } |
| 7261 | 7261 |
| 7262 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) | 7262 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) |
| 7263 { | 7263 { |
| 7264 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->fr
ameRect().pixelSnappedX(), floatingObject->frameRect().pixelSnappedY(), floating
Object->frameRect().pixelSnappedMaxX(), floatingObject->frameRect().pixelSnapped
MaxY()); | 7264 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->fr
ameRect().pixelSnappedX(), floatingObject->frameRect().pixelSnappedY(), floating
Object->frameRect().pixelSnappedMaxX(), floatingObject->frameRect().pixelSnapped
MaxY()); |
| 7265 } | 7265 } |
| 7266 | 7266 |
| 7267 #endif | 7267 #endif |
| 7268 | 7268 |
| 7269 } // namespace WebCore | 7269 } // namespace WebCore |
| OLD | NEW |