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 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1017 LayoutUnit logicalHeight = lastLineBox()->logicalBottomVisualOverflow(lastRo
otBox.lineBottom()) - logicalTop; | 1017 LayoutUnit logicalHeight = lastLineBox()->logicalBottomVisualOverflow(lastRo
otBox.lineBottom()) - logicalTop; |
1018 | 1018 |
1019 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight); | 1019 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight); |
1020 if (!style()->isHorizontalWritingMode()) | 1020 if (!style()->isHorizontalWritingMode()) |
1021 rect = rect.transposedRect(); | 1021 rect = rect.transposedRect(); |
1022 return rect; | 1022 return rect; |
1023 } | 1023 } |
1024 | 1024 |
1025 LayoutRect RenderInline::absoluteClippedOverflowRect() const | 1025 LayoutRect RenderInline::absoluteClippedOverflowRect() const |
1026 { | 1026 { |
1027 return clippedOverflowRect(view()); | 1027 if (!continuation()) |
| 1028 return clippedOverflowRect(view()); |
| 1029 |
| 1030 FloatRect floatResult; |
| 1031 LinesBoundingBoxGeneratorContext context(floatResult); |
| 1032 |
| 1033 RenderInline* endContinuation = inlineElementContinuation(); |
| 1034 while (endContinuation->inlineElementContinuation()) |
| 1035 endContinuation = endContinuation->inlineElementContinuation(); |
| 1036 |
| 1037 for (RenderBlock* currBlock = containingBlock(); currBlock && currBlock->isA
nonymousBlock(); currBlock = toRenderBlock(currBlock->nextSibling())) { |
| 1038 for (RenderObject* curr = currBlock->firstChild(); curr; curr = curr->ne
xtSibling()) { |
| 1039 LayoutRect rect = curr->clippedOverflowRectForPaintInvalidation(view
()); |
| 1040 context(rect); |
| 1041 if (curr == endContinuation) |
| 1042 return enclosingIntRect(floatResult); |
| 1043 } |
| 1044 } |
| 1045 return LayoutRect(); |
1028 } | 1046 } |
1029 | 1047 |
1030 LayoutRect RenderInline::clippedOverflowRectForPaintInvalidation(const RenderLay
erModelObject* paintInvalidationContainer, const PaintInvalidationState* paintIn
validationState) const | 1048 LayoutRect RenderInline::clippedOverflowRectForPaintInvalidation(const RenderLay
erModelObject* paintInvalidationContainer, const PaintInvalidationState* paintIn
validationState) const |
1031 { | 1049 { |
1032 // If we don't create line boxes, we don't have any invalidations to do. | 1050 // If we don't create line boxes, we don't have any invalidations to do. |
1033 if (!alwaysCreateLineBoxes()) | 1051 if (!alwaysCreateLineBoxes()) |
1034 return LayoutRect(); | 1052 return LayoutRect(); |
1035 return clippedOverflowRect(paintInvalidationContainer); | 1053 return clippedOverflowRect(paintInvalidationContainer); |
1036 } | 1054 } |
1037 | 1055 |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1423 container = this; | 1441 container = this; |
1424 | 1442 |
1425 FloatPoint absPos = container->localToAbsolute(); | 1443 FloatPoint absPos = container->localToAbsolute(); |
1426 region.bounds.setX(absPos.x() + region.bounds.x()); | 1444 region.bounds.setX(absPos.x() + region.bounds.x()); |
1427 region.bounds.setY(absPos.y() + region.bounds.y()); | 1445 region.bounds.setY(absPos.y() + region.bounds.y()); |
1428 | 1446 |
1429 regions.append(region); | 1447 regions.append(region); |
1430 } | 1448 } |
1431 | 1449 |
1432 } // namespace blink | 1450 } // namespace blink |
OLD | NEW |