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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 // block box holding block children. | 507 // block box holding block children. |
508 bool childInline = newChild->isInline(); | 508 bool childInline = newChild->isInline(); |
509 bool bcpInline = beforeChildParent->isInline(); | 509 bool bcpInline = beforeChildParent->isInline(); |
510 bool flowInline = flow->isInline(); | 510 bool flowInline = flow->isInline(); |
511 | 511 |
512 if (flow == beforeChildParent) | 512 if (flow == beforeChildParent) |
513 return flow->addChildIgnoringContinuation(newChild, beforeChild); | 513 return flow->addChildIgnoringContinuation(newChild, beforeChild); |
514 else { | 514 else { |
515 // The goal here is to match up if we can, so that we can coalesce and c
reate the | 515 // The goal here is to match up if we can, so that we can coalesce and c
reate the |
516 // minimal # of continuations needed for the inline. | 516 // minimal # of continuations needed for the inline. |
517 if (childInline == bcpInline) | 517 if (childInline == bcpInline || (beforeChild && beforeChild->isInline())
) |
518 return beforeChildParent->addChildIgnoringContinuation(newChild, bef
oreChild); | 518 return beforeChildParent->addChildIgnoringContinuation(newChild, bef
oreChild); |
519 else if (flowInline == childInline) | 519 if (flowInline == childInline) |
520 return flow->addChildIgnoringContinuation(newChild, 0); // Just trea
t like an append. | 520 return flow->addChildIgnoringContinuation(newChild, 0); // Just trea
t like an append. |
521 else | 521 return beforeChildParent->addChildIgnoringContinuation(newChild, beforeC
hild); |
522 return beforeChildParent->addChildIgnoringContinuation(newChild, bef
oreChild); | |
523 } | 522 } |
524 } | 523 } |
525 | 524 |
526 void RenderInline::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) | 525 void RenderInline::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
527 { | 526 { |
528 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); | 527 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); |
529 m_lineBoxes.paint(this, paintInfo, paintOffset); | 528 m_lineBoxes.paint(this, paintInfo, paintOffset); |
530 } | 529 } |
531 | 530 |
532 template<typename GeneratorContext> | 531 template<typename GeneratorContext> |
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1576 container = this; | 1575 container = this; |
1577 | 1576 |
1578 FloatPoint absPos = container->localToAbsolute(); | 1577 FloatPoint absPos = container->localToAbsolute(); |
1579 region.bounds.setX(absPos.x() + region.bounds.x()); | 1578 region.bounds.setX(absPos.x() + region.bounds.x()); |
1580 region.bounds.setY(absPos.y() + region.bounds.y()); | 1579 region.bounds.setY(absPos.y() + region.bounds.y()); |
1581 | 1580 |
1582 regions.append(region); | 1581 regions.append(region); |
1583 } | 1582 } |
1584 | 1583 |
1585 } // namespace WebCore | 1584 } // namespace WebCore |
OLD | NEW |