| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // FIXME: We should not be allowing repaint during layout. crbug.com/336
250 | 60 // FIXME: We should not be allowing repaint during layout. crbug.com/336
250 |
| 61 AllowPaintInvalidationScope scoper(owner->frameView()); | 61 AllowPaintInvalidationScope scoper(owner->frameView()); |
| 62 | 62 |
| 63 // So that we'll get the appropriate dirty bit set (either that a normal
flow child got yanked or | 63 // So that we'll get the appropriate dirty bit set (either that a normal
flow child got yanked or |
| 64 // that a positioned child got yanked). We also repaint, so that the are
a exposed when the child | 64 // that a positioned child got yanked). We also repaint, so that the are
a exposed when the child |
| 65 // disappears gets repainted properly. | 65 // disappears gets repainted properly. |
| 66 if (!owner->documentBeingDestroyed() && notifyRenderer && oldChild->ever
HadLayout()) { | 66 if (!owner->documentBeingDestroyed() && notifyRenderer && oldChild->ever
HadLayout()) { |
| 67 oldChild->setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint(); | 67 oldChild->setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint(); |
| 68 // We only repaint |oldChild| if we have a RenderLayer as its visual
overflow may not be tracked by its parent. | 68 // We only repaint |oldChild| if we have a RenderLayer as its visual
overflow may not be tracked by its parent. |
| 69 if (oldChild->isBody()) | 69 if (oldChild->isBody()) |
| 70 owner->view()->repaint(); | 70 owner->view()->invalidatePaint(); |
| 71 else | 71 else |
| 72 oldChild->repaint(); | 72 oldChild->invalidatePaint(); |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 | 75 |
| 76 // If we have a line box wrapper, delete it. | 76 // If we have a line box wrapper, delete it. |
| 77 if (oldChild->isBox()) | 77 if (oldChild->isBox()) |
| 78 toRenderBox(oldChild)->deleteLineBoxWrapper(); | 78 toRenderBox(oldChild)->deleteLineBoxWrapper(); |
| 79 | 79 |
| 80 // If oldChild is the start or end of the selection, then clear the selectio
n to | 80 // If oldChild is the start or end of the selection, then clear the selectio
n to |
| 81 // avoid problems of invalid pointers. | 81 // avoid problems of invalid pointers. |
| 82 // FIXME: The FrameSelection should be responsible for this when it | 82 // FIXME: The FrameSelection should be responsible for this when it |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 160 |
| 161 newChild->setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint(); | 161 newChild->setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint(); |
| 162 if (!owner->normalChildNeedsLayout()) | 162 if (!owner->normalChildNeedsLayout()) |
| 163 owner->setChildNeedsLayout(); // We may supply the static position for a
n absolute positioned child. | 163 owner->setChildNeedsLayout(); // We may supply the static position for a
n absolute positioned child. |
| 164 | 164 |
| 165 if (AXObjectCache* cache = owner->document().axObjectCache()) | 165 if (AXObjectCache* cache = owner->document().axObjectCache()) |
| 166 cache->childrenChanged(owner); | 166 cache->childrenChanged(owner); |
| 167 } | 167 } |
| 168 | 168 |
| 169 } // namespace WebCore | 169 } // namespace WebCore |
| OLD | NEW |