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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObjectChildList.cpp

Issue 2872423002: Tweak PaintInvalidationReasons (Closed)
Patch Set: Rebaseline-cl Created 3 years, 7 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
OLDNEW
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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 new_child->RegisterSubtreeChangeListenerOnDescendants(true); 178 new_child->RegisterSubtreeChangeListenerOnDescendants(true);
179 179
180 // If the inserted node is currently marked as needing to notify children then 180 // If the inserted node is currently marked as needing to notify children then
181 // we have to propagate that mark up the tree. 181 // we have to propagate that mark up the tree.
182 if (new_child->WasNotifiedOfSubtreeChange()) 182 if (new_child->WasNotifiedOfSubtreeChange())
183 owner->NotifyAncestorsOfSubtreeChange(); 183 owner->NotifyAncestorsOfSubtreeChange();
184 184
185 new_child->SetNeedsLayoutAndPrefWidthsRecalc( 185 new_child->SetNeedsLayoutAndPrefWidthsRecalc(
186 LayoutInvalidationReason::kAddedToLayout); 186 LayoutInvalidationReason::kAddedToLayout);
187 new_child->SetShouldDoFullPaintInvalidation( 187 new_child->SetShouldDoFullPaintInvalidation(
188 kPaintInvalidationLayoutObjectInsertion); 188 PaintInvalidationReason::kAppeared);
189 new_child->SetSubtreeNeedsPaintPropertyUpdate(); 189 new_child->SetSubtreeNeedsPaintPropertyUpdate();
190 if (!owner->NormalChildNeedsLayout()) 190 if (!owner->NormalChildNeedsLayout())
191 owner->SetChildNeedsLayout(); // We may supply the static position for an 191 owner->SetChildNeedsLayout(); // We may supply the static position for an
192 // absolute positioned child. 192 // absolute positioned child.
193 193
194 if (!owner->DocumentBeingDestroyed()) 194 if (!owner->DocumentBeingDestroyed())
195 owner->NotifyOfSubtreeChange(); 195 owner->NotifyOfSubtreeChange();
196 196
197 if (AXObjectCache* cache = owner->GetDocument().AxObjectCache()) 197 if (AXObjectCache* cache = owner->GetDocument().AxObjectCache())
198 cache->ChildrenChanged(owner); 198 cache->ChildrenChanged(owner);
199 } 199 }
200 200
201 void LayoutObjectChildList::InvalidatePaintOnRemoval(LayoutObject& old_child) { 201 void LayoutObjectChildList::InvalidatePaintOnRemoval(LayoutObject& old_child) {
202 if (!old_child.IsRooted()) 202 if (!old_child.IsRooted())
203 return; 203 return;
204 if (old_child.IsBody()) 204 if (old_child.IsBody())
205 old_child.View()->SetShouldDoFullPaintInvalidation(); 205 old_child.View()->SetShouldDoFullPaintInvalidation();
206 ObjectPaintInvalidator paint_invalidator(old_child); 206 ObjectPaintInvalidator paint_invalidator(old_child);
207 paint_invalidator.SlowSetPaintingLayerNeedsRepaint(); 207 paint_invalidator.SlowSetPaintingLayerNeedsRepaint();
208 paint_invalidator.InvalidatePaintOfPreviousVisualRect( 208 paint_invalidator.InvalidatePaintOfPreviousVisualRect(
209 old_child.ContainerForPaintInvalidation(), 209 old_child.ContainerForPaintInvalidation(),
210 kPaintInvalidationLayoutObjectRemoval); 210 PaintInvalidationReason::kDisappeared);
211 } 211 }
212 212
213 } // namespace blink 213 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698