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

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

Issue 840403003: First pass at deleting paint invalidation code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
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
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 if (oldChild->isFloatingOrOutOfFlowPositioned()) 51 if (oldChild->isFloatingOrOutOfFlowPositioned())
52 toRenderBox(oldChild)->removeFloatingOrPositionedChildFromBlockLists(); 52 toRenderBox(oldChild)->removeFloatingOrPositionedChildFromBlockLists();
53 53
54 { 54 {
55 // FIXME: We should not be allowing paint invalidation during layout. cr bug.com/336250 55 // FIXME: We should not be allowing paint invalidation during layout. cr bug.com/336250
56 AllowPaintInvalidationScope scoper(owner->frameView()); 56 AllowPaintInvalidationScope scoper(owner->frameView());
57 57
58 // So that we'll get the appropriate dirty bit set (either that a normal flow child got yanked or 58 // So that we'll get the appropriate dirty bit set (either that a normal flow child got yanked or
59 // that a positioned child got yanked). We also issue paint invalidation s, so that the area exposed when the child 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. 60 // disappears gets paint invalidated properly.
61 if (!owner->documentBeingDestroyed() && notifyRenderer && oldChild->ever HadLayout()) { 61 if (!owner->documentBeingDestroyed() && notifyRenderer && oldChild->ever HadLayout())
62 oldChild->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( ); 62 oldChild->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( );
63 oldChild->invalidatePaintForWholeRenderer();
64 }
65 } 63 }
66 64
67 // If we have a line box wrapper, delete it. 65 // If we have a line box wrapper, delete it.
68 if (oldChild->isBox()) 66 if (oldChild->isBox())
69 toRenderBox(oldChild)->deleteLineBoxWrapper(); 67 toRenderBox(oldChild)->deleteLineBoxWrapper();
70 68
71 // If oldChild is the start or end of the selection, then clear the selectio n to 69 // If oldChild is the start or end of the selection, then clear the selectio n to
72 // avoid problems of invalid pointers. 70 // avoid problems of invalid pointers.
73 // FIXME: The FrameSelection should be responsible for this when it 71 // FIXME: The FrameSelection should be responsible for this when it
74 // is notified of DOM mutations. 72 // is notified of DOM mutations.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 133
136 if (!owner->documentBeingDestroyed() && notifyRenderer) 134 if (!owner->documentBeingDestroyed() && notifyRenderer)
137 newChild->insertedIntoTree(); 135 newChild->insertedIntoTree();
138 136
139 newChild->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); 137 newChild->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
140 if (!owner->normalChildNeedsLayout()) 138 if (!owner->normalChildNeedsLayout())
141 owner->setChildNeedsLayout(); // We may supply the static position for a n absolute positioned child. 139 owner->setChildNeedsLayout(); // We may supply the static position for a n absolute positioned child.
142 } 140 }
143 141
144 } // namespace blink 142 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderObject.cpp ('k') | sky/engine/core/rendering/RenderSelectionInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698