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

Side by Side Diff: sky/engine/core/rendering/RenderObjectChildList.cpp

Issue 850763007: Delete canInvalidatePaintDuringPerformLayout. (Closed) Base URL: git@github.com:domokit/mojo.git@PaintInvalidationState
Patch Set: Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/frame/FrameView.cpp ('k') | no next file » | 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 * 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 } 45 }
46 46
47 RenderObject* RenderObjectChildList::removeChildNode(RenderObject* owner, Render Object* oldChild, bool notifyRenderer) 47 RenderObject* RenderObjectChildList::removeChildNode(RenderObject* owner, Render Object* oldChild, bool notifyRenderer)
48 { 48 {
49 ASSERT(oldChild->parent() == owner); 49 ASSERT(oldChild->parent() == owner);
50 50
51 if (oldChild->isFloatingOrOutOfFlowPositioned()) 51 if (oldChild->isFloatingOrOutOfFlowPositioned())
52 toRenderBox(oldChild)->removeFloatingOrPositionedChildFromBlockLists(); 52 toRenderBox(oldChild)->removeFloatingOrPositionedChildFromBlockLists();
53 53
54 { 54 // So that we'll get the appropriate dirty bit set (either that a normal flo w child got yanked or
55 // FIXME: We should not be allowing paint invalidation during layout. cr bug.com/336250 55 // that a positioned child got yanked). We also issue paint invalidations, s o that the area exposed when the child
56 AllowPaintInvalidationScope scoper(owner->frameView()); 56 // disappears gets paint invalidated properly.
57 57 if (!owner->documentBeingDestroyed() && notifyRenderer && oldChild->everHadL ayout())
58 // So that we'll get the appropriate dirty bit set (either that a normal flow child got yanked or 58 oldChild->setNeedsLayoutAndPrefWidthsRecalc();
59 // that a positioned child got yanked). We also issue paint invalidation s, so that the area exposed when the child
60 // disappears gets paint invalidated properly.
61 if (!owner->documentBeingDestroyed() && notifyRenderer && oldChild->ever HadLayout())
62 oldChild->setNeedsLayoutAndPrefWidthsRecalc();
63 }
64 59
65 // If we have a line box wrapper, delete it. 60 // If we have a line box wrapper, delete it.
66 if (oldChild->isBox()) 61 if (oldChild->isBox())
67 toRenderBox(oldChild)->deleteLineBoxWrapper(); 62 toRenderBox(oldChild)->deleteLineBoxWrapper();
68 63
69 // If oldChild is the start or end of the selection, then clear the selectio n to 64 // If oldChild is the start or end of the selection, then clear the selectio n to
70 // avoid problems of invalid pointers. 65 // avoid problems of invalid pointers.
71 // FIXME: The FrameSelection should be responsible for this when it 66 // FIXME: The FrameSelection should be responsible for this when it
72 // is notified of DOM mutations. 67 // is notified of DOM mutations.
73 if (!owner->documentBeingDestroyed() && oldChild->isSelectionBorder()) 68 if (!owner->documentBeingDestroyed() && oldChild->isSelectionBorder())
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 128
134 if (!owner->documentBeingDestroyed() && notifyRenderer) 129 if (!owner->documentBeingDestroyed() && notifyRenderer)
135 newChild->insertedIntoTree(); 130 newChild->insertedIntoTree();
136 131
137 newChild->setNeedsLayoutAndPrefWidthsRecalc(); 132 newChild->setNeedsLayoutAndPrefWidthsRecalc();
138 if (!owner->normalChildNeedsLayout()) 133 if (!owner->normalChildNeedsLayout())
139 owner->setChildNeedsLayout(); // We may supply the static position for a n absolute positioned child. 134 owner->setChildNeedsLayout(); // We may supply the static position for a n absolute positioned child.
140 } 135 }
141 136
142 } // namespace blink 137 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698