| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 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 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1357 } | 1357 } |
| 1358 | 1358 |
| 1359 LayoutUnit logicalTop = firstTextBox()->logicalTopVisualOverflow(); | 1359 LayoutUnit logicalTop = firstTextBox()->logicalTopVisualOverflow(); |
| 1360 LayoutUnit logicalWidth = logicalRightSide - logicalLeftSide; | 1360 LayoutUnit logicalWidth = logicalRightSide - logicalLeftSide; |
| 1361 LayoutUnit logicalHeight = lastTextBox()->logicalBottomVisualOverflow() - lo
gicalTop; | 1361 LayoutUnit logicalHeight = lastTextBox()->logicalBottomVisualOverflow() - lo
gicalTop; |
| 1362 | 1362 |
| 1363 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight); | 1363 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight); |
| 1364 return rect; | 1364 return rect; |
| 1365 } | 1365 } |
| 1366 | 1366 |
| 1367 LayoutRect RenderText::clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInva
lidationState) const | |
| 1368 { | |
| 1369 RenderObject* rendererToIssuePaintInvalidations = containingBlock(); | |
| 1370 | |
| 1371 // Do not cross self-painting layer boundaries. | |
| 1372 RenderObject* enclosingLayerRenderer = enclosingLayer()->renderer(); | |
| 1373 if (enclosingLayerRenderer != rendererToIssuePaintInvalidations && !renderer
ToIssuePaintInvalidations->isDescendantOf(enclosingLayerRenderer)) | |
| 1374 rendererToIssuePaintInvalidations = enclosingLayerRenderer; | |
| 1375 | |
| 1376 // The renderer we chose to issue paint invalidations may be an ancestor of
paintInvalidationContainer, but we need to do a paintInvalidationContainer-relat
ive paint invalidation. | |
| 1377 if (paintInvalidationContainer && paintInvalidationContainer != rendererToIs
suePaintInvalidations && !rendererToIssuePaintInvalidations->isDescendantOf(pain
tInvalidationContainer)) | |
| 1378 return paintInvalidationContainer->clippedOverflowRectForPaintInvalidati
on(paintInvalidationContainer, paintInvalidationState); | |
| 1379 | |
| 1380 return rendererToIssuePaintInvalidations->clippedOverflowRectForPaintInvalid
ation(paintInvalidationContainer, paintInvalidationState); | |
| 1381 } | |
| 1382 | |
| 1383 LayoutRect RenderText::selectionRectForPaintInvalidation(const RenderLayerModelO
bject* paintInvalidationContainer, bool clipToVisibleContent) | 1367 LayoutRect RenderText::selectionRectForPaintInvalidation(const RenderLayerModelO
bject* paintInvalidationContainer, bool clipToVisibleContent) |
| 1384 { | 1368 { |
| 1385 ASSERT(!needsLayout()); | 1369 ASSERT(!needsLayout()); |
| 1386 | 1370 |
| 1387 if (selectionState() == SelectionNone) | 1371 if (selectionState() == SelectionNone) |
| 1388 return LayoutRect(); | 1372 return LayoutRect(); |
| 1389 RenderBlock* cb = containingBlock(); | 1373 RenderBlock* cb = containingBlock(); |
| 1390 if (!cb) | 1374 if (!cb) |
| 1391 return LayoutRect(); | 1375 return LayoutRect(); |
| 1392 | 1376 |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1642 ASSERT(child->prevTextBox() == prev); | 1626 ASSERT(child->prevTextBox() == prev); |
| 1643 prev = child; | 1627 prev = child; |
| 1644 } | 1628 } |
| 1645 ASSERT(prev == m_lastTextBox); | 1629 ASSERT(prev == m_lastTextBox); |
| 1646 #endif | 1630 #endif |
| 1647 } | 1631 } |
| 1648 | 1632 |
| 1649 #endif | 1633 #endif |
| 1650 | 1634 |
| 1651 } // namespace blink | 1635 } // namespace blink |
| OLD | NEW |