OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 177 |
178 // If the inserted node is currently marked as needing to notify children then | 178 // If the inserted node is currently marked as needing to notify children then |
179 // we have to propagate that mark up the tree. | 179 // we have to propagate that mark up the tree. |
180 if (newChild->wasNotifiedOfSubtreeChange()) | 180 if (newChild->wasNotifiedOfSubtreeChange()) |
181 owner->notifyAncestorsOfSubtreeChange(); | 181 owner->notifyAncestorsOfSubtreeChange(); |
182 | 182 |
183 newChild->setNeedsLayoutAndPrefWidthsRecalc( | 183 newChild->setNeedsLayoutAndPrefWidthsRecalc( |
184 LayoutInvalidationReason::AddedToLayout); | 184 LayoutInvalidationReason::AddedToLayout); |
185 newChild->setShouldDoFullPaintInvalidation( | 185 newChild->setShouldDoFullPaintInvalidation( |
186 PaintInvalidationLayoutObjectInsertion); | 186 PaintInvalidationLayoutObjectInsertion); |
| 187 newChild->setSubtreeNeedsPaintPropertyUpdate(); |
187 if (!owner->normalChildNeedsLayout()) | 188 if (!owner->normalChildNeedsLayout()) |
188 owner->setChildNeedsLayout(); // We may supply the static position for an | 189 owner->setChildNeedsLayout(); // We may supply the static position for an |
189 // absolute positioned child. | 190 // absolute positioned child. |
190 | 191 |
191 if (!owner->documentBeingDestroyed()) | 192 if (!owner->documentBeingDestroyed()) |
192 owner->notifyOfSubtreeChange(); | 193 owner->notifyOfSubtreeChange(); |
193 | 194 |
194 if (AXObjectCache* cache = owner->document().axObjectCache()) | 195 if (AXObjectCache* cache = owner->document().axObjectCache()) |
195 cache->childrenChanged(owner); | 196 cache->childrenChanged(owner); |
196 } | 197 } |
197 | 198 |
198 void LayoutObjectChildList::invalidatePaintOnRemoval(LayoutObject& oldChild) { | 199 void LayoutObjectChildList::invalidatePaintOnRemoval(LayoutObject& oldChild) { |
199 if (!oldChild.isRooted()) | 200 if (!oldChild.isRooted()) |
200 return; | 201 return; |
201 if (oldChild.isBody()) | 202 if (oldChild.isBody()) |
202 oldChild.view()->setShouldDoFullPaintInvalidation(); | 203 oldChild.view()->setShouldDoFullPaintInvalidation(); |
203 ObjectPaintInvalidator paintInvalidator(oldChild); | 204 ObjectPaintInvalidator paintInvalidator(oldChild); |
204 paintInvalidator.slowSetPaintingLayerNeedsRepaint(); | 205 paintInvalidator.slowSetPaintingLayerNeedsRepaint(); |
205 paintInvalidator.invalidatePaintOfPreviousVisualRect( | 206 paintInvalidator.invalidatePaintOfPreviousVisualRect( |
206 oldChild.containerForPaintInvalidation(), | 207 oldChild.containerForPaintInvalidation(), |
207 PaintInvalidationLayoutObjectRemoval); | 208 PaintInvalidationLayoutObjectRemoval); |
208 } | 209 } |
209 | 210 |
210 } // namespace blink | 211 } // namespace blink |
OLD | NEW |