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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 } | 77 } |
78 | 78 |
79 // If we have a line box wrapper, delete it. | 79 // If we have a line box wrapper, delete it. |
80 if (oldChild->isBox()) | 80 if (oldChild->isBox()) |
81 toRenderBox(oldChild)->deleteLineBoxWrapper(); | 81 toRenderBox(oldChild)->deleteLineBoxWrapper(); |
82 | 82 |
83 if (!owner->documentBeingDestroyed() && fullRemove) { | 83 if (!owner->documentBeingDestroyed() && fullRemove) { |
84 // if we remove visible child from an invisible parent, we don't know th
e layer visibility any more | 84 // if we remove visible child from an invisible parent, we don't know th
e layer visibility any more |
85 RenderLayer* layer = 0; | 85 RenderLayer* layer = 0; |
86 if (owner->style()->visibility() != VISIBLE && oldChild->style()->visibi
lity() == VISIBLE && !oldChild->hasLayer()) { | 86 if (owner->style()->visibility() != VISIBLE && oldChild->style()->visibi
lity() == VISIBLE && !oldChild->hasLayer()) { |
87 layer = owner->enclosingLayer(); | 87 if ((layer = owner->enclosingLayer())) |
88 layer->dirtyVisibleContentStatus(); | 88 layer->dirtyVisibleContentStatus(); |
89 } | 89 } |
90 | 90 |
91 // Keep our layer hierarchy updated. | 91 // Keep our layer hierarchy updated. |
92 if (oldChild->firstChild() || oldChild->hasLayer()) { | 92 if (oldChild->firstChild() || oldChild->hasLayer()) { |
93 if (!layer) | 93 if (!layer) |
94 layer = owner->enclosingLayer(); | 94 layer = owner->enclosingLayer(); |
95 oldChild->removeLayers(layer); | 95 oldChild->removeLayers(layer); |
96 } | 96 } |
97 | 97 |
98 if (oldChild->isListItem()) | 98 if (oldChild->isListItem()) |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 } | 465 } |
466 if (generatedContentContainer->isChildAllowed(renderer, pseudoElemen
tStyle)) | 466 if (generatedContentContainer->isChildAllowed(renderer, pseudoElemen
tStyle)) |
467 generatedContentContainer->addChild(renderer); | 467 generatedContentContainer->addChild(renderer); |
468 else | 468 else |
469 renderer->destroy(); | 469 renderer->destroy(); |
470 } | 470 } |
471 } | 471 } |
472 } | 472 } |
473 | 473 |
474 } // namespace WebCore | 474 } // namespace WebCore |
OLD | NEW |