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

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

Issue 377123002: Revert of Divorce PaintInvalidationState from LayoutState (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix conflict Created 6 years, 5 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') | Source/core/rendering/RenderView.h » ('j') | 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 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 LayoutUnit logicalTop = firstTextBox()->logicalTopVisualOverflow(); 1562 LayoutUnit logicalTop = firstTextBox()->logicalTopVisualOverflow();
1563 LayoutUnit logicalWidth = logicalRightSide - logicalLeftSide; 1563 LayoutUnit logicalWidth = logicalRightSide - logicalLeftSide;
1564 LayoutUnit logicalHeight = lastTextBox()->logicalBottomVisualOverflow() - lo gicalTop; 1564 LayoutUnit logicalHeight = lastTextBox()->logicalBottomVisualOverflow() - lo gicalTop;
1565 1565
1566 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight); 1566 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight);
1567 if (!style()->isHorizontalWritingMode()) 1567 if (!style()->isHorizontalWritingMode())
1568 rect = rect.transposedRect(); 1568 rect = rect.transposedRect();
1569 return rect; 1569 return rect;
1570 } 1570 }
1571 1571
1572 LayoutRect RenderText::clippedOverflowRectForPaintInvalidation(const RenderLayer ModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInva lidationState) const 1572 LayoutRect RenderText::clippedOverflowRectForPaintInvalidation(const RenderLayer ModelObject* paintInvalidationContainer) const
1573 { 1573 {
1574 RenderObject* rendererToRepaint = containingBlock(); 1574 RenderObject* rendererToRepaint = containingBlock();
1575 1575
1576 // Do not cross self-painting layer boundaries. 1576 // Do not cross self-painting layer boundaries.
1577 RenderObject* enclosingLayerRenderer = enclosingLayer()->renderer(); 1577 RenderObject* enclosingLayerRenderer = enclosingLayer()->renderer();
1578 if (enclosingLayerRenderer != rendererToRepaint && !rendererToRepaint->isDes cendantOf(enclosingLayerRenderer)) 1578 if (enclosingLayerRenderer != rendererToRepaint && !rendererToRepaint->isDes cendantOf(enclosingLayerRenderer))
1579 rendererToRepaint = enclosingLayerRenderer; 1579 rendererToRepaint = enclosingLayerRenderer;
1580 1580
1581 // The renderer we chose to repaint may be an ancestor of paintInvalidationC ontainer, but we need to do a paintInvalidationContainer-relative repaint. 1581 // The renderer we chose to repaint may be an ancestor of paintInvalidationC ontainer, but we need to do a paintInvalidationContainer-relative repaint.
1582 if (paintInvalidationContainer && paintInvalidationContainer != rendererToRe paint && !rendererToRepaint->isDescendantOf(paintInvalidationContainer)) 1582 if (paintInvalidationContainer && paintInvalidationContainer != rendererToRe paint && !rendererToRepaint->isDescendantOf(paintInvalidationContainer))
1583 return paintInvalidationContainer->clippedOverflowRectForPaintInvalidati on(paintInvalidationContainer, paintInvalidationState); 1583 return paintInvalidationContainer->clippedOverflowRectForPaintInvalidati on(paintInvalidationContainer);
1584 1584
1585 return rendererToRepaint->clippedOverflowRectForPaintInvalidation(paintInval idationContainer, paintInvalidationState); 1585 return rendererToRepaint->clippedOverflowRectForPaintInvalidation(paintInval idationContainer);
1586 } 1586 }
1587 1587
1588 LayoutRect RenderText::selectionRectForPaintInvalidation(const RenderLayerModelO bject* paintInvalidationContainer, bool clipToVisibleContent) 1588 LayoutRect RenderText::selectionRectForPaintInvalidation(const RenderLayerModelO bject* paintInvalidationContainer, bool clipToVisibleContent)
1589 { 1589 {
1590 ASSERT(!needsLayout()); 1590 ASSERT(!needsLayout());
1591 1591
1592 if (selectionState() == SelectionNone) 1592 if (selectionState() == SelectionNone)
1593 return LayoutRect(); 1593 return LayoutRect();
1594 RenderBlock* cb = containingBlock(); 1594 RenderBlock* cb = containingBlock();
1595 if (!cb) 1595 if (!cb)
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 } 1868 }
1869 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); 1869 secureTextTimer->restartWithNewText(lastTypedCharacterOffset);
1870 } 1870 }
1871 1871
1872 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() 1872 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox()
1873 { 1873 {
1874 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); 1874 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox);
1875 } 1875 }
1876 1876
1877 } // namespace WebCore 1877 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderText.h ('k') | Source/core/rendering/RenderView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698