| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |