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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 } | 454 } |
455 | 455 |
456 if (renderer) { | 456 if (renderer) { |
457 if (!generatedContentContainer) { | 457 if (!generatedContentContainer) { |
458 // Make a generated box that might be any display type now that
we are able to drill down into children | 458 // Make a generated box that might be any display type now that
we are able to drill down into children |
459 // to find the original content properly. | 459 // to find the original content properly. |
460 generatedContentContainer = RenderObject::createObject(owner->do
cument(), pseudoElementStyle); | 460 generatedContentContainer = RenderObject::createObject(owner->do
cument(), pseudoElementStyle); |
461 generatedContentContainer->setStyle(pseudoElementStyle); | 461 generatedContentContainer->setStyle(pseudoElementStyle); |
462 owner->addChild(generatedContentContainer, insertBefore); | 462 owner->addChild(generatedContentContainer, insertBefore); |
463 } | 463 } |
464 generatedContentContainer->addChild(renderer); | 464 if (generatedContentContainer->isChildAllowed(renderer, pseudoElemen
tStyle)) |
| 465 generatedContentContainer->addChild(renderer); |
| 466 else |
| 467 renderer->destroy(); |
465 } | 468 } |
466 } | 469 } |
467 } | 470 } |
468 | 471 |
469 } // namespace WebCore | 472 } // namespace WebCore |
OLD | NEW |