Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Side by Side Diff: Source/core/rendering/RenderText.cpp

Issue 412353004: Clean up GraphicsLayerPaintInfo to remove unused or unnecessary fields. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: f Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderText.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderText.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698