| 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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 RenderBoxModelObject* RenderInline::continuationBefore(RenderObject* beforeChild
) | 273 RenderBoxModelObject* RenderInline::continuationBefore(RenderObject* beforeChild
) |
| 274 { | 274 { |
| 275 if (beforeChild && beforeChild->parent() == this) | 275 if (beforeChild && beforeChild->parent() == this) |
| 276 return this; | 276 return this; |
| 277 | 277 |
| 278 RenderBoxModelObject* curr = nextContinuation(this); | 278 RenderBoxModelObject* curr = nextContinuation(this); |
| 279 RenderBoxModelObject* nextToLast = this; | 279 RenderBoxModelObject* nextToLast = this; |
| 280 RenderBoxModelObject* last = this; | 280 RenderBoxModelObject* last = this; |
| 281 while (curr) { | 281 while (curr) { |
| 282 if (beforeChild && beforeChild->parent() == curr) { | 282 if (beforeChild && beforeChild->parent() == curr) { |
| 283 if (curr->firstChild() == beforeChild) | 283 if (curr->slowFirstChild() == beforeChild) |
| 284 return last; | 284 return last; |
| 285 return curr; | 285 return curr; |
| 286 } | 286 } |
| 287 | 287 |
| 288 nextToLast = last; | 288 nextToLast = last; |
| 289 last = curr; | 289 last = curr; |
| 290 curr = nextContinuation(curr); | 290 curr = nextContinuation(curr); |
| 291 } | 291 } |
| 292 | 292 |
| 293 if (!beforeChild && !last->firstChild()) | 293 if (!beforeChild && !last->slowFirstChild()) |
| 294 return nextToLast; | 294 return nextToLast; |
| 295 return last; | 295 return last; |
| 296 } | 296 } |
| 297 | 297 |
| 298 void RenderInline::addChildIgnoringContinuation(RenderObject* newChild, RenderOb
ject* beforeChild) | 298 void RenderInline::addChildIgnoringContinuation(RenderObject* newChild, RenderOb
ject* beforeChild) |
| 299 { | 299 { |
| 300 // Make sure we don't append things after :after-generated content if we hav
e it. | 300 // Make sure we don't append things after :after-generated content if we hav
e it. |
| 301 if (!beforeChild && isAfterContent(lastChild())) | 301 if (!beforeChild && isAfterContent(lastChild())) |
| 302 beforeChild = lastChild(); | 302 beforeChild = lastChild(); |
| 303 | 303 |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 // This inline actually has a line box. We must have clicked in the bor
der/padding of one of these boxes. We | 805 // This inline actually has a line box. We must have clicked in the bor
der/padding of one of these boxes. We |
| 806 // should try to find a result by asking our containing block. | 806 // should try to find a result by asking our containing block. |
| 807 return cb->positionForPoint(point); | 807 return cb->positionForPoint(point); |
| 808 } | 808 } |
| 809 | 809 |
| 810 // Translate the coords from the pre-anonymous block to the post-anonymous b
lock. | 810 // Translate the coords from the pre-anonymous block to the post-anonymous b
lock. |
| 811 LayoutPoint parentBlockPoint = cb->location() + point; | 811 LayoutPoint parentBlockPoint = cb->location() + point; |
| 812 RenderBoxModelObject* c = continuation(); | 812 RenderBoxModelObject* c = continuation(); |
| 813 while (c) { | 813 while (c) { |
| 814 RenderBox* contBlock = c->isInline() ? c->containingBlock() : toRenderBl
ock(c); | 814 RenderBox* contBlock = c->isInline() ? c->containingBlock() : toRenderBl
ock(c); |
| 815 if (c->isInline() || c->firstChild()) | 815 if (c->isInline() || c->slowFirstChild()) |
| 816 return c->positionForPoint(parentBlockPoint - contBlock->locationOff
set()); | 816 return c->positionForPoint(parentBlockPoint - contBlock->locationOff
set()); |
| 817 c = toRenderBlock(c)->inlineElementContinuation(); | 817 c = toRenderBlock(c)->inlineElementContinuation(); |
| 818 } | 818 } |
| 819 | 819 |
| 820 return RenderBoxModelObject::positionForPoint(point); | 820 return RenderBoxModelObject::positionForPoint(point); |
| 821 } | 821 } |
| 822 | 822 |
| 823 namespace { | 823 namespace { |
| 824 | 824 |
| 825 class LinesBoundingBoxGeneratorContext { | 825 class LinesBoundingBoxGeneratorContext { |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1573 container = this; | 1573 container = this; |
| 1574 | 1574 |
| 1575 FloatPoint absPos = container->localToAbsolute(); | 1575 FloatPoint absPos = container->localToAbsolute(); |
| 1576 region.bounds.setX(absPos.x() + region.bounds.x()); | 1576 region.bounds.setX(absPos.x() + region.bounds.x()); |
| 1577 region.bounds.setY(absPos.y() + region.bounds.y()); | 1577 region.bounds.setY(absPos.y() + region.bounds.y()); |
| 1578 | 1578 |
| 1579 regions.append(region); | 1579 regions.append(region); |
| 1580 } | 1580 } |
| 1581 | 1581 |
| 1582 } // namespace WebCore | 1582 } // namespace WebCore |
| OLD | NEW |