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 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1569 LayoutUnit logicalHeight = lastTextBox()->logicalBottomVisualOverflow() - lo
gicalTop; | 1569 LayoutUnit logicalHeight = lastTextBox()->logicalBottomVisualOverflow() - lo
gicalTop; |
1570 | 1570 |
1571 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight); | 1571 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight); |
1572 if (!style()->isHorizontalWritingMode()) | 1572 if (!style()->isHorizontalWritingMode()) |
1573 rect = rect.transposedRect(); | 1573 rect = rect.transposedRect(); |
1574 return rect; | 1574 return rect; |
1575 } | 1575 } |
1576 | 1576 |
1577 LayoutRect RenderText::clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInva
lidationState) const | 1577 LayoutRect RenderText::clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInva
lidationState) const |
1578 { | 1578 { |
| 1579 const RenderObject* rendererToIssuePaintInvalidations = containingObjectForP
aintInvalidation(); |
| 1580 return rendererToIssuePaintInvalidations->clippedOverflowRectForPaintInvalid
ation(paintInvalidationContainer, paintInvalidationState); |
| 1581 } |
| 1582 |
| 1583 const RenderObject* RenderText::containingObjectForPaintInvalidation() const |
| 1584 { |
1579 RenderObject* rendererToIssuePaintInvalidations = containingBlock(); | 1585 RenderObject* rendererToIssuePaintInvalidations = containingBlock(); |
1580 | 1586 |
1581 // Do not cross self-painting layer boundaries. | 1587 // Do not cross self-painting layer boundaries. |
1582 RenderObject* enclosingLayerRenderer = enclosingLayer()->renderer(); | 1588 RenderObject* enclosingLayerRenderer = enclosingLayer()->renderer(); |
1583 if (enclosingLayerRenderer != rendererToIssuePaintInvalidations && !renderer
ToIssuePaintInvalidations->isDescendantOf(enclosingLayerRenderer)) | 1589 if (enclosingLayerRenderer != rendererToIssuePaintInvalidations && !renderer
ToIssuePaintInvalidations->isDescendantOf(enclosingLayerRenderer)) |
1584 rendererToIssuePaintInvalidations = enclosingLayerRenderer; | 1590 rendererToIssuePaintInvalidations = enclosingLayerRenderer; |
| 1591 return enclosingLayerRenderer; |
| 1592 } |
1585 | 1593 |
1586 // 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. | 1594 const RenderLayerModelObject* RenderText::containerForPaintInvalidation() const |
1587 if (paintInvalidationContainer && paintInvalidationContainer != rendererToIs
suePaintInvalidations && !rendererToIssuePaintInvalidations->isDescendantOf(pain
tInvalidationContainer)) | 1595 { |
1588 return paintInvalidationContainer->clippedOverflowRectForPaintInvalidati
on(paintInvalidationContainer, paintInvalidationState); | 1596 const RenderObject* rendererToIssuePaintInvalidations = containingObjectForP
aintInvalidation(); |
| 1597 ASSERT(rendererToIssuePaintInvalidations); |
| 1598 return rendererToIssuePaintInvalidations->containerForPaintInvalidation(); |
| 1599 } |
1589 | 1600 |
1590 return rendererToIssuePaintInvalidations->clippedOverflowRectForPaintInvalid
ation(paintInvalidationContainer, paintInvalidationState); | |
1591 } | |
1592 | 1601 |
1593 LayoutRect RenderText::selectionRectForPaintInvalidation(const RenderLayerModelO
bject* paintInvalidationContainer, bool clipToVisibleContent) | 1602 LayoutRect RenderText::selectionRectForPaintInvalidation(const RenderLayerModelO
bject* paintInvalidationContainer, bool clipToVisibleContent) |
1594 { | 1603 { |
1595 ASSERT(!needsLayout()); | 1604 ASSERT(!needsLayout()); |
1596 | 1605 |
1597 if (selectionState() == SelectionNone) | 1606 if (selectionState() == SelectionNone) |
1598 return LayoutRect(); | 1607 return LayoutRect(); |
1599 RenderBlock* cb = containingBlock(); | 1608 RenderBlock* cb = containingBlock(); |
1600 if (!cb) | 1609 if (!cb) |
1601 return LayoutRect(); | 1610 return LayoutRect(); |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1873 } | 1882 } |
1874 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); | 1883 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); |
1875 } | 1884 } |
1876 | 1885 |
1877 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() | 1886 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() |
1878 { | 1887 { |
1879 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); | 1888 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); |
1880 } | 1889 } |
1881 | 1890 |
1882 } // namespace blink | 1891 } // namespace blink |
OLD | NEW |