| 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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 // Returns the rect bounds needed to invalidate the paint of this object, in
the coordinate space of the rendering backing of |paintInvalidationContainer| | 861 // Returns the rect bounds needed to invalidate the paint of this object, in
the coordinate space of the rendering backing of |paintInvalidationContainer| |
| 862 LayoutRect boundsRectForPaintInvalidation(const RenderLayerModelObject* pain
tInvalidationContainer, const PaintInvalidationState* = 0) const; | 862 LayoutRect boundsRectForPaintInvalidation(const RenderLayerModelObject* pain
tInvalidationContainer, const PaintInvalidationState* = 0) const; |
| 863 | 863 |
| 864 // Actually do the paint invalidate of rect r for this object which has been
computed in the coordinate space | 864 // Actually do the paint invalidate of rect r for this object which has been
computed in the coordinate space |
| 865 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t
his coordinaten space is not the same | 865 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t
his coordinaten space is not the same |
| 866 // as the local coordinate space of |paintInvalidationContainer| in the pres
ence of layer squashing. | 866 // as the local coordinate space of |paintInvalidationContainer| in the pres
ence of layer squashing. |
| 867 // If |paintInvalidationContainer| is 0, invalidate paints via the view. | 867 // If |paintInvalidationContainer| is 0, invalidate paints via the view. |
| 868 // FIXME: |paintInvalidationContainer| should never be 0. See crbug.com/3636
99. | 868 // FIXME: |paintInvalidationContainer| should never be 0. See crbug.com/3636
99. |
| 869 void invalidatePaintUsingContainer(const RenderLayerModelObject* paintInvali
dationContainer, const LayoutRect&, InvalidationReason) const; | 869 void invalidatePaintUsingContainer(const RenderLayerModelObject* paintInvali
dationContainer, const LayoutRect&, InvalidationReason) const; |
| 870 | 870 |
| 871 // Invalidate the paint of the entire object. Called when, e.g., the color o
f a border changes, or when a border | |
| 872 // style changes. | |
| 873 void paintInvalidationForWholeRenderer() const; | |
| 874 | |
| 875 // Invalidate the paint of a specific subrectangle within a given object. Th
e rect |r| is in the object's coordinate space. | 871 // Invalidate the paint of a specific subrectangle within a given object. Th
e rect |r| is in the object's coordinate space. |
| 876 void invalidatePaintRectangle(const LayoutRect&) const; | 872 void invalidatePaintRectangle(const LayoutRect&) const; |
| 877 | 873 |
| 878 InvalidationReason invalidatePaintIfNeeded(const RenderLayerModelObject& pai
ntInvalidationContainer, | 874 InvalidationReason invalidatePaintIfNeeded(const RenderLayerModelObject& pai
ntInvalidationContainer, |
| 879 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva
lidationContainer, const PaintInvalidationState&); | 875 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva
lidationContainer, const PaintInvalidationState&); |
| 880 | 876 |
| 881 // 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. | 877 // 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. |
| 882 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&); | 878 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&); |
| 883 | 879 |
| 884 virtual void invalidatePaintForOverflow(); | 880 virtual void invalidatePaintForOverflow(); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 | 1019 |
| 1024 bool isRelayoutBoundaryForInspector() const; | 1020 bool isRelayoutBoundaryForInspector() const; |
| 1025 | 1021 |
| 1026 const LayoutRect& previousPaintInvalidationRect() const { return m_previousP
aintInvalidationRect; } | 1022 const LayoutRect& previousPaintInvalidationRect() const { return m_previousP
aintInvalidationRect; } |
| 1027 void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPa
intInvalidationRect = rect; } | 1023 void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPa
intInvalidationRect = rect; } |
| 1028 | 1024 |
| 1029 const LayoutPoint& previousPositionFromPaintInvalidationContainer() const {
return m_previousPositionFromPaintInvalidationContainer; } | 1025 const LayoutPoint& previousPositionFromPaintInvalidationContainer() const {
return m_previousPositionFromPaintInvalidationContainer; } |
| 1030 void setPreviousPositionFromPaintInvalidationContainer(const LayoutPoint& lo
cation) { m_previousPositionFromPaintInvalidationContainer = location; } | 1026 void setPreviousPositionFromPaintInvalidationContainer(const LayoutPoint& lo
cation) { m_previousPositionFromPaintInvalidationContainer = location; } |
| 1031 | 1027 |
| 1032 bool shouldDoFullPaintInvalidation() const { return m_bitfields.shouldDoFull
PaintInvalidation(); } | 1028 bool shouldDoFullPaintInvalidation() const { return m_bitfields.shouldDoFull
PaintInvalidation(); } |
| 1033 void setShouldDoFullPaintInvalidation(bool b, MarkingBehavior markBehavior =
MarkContainingBlockChain) | 1029 void setShouldDoFullPaintInvalidation(bool, MarkingBehavior = MarkContaining
BlockChain); |
| 1034 { | |
| 1035 m_bitfields.setShouldDoFullPaintInvalidation(b); | |
| 1036 | |
| 1037 if (markBehavior == MarkContainingBlockChain && b) | |
| 1038 markContainingBlockChainForPaintInvalidation(); | |
| 1039 } | |
| 1040 | 1030 |
| 1041 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv
alidateOverflowForPaint(); } | 1031 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv
alidateOverflowForPaint(); } |
| 1042 | 1032 |
| 1043 bool shouldDoFullPaintInvalidationIfSelfPaintingLayer() const { return m_bit
fields.shouldDoFullPaintInvalidationIfSelfPaintingLayer(); } | 1033 bool shouldDoFullPaintInvalidationIfSelfPaintingLayer() const { return m_bit
fields.shouldDoFullPaintInvalidationIfSelfPaintingLayer(); } |
| 1044 void setShouldDoFullPaintInvalidationIfSelfPaintingLayer(bool b) | 1034 void setShouldDoFullPaintInvalidationIfSelfPaintingLayer(bool b) |
| 1045 { | 1035 { |
| 1046 m_bitfields.setShouldDoFullPaintInvalidationIfSelfPaintingLayer(b); | 1036 m_bitfields.setShouldDoFullPaintInvalidationIfSelfPaintingLayer(b); |
| 1047 | 1037 |
| 1048 if (b) | 1038 if (b) |
| 1049 markContainingBlockChainForPaintInvalidation(); | 1039 markContainingBlockChainForPaintInvalidation(); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 | 1143 |
| 1154 #if ENABLE(ASSERT) | 1144 #if ENABLE(ASSERT) |
| 1155 virtual bool paintInvalidationStateIsDirty() const | 1145 virtual bool paintInvalidationStateIsDirty() const |
| 1156 { | 1146 { |
| 1157 return layoutDidGetCalled() || shouldDoFullPaintInvalidation() || should
DoFullPaintInvalidationIfSelfPaintingLayer() | 1147 return layoutDidGetCalled() || shouldDoFullPaintInvalidation() || should
DoFullPaintInvalidationIfSelfPaintingLayer() |
| 1158 || onlyNeededPositionedMovementLayout() || neededLayoutBecauseOfChil
dren() || mayNeedPaintInvalidation(); | 1148 || onlyNeededPositionedMovementLayout() || neededLayoutBecauseOfChil
dren() || mayNeedPaintInvalidation(); |
| 1159 } | 1149 } |
| 1160 #endif | 1150 #endif |
| 1161 | 1151 |
| 1162 private: | 1152 private: |
| 1153 // Invalidate the paint of the entire object. This is only used when a rende
rer is to be removed. |
| 1154 // For other cases, the caller should call setShouldDoFullPaintInvalidation(
) instead. |
| 1155 void invalidatePaintForWholeRenderer() const; |
| 1156 |
| 1163 const RenderLayerModelObject* enclosingCompositedContainer() const; | 1157 const RenderLayerModelObject* enclosingCompositedContainer() const; |
| 1164 | 1158 |
| 1165 RenderFlowThread* locateFlowThreadContainingBlock() const; | 1159 RenderFlowThread* locateFlowThreadContainingBlock() const; |
| 1166 void removeFromRenderFlowThread(); | 1160 void removeFromRenderFlowThread(); |
| 1167 void removeFromRenderFlowThreadRecursive(RenderFlowThread*); | 1161 void removeFromRenderFlowThreadRecursive(RenderFlowThread*); |
| 1168 | 1162 |
| 1169 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const; | 1163 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const; |
| 1170 | 1164 |
| 1171 RenderStyle* cachedFirstLineStyle() const; | 1165 RenderStyle* cachedFirstLineStyle() const; |
| 1172 StyleDifference adjustStyleDifference(StyleDifference) const; | 1166 StyleDifference adjustStyleDifference(StyleDifference) const; |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 void showTree(const blink::RenderObject*); | 1563 void showTree(const blink::RenderObject*); |
| 1570 void showLineTree(const blink::RenderObject*); | 1564 void showLineTree(const blink::RenderObject*); |
| 1571 void showRenderTree(const blink::RenderObject* object1); | 1565 void showRenderTree(const blink::RenderObject* object1); |
| 1572 // We don't make object2 an optional parameter so that showRenderTree | 1566 // We don't make object2 an optional parameter so that showRenderTree |
| 1573 // can be called from gdb easily. | 1567 // can be called from gdb easily. |
| 1574 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); | 1568 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); |
| 1575 | 1569 |
| 1576 #endif | 1570 #endif |
| 1577 | 1571 |
| 1578 #endif // RenderObject_h | 1572 #endif // RenderObject_h |
| OLD | NEW |