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 3442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3453 } | 3453 } |
3454 } | 3454 } |
3455 return logicalRight; | 3455 return logicalRight; |
3456 } | 3456 } |
3457 | 3457 |
3458 RenderBlock* RenderBlock::blockBeforeWithinSelectionRoot(LayoutSize& offset) con
st | 3458 RenderBlock* RenderBlock::blockBeforeWithinSelectionRoot(LayoutSize& offset) con
st |
3459 { | 3459 { |
3460 if (isSelectionRoot()) | 3460 if (isSelectionRoot()) |
3461 return 0; | 3461 return 0; |
3462 | 3462 |
3463 const RenderBox* object = this; | 3463 const RenderObject* object = this; |
3464 RenderObject* sibling; | 3464 RenderObject* sibling; |
3465 do { | 3465 do { |
3466 sibling = object->previousSibling(); | 3466 sibling = object->previousSibling(); |
3467 while (sibling && (!sibling->isRenderBlock() || toRenderBlock(sibling)->
isSelectionRoot())) | 3467 while (sibling && (!sibling->isRenderBlock() || toRenderBlock(sibling)->
isSelectionRoot())) |
3468 sibling = sibling->previousSibling(); | 3468 sibling = sibling->previousSibling(); |
3469 | 3469 |
3470 offset -= LayoutSize(object->logicalLeft(), object->logicalTop()); | 3470 offset -= LayoutSize(toRenderBlock(object)->logicalLeft(), toRenderBlock
(object)->logicalTop()); |
3471 object = object->parentBox(); | 3471 object = object->parent(); |
3472 } while (!sibling && object && object->isRenderBlock() && !toRenderBlock(obj
ect)->isSelectionRoot()); | 3472 } while (!sibling && object && object->isRenderBlock() && !toRenderBlock(obj
ect)->isSelectionRoot()); |
3473 | 3473 |
3474 if (!sibling) | 3474 if (!sibling) |
3475 return 0; | 3475 return 0; |
3476 | 3476 |
3477 RenderBlock* beforeBlock = toRenderBlock(sibling); | 3477 RenderBlock* beforeBlock = toRenderBlock(sibling); |
3478 | 3478 |
3479 offset += LayoutSize(beforeBlock->logicalLeft(), beforeBlock->logicalTop()); | 3479 offset += LayoutSize(beforeBlock->logicalLeft(), beforeBlock->logicalTop()); |
3480 | 3480 |
3481 RenderObject* child = beforeBlock->lastChild(); | 3481 RenderObject* child = beforeBlock->lastChild(); |
(...skipping 3910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7392 } | 7392 } |
7393 | 7393 |
7394 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) | 7394 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) |
7395 { | 7395 { |
7396 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->pi
xelSnappedX(), floatingObject->pixelSnappedY(), floatingObject->pixelSnappedMaxX
(), floatingObject->pixelSnappedMaxY()); | 7396 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->pi
xelSnappedX(), floatingObject->pixelSnappedY(), floatingObject->pixelSnappedMaxX
(), floatingObject->pixelSnappedMaxY()); |
7397 } | 7397 } |
7398 | 7398 |
7399 #endif | 7399 #endif |
7400 | 7400 |
7401 } // namespace WebCore | 7401 } // namespace WebCore |
OLD | NEW |