| 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 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1576 rect = rect.transposedRect(); | 1576 rect = rect.transposedRect(); |
| 1577 return rect; | 1577 return rect; |
| 1578 } | 1578 } |
| 1579 | 1579 |
| 1580 LayoutRect LayoutText::clippedOverflowRectForPaintInvalidation(const LayoutBoxMo
delObject* paintInvalidationContainer, const PaintInvalidationState* paintInvali
dationState) const | 1580 LayoutRect LayoutText::clippedOverflowRectForPaintInvalidation(const LayoutBoxMo
delObject* paintInvalidationContainer, const PaintInvalidationState* paintInvali
dationState) const |
| 1581 { | 1581 { |
| 1582 if (style()->visibility() != VISIBLE) | 1582 if (style()->visibility() != VISIBLE) |
| 1583 return LayoutRect(); | 1583 return LayoutRect(); |
| 1584 | 1584 |
| 1585 LayoutRect paintInvalidationRect(visualOverflowRect()); | 1585 LayoutRect paintInvalidationRect(visualOverflowRect()); |
| 1586 mapToVisibleRectInContainerSpace(paintInvalidationContainer, paintInvalidati
onRect, paintInvalidationState); | 1586 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, paintInvalidatio
nRect, paintInvalidationState); |
| 1587 return paintInvalidationRect; | 1587 return paintInvalidationRect; |
| 1588 } | 1588 } |
| 1589 | 1589 |
| 1590 LayoutRect LayoutText::selectionRectForPaintInvalidation(const LayoutBoxModelObj
ect* paintInvalidationContainer) const | 1590 LayoutRect LayoutText::selectionRectForPaintInvalidation(const LayoutBoxModelObj
ect* paintInvalidationContainer) const |
| 1591 { | 1591 { |
| 1592 ASSERT(!needsLayout()); | 1592 ASSERT(!needsLayout()); |
| 1593 | 1593 |
| 1594 if (selectionState() == SelectionNone) | 1594 if (selectionState() == SelectionNone) |
| 1595 return LayoutRect(); | 1595 return LayoutRect(); |
| 1596 LayoutBlock* cb = containingBlock(); | 1596 LayoutBlock* cb = containingBlock(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1615 LayoutRect rect; | 1615 LayoutRect rect; |
| 1616 | 1616 |
| 1617 if (startPos == endPos) | 1617 if (startPos == endPos) |
| 1618 return rect; | 1618 return rect; |
| 1619 | 1619 |
| 1620 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { | 1620 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { |
| 1621 rect.unite(box->localSelectionRect(startPos, endPos)); | 1621 rect.unite(box->localSelectionRect(startPos, endPos)); |
| 1622 rect.unite(LayoutRect(ellipsisRectForBox(box, startPos, endPos))); | 1622 rect.unite(LayoutRect(ellipsisRectForBox(box, startPos, endPos))); |
| 1623 } | 1623 } |
| 1624 | 1624 |
| 1625 mapToVisibleRectInContainerSpace(paintInvalidationContainer, rect, 0); | 1625 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, rect, 0); |
| 1626 // FIXME: groupedMapping() leaks the squashing abstraction. | 1626 // FIXME: groupedMapping() leaks the squashing abstraction. |
| 1627 if (paintInvalidationContainer->layer()->groupedMapping()) | 1627 if (paintInvalidationContainer->layer()->groupedMapping()) |
| 1628 PaintLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer,
rect); | 1628 PaintLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer,
rect); |
| 1629 return rect; | 1629 return rect; |
| 1630 } | 1630 } |
| 1631 | 1631 |
| 1632 int LayoutText::caretMinOffset() const | 1632 int LayoutText::caretMinOffset() const |
| 1633 { | 1633 { |
| 1634 InlineTextBox* box = firstTextBox(); | 1634 InlineTextBox* box = firstTextBox(); |
| 1635 if (!box) | 1635 if (!box) |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1881 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { | 1881 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { |
| 1882 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in
validationReason, paintInvalidationRect); | 1882 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in
validationReason, paintInvalidationRect); |
| 1883 if (box->truncation() != cNoTruncation) { | 1883 if (box->truncation() != cNoTruncation) { |
| 1884 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox()) | 1884 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox()) |
| 1885 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(
*ellipsisBox, invalidationReason, paintInvalidationRect); | 1885 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(
*ellipsisBox, invalidationReason, paintInvalidationRect); |
| 1886 } | 1886 } |
| 1887 } | 1887 } |
| 1888 } | 1888 } |
| 1889 | 1889 |
| 1890 } // namespace blink | 1890 } // namespace blink |
| OLD | NEW |