Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 813 { | 813 { |
| 814 return computeRepaintRect(containerForRepaint()); | 814 return computeRepaintRect(containerForRepaint()); |
| 815 } | 815 } |
| 816 | 816 |
| 817 // Returns the repaint rect for this RenderObject in the coordinate space of the paint backing (typically a GraphicsLayer) for |repaintContainer|. | 817 // Returns the repaint rect for this RenderObject in the coordinate space of the paint backing (typically a GraphicsLayer) for |repaintContainer|. |
| 818 LayoutRect computeRepaintRect(const RenderLayerModelObject* repaintContainer ) const; | 818 LayoutRect computeRepaintRect(const RenderLayerModelObject* repaintContainer ) const; |
| 819 | 819 |
| 820 // Returns the rect bounds needed to repaint this object, in the coordinate space of the rendering backing of |repaintContainer| | 820 // Returns the rect bounds needed to repaint this object, in the coordinate space of the rendering backing of |repaintContainer| |
| 821 LayoutRect boundsRectForRepaint(const RenderLayerModelObject* repaintContain er) const; | 821 LayoutRect boundsRectForRepaint(const RenderLayerModelObject* repaintContain er) const; |
| 822 | 822 |
| 823 // Actually do the repaint of rect r for this object which has been computed in the coordinate space | 823 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space |
| 824 // of repaintContainer. If repaintContainer is 0, repaint via the view. | 824 // of paintInvalidationContainer. If paintInvalidationContainer is 0, invali date paints via the view. |
| 825 void repaintUsingContainer(const RenderLayerModelObject* repaintContainer, c onst IntRect&, InvalidationReason) const; | 825 void invalidatePaintUsingContainer(const RenderLayerModelObject* paintInvali dationContainer, const IntRect&, InvalidationReason) const; |
| 826 | 826 |
| 827 // Repaint the entire object. Called when, e.g., the color of a border chan ges, or when a border | 827 // Invalidate the paint of the entire object. Called when, e.g., the color o f a border changes, or when a border |
| 828 // style changes. | 828 // style changes. |
| 829 void repaint() const; | 829 void invalidatePaint() const; |
| 830 | 830 |
| 831 // Repaint a specific subrectangle within a given object. The rect |r| is i n the object's coordinate space. | 831 // Invalidate the paint of a specific subrectangle within a given object. Th e rect |r| is in the object's coordinate space. |
| 832 void repaintRectangle(const LayoutRect&) const; | 832 void invalidatePaintRectangle(const LayoutRect&) const; |
| 833 | 833 |
| 834 // Repaint only if our old bounds and new bounds are different. The caller m ay pass in newBounds if they are known. | 834 // Invalidate the paint only if our old bounds and new bounds are different. The caller may pass in newBounds if they are known. |
| 835 bool repaintAfterLayoutIfNeeded(const RenderLayerModelObject* repaintContain er, bool wasSelfLayout, | 835 bool invalidatePaintAfterLayoutIfNeeded(const RenderLayerModelObject* paintI nvalidationContainer, bool wasSelfLayout, |
| 836 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromRepaintCo ntainer, const LayoutRect* newBoundsPtr = 0, const LayoutPoint* newPositionFromR epaintContainer = 0); | 836 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva lidationContainer, |
| 837 const LayoutRect* newBoundsPtr = 0, const LayoutPoint* newPositionFromPa intInvalidationContainer = 0); | |
| 837 | 838 |
| 838 // Walk the tree after layout issuing paint invalidations for renderers that have changed or moved, updating bounds that have changed, and clearing paint in validation state. | 839 // Walk the tree after layout issuing paint invalidations for renderers that have changed or moved, updating bounds that have changed, and clearing paint in validation state. |
| 839 virtual void invalidateTreeAfterLayout(const RenderLayerModelObject&); | 840 virtual void invalidateTreeAfterLayout(const RenderLayerModelObject&); |
| 840 | 841 |
| 841 virtual void repaintOverflow(); | 842 virtual void invalidateOverflowPaint(); |
|
Julien - ping for review
2014/06/11 16:27:21
Not a huge fan of this name, how about invalidateP
dsinclair
2014/06/11 17:04:06
Done.
| |
| 842 void repaintOverflowIfNeeded(); | 843 void invalidateOverflowPaintIfNeeded(); |
| 843 | 844 |
| 844 bool checkForRepaint() const; | 845 bool checkForRepaint() const; |
| 845 bool checkForRepaintDuringLayout() const; | 846 bool checkForRepaintDuringLayout() const; |
| 846 | 847 |
| 847 // Returns the rect that should be repainted whenever this object changes. The rect is in the view's | 848 // Returns the rect that should be repainted whenever this object changes. The rect is in the view's |
| 848 // coordinate space. This method deals with outlines and overflow. | 849 // coordinate space. This method deals with outlines and overflow. |
| 849 LayoutRect absoluteClippedOverflowRect() const | 850 LayoutRect absoluteClippedOverflowRect() const |
| 850 { | 851 { |
| 851 return clippedOverflowRectForRepaint(0); | 852 return clippedOverflowRectForRepaint(0); |
| 852 } | 853 } |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1482 void showTree(const WebCore::RenderObject*); | 1483 void showTree(const WebCore::RenderObject*); |
| 1483 void showLineTree(const WebCore::RenderObject*); | 1484 void showLineTree(const WebCore::RenderObject*); |
| 1484 void showRenderTree(const WebCore::RenderObject* object1); | 1485 void showRenderTree(const WebCore::RenderObject* object1); |
| 1485 // We don't make object2 an optional parameter so that showRenderTree | 1486 // We don't make object2 an optional parameter so that showRenderTree |
| 1486 // can be called from gdb easily. | 1487 // can be called from gdb easily. |
| 1487 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); | 1488 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); |
| 1488 | 1489 |
| 1489 #endif | 1490 #endif |
| 1490 | 1491 |
| 1491 #endif // RenderObject_h | 1492 #endif // RenderObject_h |
| OLD | NEW |