| 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 ASSERT(isFloatingOrPositioned()); | 216 ASSERT(isFloatingOrPositioned()); |
| 217 | 217 |
| 218 if (documentBeingDestroyed()) | 218 if (documentBeingDestroyed()) |
| 219 return; | 219 return; |
| 220 | 220 |
| 221 if (isFloating()) { | 221 if (isFloating()) { |
| 222 RenderBlock* parentBlock = 0; | 222 RenderBlock* parentBlock = 0; |
| 223 for (RenderObject* curr = parent(); curr && !curr->isRenderView(); curr
= curr->parent()) { | 223 for (RenderObject* curr = parent(); curr && !curr->isRenderView(); curr
= curr->parent()) { |
| 224 if (curr->isRenderBlock()) { | 224 if (curr->isRenderBlock()) { |
| 225 RenderBlock* currBlock = toRenderBlock(curr); | 225 RenderBlock* currBlock = toRenderBlock(curr); |
| 226 if (currBlock->containsFloat(this)) | 226 if (!parentBlock || currBlock->containsFloat(this)) |
| 227 parentBlock = currBlock; | 227 parentBlock = currBlock; |
| 228 } | 228 } |
| 229 } | 229 } |
| 230 | 230 |
| 231 if (parentBlock) { | 231 if (parentBlock) { |
| 232 RenderObject* parent = parentBlock->parent(); | 232 RenderObject* parent = parentBlock->parent(); |
| 233 if (parent && parent->isFlexibleBox()) | 233 if (parent && parent->isFlexibleBox()) |
| 234 parentBlock = toRenderBlock(parent); | 234 parentBlock = toRenderBlock(parent); |
| 235 | 235 |
| 236 parentBlock->markAllDescendantsWithFloatsForLayout(this, false); | 236 parentBlock->markAllDescendantsWithFloatsForLayout(this, false); |
| (...skipping 3199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3436 RenderBlock* containerBlock = containingBlock(); | 3436 RenderBlock* containerBlock = containingBlock(); |
| 3437 if (!containerBlock || containerBlock == this) | 3437 if (!containerBlock || containerBlock == this) |
| 3438 return locationOffset(); | 3438 return locationOffset(); |
| 3439 | 3439 |
| 3440 IntRect rect(frameRect()); | 3440 IntRect rect(frameRect()); |
| 3441 containerBlock->flipForWritingMode(rect); // FIXME: This is wrong if we are
an absolutely positioned object enclosed by a relative-positioned inline. | 3441 containerBlock->flipForWritingMode(rect); // FIXME: This is wrong if we are
an absolutely positioned object enclosed by a relative-positioned inline. |
| 3442 return IntSize(rect.x(), rect.y()); | 3442 return IntSize(rect.x(), rect.y()); |
| 3443 } | 3443 } |
| 3444 | 3444 |
| 3445 } // namespace WebCore | 3445 } // namespace WebCore |
| OLD | NEW |